@gaialabs/core 0.2.4 → 0.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client/client.d.ts +1 -0
- package/client/client.js +5 -0
- package/client/default.d.ts +1 -0
- package/client/default.js +5 -0
- package/client/edge.d.ts +1 -0
- package/client/edge.js +373 -0
- package/client/index-browser.js +399 -0
- package/client/index.d.ts +34222 -0
- package/client/index.js +373 -0
- package/client/package.json +144 -0
- package/client/query_compiler_fast_bg.js +2 -0
- package/client/query_compiler_fast_bg.wasm +0 -0
- package/client/query_compiler_fast_bg.wasm-base64.js +2 -0
- package/client/query_engine-windows.dll.node +0 -0
- package/client/query_engine_bg.js +2 -0
- package/client/query_engine_bg.wasm +0 -0
- package/client/runtime/client.d.ts +3358 -0
- package/client/runtime/client.js +86 -0
- package/client/runtime/edge-esm.js +35 -0
- package/client/runtime/edge.js +35 -0
- package/client/runtime/index-browser.d.ts +90 -0
- package/client/runtime/index-browser.js +6 -0
- package/client/runtime/library.d.ts +3982 -0
- package/client/runtime/library.js +147 -0
- package/client/runtime/react-native.js +84 -0
- package/client/runtime/wasm-compiler-edge.js +76 -0
- package/client/runtime/wasm-engine-edge.js +38 -0
- package/client/schema.prisma +404 -0
- package/client/wasm-edge-light-loader.mjs +5 -0
- package/client/wasm-worker-loader.mjs +5 -0
- package/client/wasm.d.ts +1 -0
- package/client/wasm.js +421 -0
- package/dist/index.cjs +1228 -424
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1038 -347
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.mts +1038 -347
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +1225 -421
- package/dist/index.mjs.map +1 -1
- package/package.json +15 -1
- package/prisma.cjs +1 -0
- package/prisma.d.ts +1 -0
- package/prisma.mjs +9 -0
package/dist/index.d.mts
CHANGED
|
@@ -9,9 +9,9 @@ declare class RomState {
|
|
|
9
9
|
readonly cgram: Uint8Array<ArrayBuffer>;
|
|
10
10
|
readonly vram: Uint8Array<ArrayBuffer>;
|
|
11
11
|
/**
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
* Create ROM state from scene metadata.
|
|
13
|
+
* Parameters are currently unused but kept for future implementation.
|
|
14
|
+
*/
|
|
15
15
|
static fromScene(_baseDir: string, _root: unknown, _metaFile: string, _id: number): Promise<RomState>;
|
|
16
16
|
}
|
|
17
17
|
/**
|
|
@@ -33,24 +33,24 @@ declare class Stack {
|
|
|
33
33
|
location: number;
|
|
34
34
|
constructor();
|
|
35
35
|
/**
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
* Push a byte onto the stack
|
|
37
|
+
*/
|
|
38
38
|
push(value: number): void;
|
|
39
39
|
/**
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
* Push a 16-bit value onto the stack (little-endian)
|
|
41
|
+
*/
|
|
42
42
|
pushUInt16(value: number): void;
|
|
43
43
|
/**
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
* Pop a byte from the stack
|
|
45
|
+
*/
|
|
46
46
|
popByte(): number;
|
|
47
47
|
/**
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
* Pop a 16-bit value from the stack (little-endian)
|
|
49
|
+
*/
|
|
50
50
|
popUInt16(): number;
|
|
51
51
|
/**
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
* Reset the stack to initial state
|
|
53
|
+
*/
|
|
54
54
|
reset(): void;
|
|
55
55
|
}
|
|
56
56
|
//#endregion
|
|
@@ -67,7 +67,7 @@ declare enum AddressType {
|
|
|
67
67
|
WBank = "WBank",
|
|
68
68
|
Relative = "Relative",
|
|
69
69
|
WRelative = "WRelative",
|
|
70
|
-
Location = "Location"
|
|
70
|
+
Location = "Location"
|
|
71
71
|
}
|
|
72
72
|
/**
|
|
73
73
|
* Address space types
|
|
@@ -78,16 +78,16 @@ declare enum AddressSpace {
|
|
|
78
78
|
ROM = "ROM",
|
|
79
79
|
WRAM = "WRAM",
|
|
80
80
|
SRAM = "SRAM",
|
|
81
|
-
System = "System"
|
|
81
|
+
System = "System"
|
|
82
82
|
}
|
|
83
83
|
declare enum MemoryMapMode {
|
|
84
84
|
Lo = "Lo",
|
|
85
85
|
Hi = "Hi",
|
|
86
|
-
ExHi = "ExHi"
|
|
86
|
+
ExHi = "ExHi"
|
|
87
87
|
}
|
|
88
88
|
declare enum CpuMode {
|
|
89
89
|
Slow = "Slow",
|
|
90
|
-
Fast = "Fast"
|
|
90
|
+
Fast = "Fast"
|
|
91
91
|
}
|
|
92
92
|
/**
|
|
93
93
|
* SNES address structure
|
|
@@ -124,7 +124,7 @@ declare enum MemberType {
|
|
|
124
124
|
Address = "Address",
|
|
125
125
|
Binary = "Binary",
|
|
126
126
|
Code = "Code",
|
|
127
|
-
Location = "Location"
|
|
127
|
+
Location = "Location"
|
|
128
128
|
}
|
|
129
129
|
//#endregion
|
|
130
130
|
//#region src/types/processor.d.ts
|
|
@@ -135,7 +135,7 @@ declare enum MemberType {
|
|
|
135
135
|
declare enum RegisterType {
|
|
136
136
|
M = "M",
|
|
137
137
|
X = "X",
|
|
138
|
-
B = "B"
|
|
138
|
+
B = "B"
|
|
139
139
|
}
|
|
140
140
|
/**
|
|
141
141
|
* Status flags for 65816 processor
|
|
@@ -153,54 +153,54 @@ declare enum RegisterType {
|
|
|
153
153
|
*/
|
|
154
154
|
declare enum StatusFlags {
|
|
155
155
|
/**
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
156
|
+
* Clear before starting addition or subtraction.
|
|
157
|
+
* Arithmetic overflow:
|
|
158
|
+
* [addition - carry out of high bit:]
|
|
159
|
+
* 0 = no carry
|
|
160
|
+
* 1 = carry
|
|
161
|
+
* [subtraction - borrow required to subtract:]
|
|
162
|
+
* 0 = borrow required
|
|
163
|
+
* 1 = no borrow required
|
|
164
|
+
* [Logic:]
|
|
165
|
+
* receives bit shifted or rotated out;
|
|
166
|
+
* source of bit rotated in
|
|
167
|
+
*/
|
|
168
168
|
Carry = 1,
|
|
169
169
|
/**
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
170
|
+
* Indicates zero or non-zero result:
|
|
171
|
+
* 0 = non-zero result
|
|
172
|
+
* 1 = zero result
|
|
173
|
+
*/
|
|
174
174
|
Zero = 2,
|
|
175
175
|
/**
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
176
|
+
* Enables or disables processor's IRQ interrupt line:
|
|
177
|
+
* Set to disable interrupts by masking the IRQ line
|
|
178
|
+
* Clear to enable IRQ interrupts
|
|
179
|
+
*/
|
|
180
180
|
IrqDisable = 4,
|
|
181
181
|
/**
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
182
|
+
* Determines mode for add/subtract (not increment/decrement, though):
|
|
183
|
+
* Set to force decimal operation (BCD)
|
|
184
|
+
* Clear to return to binary operation
|
|
185
|
+
*/
|
|
186
186
|
DecimalMode = 8,
|
|
187
187
|
IndexMode = 16,
|
|
188
188
|
AccumulatorMode = 32,
|
|
189
189
|
/**
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
190
|
+
* Clear to reverse "set-overflow" hardware input.
|
|
191
|
+
* Indicates invalid carry into high bit of arithmetic
|
|
192
|
+
* result (two's-complement overflow):
|
|
193
|
+
* 0 = two's-complement result ok
|
|
194
|
+
* 1 = error if two's-complement arithmetic
|
|
195
|
+
*/
|
|
196
196
|
Overflow = 64,
|
|
197
197
|
/**
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
Negative = 128
|
|
198
|
+
* Reflects most significant bit of result
|
|
199
|
+
* (the sign of a two's-complement binary number):
|
|
200
|
+
* 0 = high bit clear (positive result)
|
|
201
|
+
* 1 = high bit set (negative result)
|
|
202
|
+
*/
|
|
203
|
+
Negative = 128
|
|
204
204
|
}
|
|
205
205
|
//#endregion
|
|
206
206
|
//#region src/types/resources.d.ts
|
|
@@ -220,7 +220,7 @@ declare enum BinType {
|
|
|
220
220
|
Assembly = "Assembly",
|
|
221
221
|
Patch = "Patch",
|
|
222
222
|
Transform = "Transform",
|
|
223
|
-
Binary = "Binary"
|
|
223
|
+
Binary = "Binary"
|
|
224
224
|
}
|
|
225
225
|
//#endregion
|
|
226
226
|
//#region src/types/transforms.d.ts
|
|
@@ -230,7 +230,7 @@ declare enum BinType {
|
|
|
230
230
|
*/
|
|
231
231
|
declare enum XformType {
|
|
232
232
|
Lookup = "Lookup",
|
|
233
|
-
Replace = "Replace"
|
|
233
|
+
Replace = "Replace"
|
|
234
234
|
}
|
|
235
235
|
/**
|
|
236
236
|
* Transform definition
|
|
@@ -263,6 +263,7 @@ declare class DbFileType {
|
|
|
263
263
|
isPatch: boolean;
|
|
264
264
|
isBlock: boolean;
|
|
265
265
|
header: number;
|
|
266
|
+
compressed?: boolean;
|
|
266
267
|
constructor(data: Partial<DbFileType>);
|
|
267
268
|
}
|
|
268
269
|
//#endregion
|
|
@@ -311,18 +312,18 @@ declare class DbBlock {
|
|
|
311
312
|
*/
|
|
312
313
|
interface ICompressionProvider {
|
|
313
314
|
/**
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
315
|
+
* Expand (decompress) data
|
|
316
|
+
* @param srcData Source data buffer
|
|
317
|
+
* @param srcPosition Starting position in source data
|
|
318
|
+
* @param srcLen Length of source data to process
|
|
319
|
+
* @returns Expanded data
|
|
320
|
+
*/
|
|
320
321
|
expand(srcData: Uint8Array, srcPosition?: number, srcLen?: number): Uint8Array;
|
|
321
322
|
/**
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
323
|
+
* Compact (compress) data
|
|
324
|
+
* @param srcData Source data to compress
|
|
325
|
+
* @returns Compressed data
|
|
326
|
+
*/
|
|
326
327
|
compact(srcData: Uint8Array, srcPosition?: number, srcLen?: number): Uint8Array;
|
|
327
328
|
}
|
|
328
329
|
//#endregion
|
|
@@ -354,41 +355,41 @@ declare class ChunkFile {
|
|
|
354
355
|
scene?: string;
|
|
355
356
|
constructor(name: string, size: number, location: number, type: DbFileType);
|
|
356
357
|
}
|
|
357
|
-
declare function createChunkFileFromDbFile(rom: Uint8Array, compression: ICompressionProvider, dbFile: DbFile, fileType: DbFileType): ChunkFile;
|
|
358
|
+
declare function createChunkFileFromDbFile(rom: Uint8Array, compression: ICompressionProvider | undefined, dbFile: DbFile, fileType: DbFileType): ChunkFile;
|
|
358
359
|
declare function createChunkFileFromDbBlock(block: DbBlock, fileType: DbFileType, memoryMode: MemoryMapMode): ChunkFile;
|
|
359
360
|
/**
|
|
360
361
|
* Chunk file utilities
|
|
361
362
|
*/
|
|
362
363
|
declare class ChunkFileUtils {
|
|
363
364
|
/**
|
|
364
|
-
|
|
365
|
-
|
|
365
|
+
* Rebase blocks to a new location
|
|
366
|
+
*/
|
|
366
367
|
static rebase(chunkFile: ChunkFile, newLocation?: number): void;
|
|
367
368
|
/**
|
|
368
|
-
|
|
369
|
-
|
|
369
|
+
* Calculate the total size of all blocks
|
|
370
|
+
*/
|
|
370
371
|
static calculateSize(chunkFile: ChunkFile): number;
|
|
371
372
|
/**
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
373
|
+
* Check if a location is outside this block and return the part (matches C# IsOutside)
|
|
374
|
+
* Returns [isOutside, part] where part is the part containing the location
|
|
375
|
+
*/
|
|
375
376
|
static isOutsideWithPart(root: ChunkFile[], block: ChunkFile, location: number): [boolean, ChunkFile | null, AsmBlock | null];
|
|
376
377
|
/**
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
378
|
+
* Check if a location is inside this block and return the part (matches C# IsInside)
|
|
379
|
+
* Returns [isInside, part] where part is the part containing the location
|
|
380
|
+
*/
|
|
380
381
|
static isInsideWithPart(block: ChunkFile, location: number): [boolean, AsmBlock | null];
|
|
381
382
|
/**
|
|
382
|
-
|
|
383
|
-
|
|
383
|
+
* Check if a location is outside this block (shorthand version)
|
|
384
|
+
*/
|
|
384
385
|
static isOutside(block: ChunkFile, location: number): boolean;
|
|
385
386
|
/**
|
|
386
|
-
|
|
387
|
-
|
|
387
|
+
* Check if a location is inside this block (shorthand version)
|
|
388
|
+
*/
|
|
388
389
|
static isInside(block: ChunkFile, location: number): boolean;
|
|
389
390
|
/**
|
|
390
|
-
|
|
391
|
-
|
|
391
|
+
* Get all included blocks
|
|
392
|
+
*/
|
|
392
393
|
static getIncludes(chunkFile: ChunkFile): ChunkFile[];
|
|
393
394
|
}
|
|
394
395
|
//#endregion
|
|
@@ -447,12 +448,12 @@ declare class AsmBlock {
|
|
|
447
448
|
*/
|
|
448
449
|
declare class AsmBlockUtils {
|
|
449
450
|
/**
|
|
450
|
-
|
|
451
|
-
|
|
451
|
+
* Check if a location is inside this part
|
|
452
|
+
*/
|
|
452
453
|
static isInside(part: AsmBlock, location: number): boolean;
|
|
453
454
|
/**
|
|
454
|
-
|
|
455
|
-
|
|
455
|
+
* Check if a location is outside this part
|
|
456
|
+
*/
|
|
456
457
|
static isOutside(part: AsmBlock, location: number): boolean;
|
|
457
458
|
}
|
|
458
459
|
//#endregion
|
|
@@ -473,39 +474,39 @@ declare class BitStream {
|
|
|
473
474
|
get currentPosition(): number;
|
|
474
475
|
set currentPosition(value: number);
|
|
475
476
|
/**
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
477
|
+
* Read a byte from the stream
|
|
478
|
+
* @returns The byte read, or -1 if the end of the data has been reached
|
|
479
|
+
*/
|
|
479
480
|
readByte(): number;
|
|
480
481
|
/**
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
482
|
+
* Read a ushort from the stream (ignores the current bit flag)
|
|
483
|
+
* @returns The short read, or -1 if the end of the data has been reached
|
|
484
|
+
*/
|
|
484
485
|
readShort(): number;
|
|
485
486
|
/**
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
487
|
+
* Read a bit from the stream
|
|
488
|
+
* @returns True if the current bit at bitFlag is set, false otherwise
|
|
489
|
+
*/
|
|
489
490
|
readBit(): boolean;
|
|
490
491
|
/**
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
492
|
+
* Read a nibble from the stream
|
|
493
|
+
* @returns The nibble read, or -1 if the end of the data has been reached
|
|
494
|
+
*/
|
|
494
495
|
readNibble(): number;
|
|
495
496
|
/**
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
497
|
+
* Write a bit to the stream
|
|
498
|
+
* @param set True if the current bit should be set, false otherwise
|
|
499
|
+
*/
|
|
499
500
|
writeBit(set: boolean): void;
|
|
500
501
|
/**
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
502
|
+
* Write a byte to the stream
|
|
503
|
+
* @param value The byte to write
|
|
504
|
+
*/
|
|
504
505
|
writeByte(value: number): void;
|
|
505
506
|
/**
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
507
|
+
* Write a nibble to the stream
|
|
508
|
+
* @param value The nibble to write
|
|
509
|
+
*/
|
|
509
510
|
writeNibble(value: number): void;
|
|
510
511
|
flush(): void;
|
|
511
512
|
}
|
|
@@ -518,31 +519,31 @@ declare class BitStream {
|
|
|
518
519
|
declare class CompressionRegistry {
|
|
519
520
|
private static providers;
|
|
520
521
|
/**
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
522
|
+
* Register a compression provider
|
|
523
|
+
* @param id String identifier for the compression type
|
|
524
|
+
* @param factory Factory function that creates the compression provider
|
|
525
|
+
*/
|
|
525
526
|
static register(id: string, factory: () => ICompressionProvider): void;
|
|
526
527
|
/**
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
528
|
+
* Get a compression provider by ID
|
|
529
|
+
* @param id String identifier for the compression type
|
|
530
|
+
* @returns Compression provider instance
|
|
531
|
+
*/
|
|
531
532
|
static get(id: string): ICompressionProvider;
|
|
532
533
|
/**
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
534
|
+
* Check if a compression provider is registered
|
|
535
|
+
* @param id String identifier for the compression type
|
|
536
|
+
* @returns True if provider is registered
|
|
537
|
+
*/
|
|
537
538
|
static has(id: string): boolean;
|
|
538
539
|
/**
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
540
|
+
* Get list of registered provider IDs
|
|
541
|
+
* @returns Array of registered provider IDs
|
|
542
|
+
*/
|
|
542
543
|
static getRegisteredIds(): string[];
|
|
543
544
|
/**
|
|
544
|
-
|
|
545
|
-
|
|
545
|
+
* Clear all registered providers (mainly for testing)
|
|
546
|
+
*/
|
|
546
547
|
static clear(): void;
|
|
547
548
|
}
|
|
548
549
|
//#endregion
|
|
@@ -574,11 +575,11 @@ declare class RomProcessingConstants {
|
|
|
574
575
|
static readonly COP_SPLIT_REGEX: RegExp;
|
|
575
576
|
static readonly COMMA_SPACE_TRIM_REGEX: RegExp;
|
|
576
577
|
/**
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
578
|
+
* Gets the size of an object for processing purposes
|
|
579
|
+
* @param obj The object to get the size for
|
|
580
|
+
* @returns Size in bytes
|
|
581
|
+
* @throws Error when unable to determine size
|
|
582
|
+
*/
|
|
582
583
|
static getSize(obj: unknown): number;
|
|
583
584
|
}
|
|
584
585
|
/**
|
|
@@ -639,9 +640,9 @@ interface DbStringLayer {
|
|
|
639
640
|
map: string[];
|
|
640
641
|
}
|
|
641
642
|
declare class DbStringDictionary {
|
|
642
|
-
base
|
|
643
|
+
base?: number;
|
|
643
644
|
range: number;
|
|
644
|
-
command
|
|
645
|
+
command?: number;
|
|
645
646
|
name: string;
|
|
646
647
|
entries: string[];
|
|
647
648
|
constructor(data: Partial<DbStringDictionary>);
|
|
@@ -710,12 +711,12 @@ interface StringEntry {
|
|
|
710
711
|
*/
|
|
711
712
|
declare class StringSizeComparer {
|
|
712
713
|
/**
|
|
713
|
-
|
|
714
|
-
|
|
714
|
+
* Compare two strings by length
|
|
715
|
+
*/
|
|
715
716
|
static compare(a: string, b: string): number;
|
|
716
717
|
/**
|
|
717
|
-
|
|
718
|
-
|
|
718
|
+
* Compare two StringWrapper objects by string length
|
|
719
|
+
*/
|
|
719
720
|
static compareWrappers(a: StringWrapper, b: StringWrapper): number;
|
|
720
721
|
}
|
|
721
722
|
//#endregion
|
|
@@ -779,9 +780,9 @@ declare class ProcessorStateManager {
|
|
|
779
780
|
private readonly _buckets;
|
|
780
781
|
get(key: string): MapExt<number, number>;
|
|
781
782
|
/**
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
783
|
+
* Hydrate processor registers with stored state
|
|
784
|
+
* Uses Registers from gaia-core/assembly for processor state management
|
|
785
|
+
*/
|
|
785
786
|
hydrateRegisters(position: number, reg: Registers): void;
|
|
786
787
|
getStackPosition(location: number): number | undefined;
|
|
787
788
|
setStackPosition(location: number, value: number): void;
|
|
@@ -913,12 +914,13 @@ interface DbGameRomModule {
|
|
|
913
914
|
blocks: Record<string, Record<string, Partial<DbBlock>>>;
|
|
914
915
|
files: Record<string, Record<string, Record<string, Partial<DbFile>>>>;
|
|
915
916
|
config: DbConfig;
|
|
916
|
-
labels:
|
|
917
|
+
labels: Record<number, string>;
|
|
917
918
|
structs: Record<string, DbStruct>;
|
|
918
919
|
copdef: Record<string, Partial<CopDef>>;
|
|
919
920
|
strings: Record<string, Partial<DbStringType>>;
|
|
920
921
|
transforms: Record<string, Partial<DbTransform>[]>;
|
|
921
922
|
addrModes: Record<string, Partial<DbAddressingMode>>;
|
|
923
|
+
headers: Partial<DbHeader>[];
|
|
922
924
|
groups: Record<string, Partial<DbGroup>>;
|
|
923
925
|
fileTypes: Record<string, Partial<DbFileType>>;
|
|
924
926
|
}
|
|
@@ -926,6 +928,22 @@ interface DbBaseRomModule extends DbGameRomModule {
|
|
|
926
928
|
baseRomFiles: ChunkFile[];
|
|
927
929
|
}
|
|
928
930
|
//#endregion
|
|
931
|
+
//#region src/database/header.d.ts
|
|
932
|
+
declare class DbHeader {
|
|
933
|
+
bank: number;
|
|
934
|
+
address: number;
|
|
935
|
+
condition?: string;
|
|
936
|
+
parts: DbHeaderPart[];
|
|
937
|
+
constructor(data: Partial<DbHeader>);
|
|
938
|
+
}
|
|
939
|
+
declare class DbHeaderPart {
|
|
940
|
+
name: string;
|
|
941
|
+
size: number;
|
|
942
|
+
type: string;
|
|
943
|
+
value?: any;
|
|
944
|
+
constructor(data: Partial<DbHeaderPart>);
|
|
945
|
+
}
|
|
946
|
+
//#endregion
|
|
929
947
|
//#region src/database/root.d.ts
|
|
930
948
|
/**
|
|
931
949
|
* Main database root class
|
|
@@ -939,6 +957,7 @@ interface DbRoot {
|
|
|
939
957
|
stringTypes: Record<string, DbStringType>;
|
|
940
958
|
stringDelimiters: string[];
|
|
941
959
|
stringDelimiterLookup: Record<string, DbStringType>;
|
|
960
|
+
headers: DbHeader[];
|
|
942
961
|
files: DbFile[];
|
|
943
962
|
config: DbConfig;
|
|
944
963
|
blocks: DbBlock[];
|
|
@@ -949,7 +968,7 @@ interface DbRoot {
|
|
|
949
968
|
opCodes: Record<number, OpCode>;
|
|
950
969
|
opLookup: Record<string, OpCode[]>;
|
|
951
970
|
addrLookup: Record<string, DbAddressingMode>;
|
|
952
|
-
compression
|
|
971
|
+
compression?: ICompressionProvider;
|
|
953
972
|
baseRomFiles?: ChunkFile[];
|
|
954
973
|
projectFiles?: ChunkFile[];
|
|
955
974
|
groups: Record<string, DbGroup>;
|
|
@@ -962,16 +981,8 @@ interface DbRoot {
|
|
|
962
981
|
*/
|
|
963
982
|
declare class DbRootUtils {
|
|
964
983
|
/**
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
/**
|
|
968
|
-
* Load database from a single file
|
|
969
|
-
*/
|
|
970
|
-
static fromFolder(folderPath: string, systemPath: string): Promise<DbRoot>;
|
|
971
|
-
/**
|
|
972
|
-
* Load database from folder structure
|
|
973
|
-
*/
|
|
974
|
-
static gameModuleFromFolder(folderPath: string, systemPath: string): Promise<DbGameRomModule>;
|
|
984
|
+
* JSON serialization options
|
|
985
|
+
*/
|
|
975
986
|
static fromGameModule(module: DbGameRomModule): DbRoot;
|
|
976
987
|
static applyFolder(root: DbRoot, folderPath: string, sourceFiles?: ChunkFile[]): Promise<ChunkFile[]>;
|
|
977
988
|
static extractAllContent(root: DbRoot, romPath: string, outPath: string): Promise<void>;
|
|
@@ -1059,8 +1070,8 @@ declare class ReferenceManager {
|
|
|
1059
1070
|
createTypeName(type: string, location: number): string;
|
|
1060
1071
|
createFallbackName(location: number): string;
|
|
1061
1072
|
/**
|
|
1062
|
-
|
|
1063
|
-
|
|
1073
|
+
* Finds a reference location by its assigned name.
|
|
1074
|
+
*/
|
|
1064
1075
|
findLocationByName(name: string): number | undefined;
|
|
1065
1076
|
resolveName(location: number, type: AddressType, isBranch: boolean): string;
|
|
1066
1077
|
findClosestReference(location: number): string | null;
|
|
@@ -1152,97 +1163,97 @@ declare class BlockReader {
|
|
|
1152
1163
|
_enrichedChunks: ChunkFile[];
|
|
1153
1164
|
constructor(romData: Uint8Array, root: DbRoot);
|
|
1154
1165
|
/**
|
|
1155
|
-
|
|
1156
|
-
|
|
1166
|
+
* Processes predefined overrides for registers and bank notes
|
|
1167
|
+
*/
|
|
1157
1168
|
private initializeOverrides;
|
|
1158
1169
|
/**
|
|
1159
|
-
|
|
1160
|
-
|
|
1170
|
+
* Processes predefined file references
|
|
1171
|
+
*/
|
|
1161
1172
|
private initializeFileReferences;
|
|
1162
1173
|
/**
|
|
1163
|
-
|
|
1164
|
-
|
|
1174
|
+
* Resolves mnemonic for a given address
|
|
1175
|
+
*/
|
|
1165
1176
|
resolveMnemonic(addr: Address): void;
|
|
1166
1177
|
/**
|
|
1167
|
-
|
|
1168
|
-
|
|
1178
|
+
* Resolves name for a location (delegated to ReferenceManager)
|
|
1179
|
+
*/
|
|
1169
1180
|
resolveName(location: number, type: AddressType, isBranch: boolean): string;
|
|
1170
1181
|
/**
|
|
1171
|
-
|
|
1172
|
-
|
|
1182
|
+
* Resolves include for a location
|
|
1183
|
+
*/
|
|
1173
1184
|
resolveInclude(loc: number, isBranch: boolean): void;
|
|
1174
1185
|
/**
|
|
1175
|
-
|
|
1176
|
-
|
|
1186
|
+
* Notes a type at a location and manages chunk references
|
|
1187
|
+
*/
|
|
1177
1188
|
noteType(loc: number, type: string, silent?: boolean, reg?: Registers): string;
|
|
1178
1189
|
updateRegisterState(loc: number, reg: Registers): void;
|
|
1179
1190
|
/**
|
|
1180
|
-
|
|
1181
|
-
|
|
1191
|
+
* Checks if a delimiter has been reached
|
|
1192
|
+
*/
|
|
1182
1193
|
delimiterReached(delimiter?: number): boolean;
|
|
1183
1194
|
/**
|
|
1184
|
-
|
|
1185
|
-
|
|
1195
|
+
* Checks if processing of the current part can continue
|
|
1196
|
+
*/
|
|
1186
1197
|
partCanContinue(): boolean;
|
|
1187
1198
|
analyzeAndResolve(): ChunkFile[];
|
|
1188
1199
|
/**
|
|
1189
|
-
|
|
1190
|
-
|
|
1200
|
+
* Analyzes all blocks in the ROM
|
|
1201
|
+
*/
|
|
1191
1202
|
/**
|
|
1192
|
-
|
|
1193
|
-
|
|
1203
|
+
* Initializes blocks and parts with base references
|
|
1204
|
+
*/
|
|
1194
1205
|
private initializeBlocksAndParts;
|
|
1195
1206
|
/**
|
|
1196
|
-
|
|
1197
|
-
|
|
1207
|
+
* Processes a single part
|
|
1208
|
+
*/
|
|
1198
1209
|
private processPart;
|
|
1199
1210
|
/**
|
|
1200
|
-
|
|
1201
|
-
|
|
1211
|
+
* Processes a continuous entry (same type as previous)
|
|
1212
|
+
*/
|
|
1202
1213
|
private processContinuousEntry;
|
|
1203
1214
|
/**
|
|
1204
|
-
|
|
1205
|
-
|
|
1215
|
+
* Processes a new entry
|
|
1216
|
+
*/
|
|
1206
1217
|
private processNewEntry;
|
|
1207
1218
|
/**
|
|
1208
|
-
|
|
1209
|
-
|
|
1219
|
+
* Creates ChunkFile objects from database structure
|
|
1220
|
+
*/
|
|
1210
1221
|
private createChunkFilesFromDatabase;
|
|
1211
1222
|
/**
|
|
1212
|
-
|
|
1213
|
-
|
|
1223
|
+
* Creates binary ChunkFiles from DbFiles (enriched with rawData)
|
|
1224
|
+
*/
|
|
1214
1225
|
private createChunkFilesFromSfx;
|
|
1215
1226
|
/**
|
|
1216
|
-
|
|
1217
|
-
|
|
1227
|
+
* Creates binary ChunkFiles from DbFiles (enriched with rawData)
|
|
1228
|
+
*/
|
|
1218
1229
|
private createChunkFilesFromDbFiles;
|
|
1219
1230
|
/**
|
|
1220
|
-
|
|
1221
|
-
|
|
1231
|
+
* Creates assembly ChunkFiles from DbBlocks (enriched with parts)
|
|
1232
|
+
*/
|
|
1222
1233
|
private createChunkFilesFromDbBlocks;
|
|
1223
1234
|
/**
|
|
1224
|
-
|
|
1225
|
-
|
|
1235
|
+
* Analyzes only assembly ChunkFiles (those with parts from DbBlocks)
|
|
1236
|
+
*/
|
|
1226
1237
|
private analyzeChunkFiles;
|
|
1227
1238
|
/**
|
|
1228
|
-
|
|
1229
|
-
|
|
1239
|
+
* Resolves references in assembly ChunkFiles only
|
|
1240
|
+
*/
|
|
1230
1241
|
private resolveReferences;
|
|
1231
1242
|
/**
|
|
1232
|
-
|
|
1233
|
-
|
|
1243
|
+
* Resolves a single object and its references
|
|
1244
|
+
*/
|
|
1234
1245
|
private resolveObject;
|
|
1235
1246
|
/**
|
|
1236
|
-
|
|
1237
|
-
|
|
1247
|
+
* Resolves references in an operation object
|
|
1248
|
+
*/
|
|
1238
1249
|
private resolveOperationObject;
|
|
1239
1250
|
/**
|
|
1240
|
-
|
|
1241
|
-
|
|
1251
|
+
* Checks if an operation is a branch operation
|
|
1252
|
+
*/
|
|
1242
1253
|
private isBranchOperation;
|
|
1243
1254
|
/**
|
|
1244
|
-
|
|
1245
|
-
|
|
1255
|
+
* Hydrates registers with stored state
|
|
1256
|
+
*/
|
|
1246
1257
|
hydrateRegisters(reg: Registers): void;
|
|
1247
1258
|
}
|
|
1248
1259
|
//#endregion
|
|
@@ -1259,12 +1270,12 @@ declare class TransformProcessor {
|
|
|
1259
1270
|
private static readonly LOCATION_REGEX;
|
|
1260
1271
|
constructor(romReader: BlockReader);
|
|
1261
1272
|
/**
|
|
1262
|
-
|
|
1263
|
-
|
|
1273
|
+
* Retrieves transform information for the current ROM position
|
|
1274
|
+
*/
|
|
1264
1275
|
getTransform(): string | null;
|
|
1265
1276
|
/**
|
|
1266
|
-
|
|
1267
|
-
|
|
1277
|
+
* Applies transforms to operands
|
|
1278
|
+
*/
|
|
1268
1279
|
applyTransforms(op1Label: string | null, op2Label: string | null, operands: unknown[]): void;
|
|
1269
1280
|
private applyTransform;
|
|
1270
1281
|
private applyDefaultTransform;
|
|
@@ -1340,8 +1351,8 @@ declare class CopCommandProcessor {
|
|
|
1340
1351
|
private readonly _romDataReader;
|
|
1341
1352
|
constructor(blockReader: BlockReader);
|
|
1342
1353
|
/**
|
|
1343
|
-
|
|
1344
|
-
|
|
1354
|
+
* Parses a COP command based on its definition
|
|
1355
|
+
*/
|
|
1345
1356
|
parseCopCommand(copDef: CopDef, operands: unknown[]): void;
|
|
1346
1357
|
private tryParseMemberType;
|
|
1347
1358
|
private getMemberTypeSize;
|
|
@@ -1362,7 +1373,7 @@ declare enum ObjectType {
|
|
|
1362
1373
|
Array = "Array",
|
|
1363
1374
|
String = "String",
|
|
1364
1375
|
Number = "Number",
|
|
1365
|
-
TypedNumber = "TypedNumber"
|
|
1376
|
+
TypedNumber = "TypedNumber"
|
|
1366
1377
|
}
|
|
1367
1378
|
declare class BlockWriter {
|
|
1368
1379
|
private _root;
|
|
@@ -1399,13 +1410,13 @@ declare class PostProcessor {
|
|
|
1399
1410
|
private readonly _referenceManager;
|
|
1400
1411
|
constructor(reader: BlockReader);
|
|
1401
1412
|
/**
|
|
1402
|
-
|
|
1403
|
-
|
|
1413
|
+
* Execute post process directive on a block if present.
|
|
1414
|
+
*/
|
|
1404
1415
|
process(block: ChunkFile): void;
|
|
1405
1416
|
/**
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1417
|
+
* Builds a lookup table from struct entries.
|
|
1418
|
+
* Equivalent to PostProcessor.Lookup in C# implementation.
|
|
1419
|
+
*/
|
|
1409
1420
|
Lookup(block: ChunkFile, keyIx: string, valueIx: string): void;
|
|
1410
1421
|
}
|
|
1411
1422
|
//#endregion
|
|
@@ -1443,29 +1454,29 @@ declare class RomWriter {
|
|
|
1443
1454
|
bpsPath?: string;
|
|
1444
1455
|
outBuffer?: Uint8Array;
|
|
1445
1456
|
private romSize?;
|
|
1446
|
-
readonly cartName: string;
|
|
1447
|
-
readonly makerCode: string;
|
|
1448
1457
|
readonly root: DbRoot;
|
|
1449
|
-
constructor(root: DbRoot
|
|
1458
|
+
constructor(root: DbRoot);
|
|
1450
1459
|
repack(files: ChunkFile[]): Promise<Uint8Array>;
|
|
1451
1460
|
allocate(pages: number): void;
|
|
1452
|
-
|
|
1453
|
-
|
|
1461
|
+
writeHeaders(masterLookup: Map<string, number>): void;
|
|
1462
|
+
prepareHeaderValues(): any;
|
|
1463
|
+
writeHeader(header: DbHeader, values: any, masterLookup: Map<string, number>): void;
|
|
1464
|
+
writeChecksum(values: any): void;
|
|
1454
1465
|
writeEntryPoints(asmFiles: ChunkFile[]): void;
|
|
1455
|
-
writeFile(file: ChunkFile,
|
|
1466
|
+
writeFile(file: ChunkFile, fileLookup: Map<string, number>): Promise<number>;
|
|
1456
1467
|
private writeAscii;
|
|
1457
1468
|
/**
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1469
|
+
* Parse assembly blocks and write binary data to output buffer
|
|
1470
|
+
* Converted from ext/GaiaLib/Rom/Rebuild/RomWriter.cs ParseAssembly method
|
|
1471
|
+
*/
|
|
1461
1472
|
private parseAssembly;
|
|
1462
1473
|
/**
|
|
1463
|
-
|
|
1464
|
-
|
|
1474
|
+
* Helper method to find index of any character from an array in a string
|
|
1475
|
+
*/
|
|
1465
1476
|
private indexOfAny;
|
|
1466
1477
|
/**
|
|
1467
|
-
|
|
1468
|
-
|
|
1478
|
+
* Helper method to check if an object is a StringMarker
|
|
1479
|
+
*/
|
|
1469
1480
|
private isStringMarker;
|
|
1470
1481
|
private isTableEntry;
|
|
1471
1482
|
}
|
|
@@ -1478,30 +1489,10 @@ declare class RomWriter {
|
|
|
1478
1489
|
declare class RomProcessor {
|
|
1479
1490
|
private readonly writer;
|
|
1480
1491
|
constructor(writer: RomWriter);
|
|
1481
|
-
repack(allFiles: ChunkFile[]): Promise<
|
|
1492
|
+
repack(allFiles: ChunkFile[]): Promise<Map<string, number>>;
|
|
1482
1493
|
static applyPatches(asmFiles: ChunkFile[], patches: ChunkFile[]): void;
|
|
1483
1494
|
}
|
|
1484
1495
|
//#endregion
|
|
1485
|
-
//#region src/rom/rebuild/assembler-context.d.ts
|
|
1486
|
-
/**
|
|
1487
|
-
* Shared context interface for assembler components
|
|
1488
|
-
* This eliminates circular dependencies between Assembler, AssemblerState, and StringProcessor
|
|
1489
|
-
*/
|
|
1490
|
-
interface AssemblerContext {
|
|
1491
|
-
readonly root: DbRoot;
|
|
1492
|
-
readonly stringProcessor: StringProcessor;
|
|
1493
|
-
currentBlock: AsmBlock | null;
|
|
1494
|
-
lineBuffer: string;
|
|
1495
|
-
blockIndex: number;
|
|
1496
|
-
lastDelimiter: number | null;
|
|
1497
|
-
blocks: AsmBlock[];
|
|
1498
|
-
eof: boolean;
|
|
1499
|
-
lineCount: number;
|
|
1500
|
-
getLine(): boolean;
|
|
1501
|
-
processRawData(): void;
|
|
1502
|
-
parseOperand(operand: string): unknown;
|
|
1503
|
-
}
|
|
1504
|
-
//#endregion
|
|
1505
1496
|
//#region src/rom/rebuild/string-processor.d.ts
|
|
1506
1497
|
/**
|
|
1507
1498
|
* String processor for assembly parsing
|
|
@@ -1516,7 +1507,7 @@ declare class StringProcessor {
|
|
|
1516
1507
|
private readonly stringCharLookup;
|
|
1517
1508
|
private readonly testRegex;
|
|
1518
1509
|
private inShift;
|
|
1519
|
-
constructor(context:
|
|
1510
|
+
constructor(context: Assembler);
|
|
1520
1511
|
consumeString(typeChar: string): void;
|
|
1521
1512
|
private flushBuffer;
|
|
1522
1513
|
private processString;
|
|
@@ -1550,7 +1541,7 @@ declare class SortedMap<V> {
|
|
|
1550
1541
|
* Main assembler class for parsing assembly files
|
|
1551
1542
|
* Converted from GaiaLib/Rom/Rebuild/Assembler.cs
|
|
1552
1543
|
*/
|
|
1553
|
-
declare class Assembler
|
|
1544
|
+
declare class Assembler {
|
|
1554
1545
|
readonly root: DbRoot;
|
|
1555
1546
|
private readonly lines;
|
|
1556
1547
|
private currentLineIndex;
|
|
@@ -1558,15 +1549,18 @@ declare class Assembler implements AssemblerContext {
|
|
|
1558
1549
|
lineBuffer: string;
|
|
1559
1550
|
includes: Set<string>;
|
|
1560
1551
|
blocks: AsmBlock[];
|
|
1561
|
-
tags: SortedMap<string>;
|
|
1552
|
+
tags: SortedMap<string | null>;
|
|
1562
1553
|
currentBlock: AsmBlock | null;
|
|
1563
1554
|
lineCount: number;
|
|
1564
|
-
blockIndex: number;
|
|
1565
1555
|
lastDelimiter: number | null;
|
|
1566
1556
|
reqBank: number | null;
|
|
1567
1557
|
eof: boolean;
|
|
1568
1558
|
strDelimRegex: RegExp;
|
|
1569
|
-
|
|
1559
|
+
conditionFiles: string[];
|
|
1560
|
+
private inCondition;
|
|
1561
|
+
private exitCondition;
|
|
1562
|
+
private failCondition;
|
|
1563
|
+
constructor(dbRoot: DbRoot, textData: string, conditionFiles: string[]);
|
|
1570
1564
|
parseAssembly(): {
|
|
1571
1565
|
blocks: AsmBlock[];
|
|
1572
1566
|
includes: Set<string>;
|
|
@@ -1598,7 +1592,7 @@ declare class AssemblerState {
|
|
|
1598
1592
|
private readonly memberTypes;
|
|
1599
1593
|
private currentType;
|
|
1600
1594
|
private readonly context;
|
|
1601
|
-
constructor(context:
|
|
1595
|
+
constructor(context: Assembler, structType?: string | null, saveDelimiter?: boolean);
|
|
1602
1596
|
private checkDisc;
|
|
1603
1597
|
private advancePart;
|
|
1604
1598
|
private processOrigin;
|
|
@@ -1612,17 +1606,13 @@ declare class AssemblerState {
|
|
|
1612
1606
|
declare class RomGenerator {
|
|
1613
1607
|
readonly projectName?: string;
|
|
1614
1608
|
crc: number;
|
|
1615
|
-
branchId: string;
|
|
1616
1609
|
dbRoot: DbRoot;
|
|
1617
1610
|
private sourceData;
|
|
1618
|
-
constructor(projectName?: string);
|
|
1619
|
-
|
|
1611
|
+
constructor(projectName?: string, crc?: number);
|
|
1612
|
+
validateAndDownload(sourceData: Uint8Array): Promise<boolean>;
|
|
1620
1613
|
generateProject(modules: string[], manualFiles?: ChunkFile[], unshiftManualFiles?: boolean): Promise<Uint8Array>;
|
|
1621
1614
|
private applyProjectInit;
|
|
1622
|
-
private assembleCodeFromText;
|
|
1623
|
-
private generateAsmIncludeLookups;
|
|
1624
1615
|
applyPatchFile(chunkFile: ChunkFile, chunkFiles: ChunkFile[], asmFiles: ChunkFile[], patchFiles: ChunkFile[]): void;
|
|
1625
|
-
private writeRom;
|
|
1626
1616
|
}
|
|
1627
1617
|
//#endregion
|
|
1628
1618
|
//#region src/compression/QuintetLZ.d.ts
|
|
@@ -1636,18 +1626,18 @@ declare class QuintetLZ implements ICompressionProvider {
|
|
|
1636
1626
|
static readonly DICTIONARY_OFFSET = 239;
|
|
1637
1627
|
private static readonly DEFAULT_PAGE_SIZE;
|
|
1638
1628
|
/**
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1629
|
+
* Expand (decompress) data using QuintetLZ algorithm
|
|
1630
|
+
* @param srcData Source data buffer
|
|
1631
|
+
* @param srcPosition Starting position in source data
|
|
1632
|
+
* @param srcLen Length of source data to process
|
|
1633
|
+
* @returns Expanded data
|
|
1634
|
+
*/
|
|
1645
1635
|
expand(srcData: Uint8Array, srcPosition?: number, srcLen?: number): Uint8Array;
|
|
1646
1636
|
/**
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1637
|
+
* Compact (compress) data using QuintetLZ algorithm
|
|
1638
|
+
* @param srcData Source data to compress
|
|
1639
|
+
* @returns Compressed data
|
|
1640
|
+
*/
|
|
1651
1641
|
compact(srcData: Uint8Array, srcPosition?: number, srcLen?: number): Uint8Array;
|
|
1652
1642
|
}
|
|
1653
1643
|
//#endregion
|
|
@@ -1662,8 +1652,8 @@ declare class SpriteFrame {
|
|
|
1662
1652
|
duration: number;
|
|
1663
1653
|
groupIndex: number;
|
|
1664
1654
|
/**
|
|
1665
|
-
|
|
1666
|
-
|
|
1655
|
+
* Internal offset to the group data (not serialized)
|
|
1656
|
+
*/
|
|
1667
1657
|
groupOffset: number;
|
|
1668
1658
|
constructor(duration?: number, groupIndex?: number, groupOffset?: number);
|
|
1669
1659
|
}
|
|
@@ -1716,15 +1706,15 @@ declare class SpriteMap {
|
|
|
1716
1706
|
groups: SpriteGroup[];
|
|
1717
1707
|
constructor();
|
|
1718
1708
|
/**
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1709
|
+
* Create a SpriteMap from binary data
|
|
1710
|
+
* @param data Binary data buffer
|
|
1711
|
+
* @returns SpriteMap instance
|
|
1712
|
+
*/
|
|
1723
1713
|
static fromBytes(data: Uint8Array): SpriteMap;
|
|
1724
1714
|
/**
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1715
|
+
* Convert this SpriteMap to binary data
|
|
1716
|
+
* @returns Binary data buffer
|
|
1717
|
+
*/
|
|
1728
1718
|
toBytes(): Uint8Array;
|
|
1729
1719
|
}
|
|
1730
1720
|
//#endregion
|
|
@@ -1791,7 +1781,7 @@ interface FileBaseRaw extends Omit<FileBaseData, 'data'> {
|
|
|
1791
1781
|
interface PlatformBranchData extends BranchBaseData {
|
|
1792
1782
|
platformId: string;
|
|
1793
1783
|
addressingModes: any | null;
|
|
1794
|
-
|
|
1784
|
+
headers: any | null;
|
|
1795
1785
|
vectors: any | null;
|
|
1796
1786
|
types: any | null;
|
|
1797
1787
|
platform: PlatformData;
|
|
@@ -1806,10 +1796,15 @@ interface GameRomBranchData extends BranchBaseData {
|
|
|
1806
1796
|
config: any | null;
|
|
1807
1797
|
files: any | null;
|
|
1808
1798
|
blocks: any | null;
|
|
1809
|
-
|
|
1799
|
+
rewrites: any | null;
|
|
1800
|
+
transforms: any | null;
|
|
1801
|
+
overrides: any | null;
|
|
1802
|
+
labels: any | null;
|
|
1803
|
+
mnemonics: any | null;
|
|
1804
|
+
fileTypes: any | null;
|
|
1805
|
+
groups: any | null;
|
|
1810
1806
|
strings: any | null;
|
|
1811
1807
|
structs: any | null;
|
|
1812
|
-
scenes: any | null;
|
|
1813
1808
|
gameRom: GameRomData;
|
|
1814
1809
|
platformBranch: PlatformBranchData;
|
|
1815
1810
|
}
|
|
@@ -1842,6 +1837,22 @@ interface GameData {
|
|
|
1842
1837
|
createdAt: string;
|
|
1843
1838
|
updatedAt: string;
|
|
1844
1839
|
}
|
|
1840
|
+
interface DeveloperData {
|
|
1841
|
+
id: string;
|
|
1842
|
+
name: string;
|
|
1843
|
+
meta: any | null;
|
|
1844
|
+
createdAt: string;
|
|
1845
|
+
updatedAt: string;
|
|
1846
|
+
}
|
|
1847
|
+
interface GameDeveloperData {
|
|
1848
|
+
id: string;
|
|
1849
|
+
gameId: string;
|
|
1850
|
+
developerId: string;
|
|
1851
|
+
createdAt: string;
|
|
1852
|
+
updatedAt: string;
|
|
1853
|
+
game: GameData;
|
|
1854
|
+
developer: DeveloperData;
|
|
1855
|
+
}
|
|
1845
1856
|
interface RegionData {
|
|
1846
1857
|
id: string;
|
|
1847
1858
|
name: string;
|
|
@@ -1900,26 +1911,26 @@ interface BaseRomPayload {
|
|
|
1900
1911
|
*/
|
|
1901
1912
|
interface FromSupabaseByNameOptions {
|
|
1902
1913
|
/**
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1914
|
+
* Name of the game to load
|
|
1915
|
+
* @default 'Illusion of Gaia'
|
|
1916
|
+
*/
|
|
1906
1917
|
gameName: string;
|
|
1907
1918
|
/**
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1919
|
+
* Name of the base ROM to load
|
|
1920
|
+
* @default 'GaiaLabs BaseROM'
|
|
1921
|
+
*/
|
|
1911
1922
|
baseRomName: string;
|
|
1912
1923
|
/**
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1924
|
+
* Name of the branch to load
|
|
1925
|
+
* Set to null to load the main/develop branch
|
|
1926
|
+
* Set to undefined to not filter by branch name
|
|
1927
|
+
*/
|
|
1917
1928
|
branchName?: string | null;
|
|
1918
1929
|
/**
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1930
|
+
* Version of the branch to load
|
|
1931
|
+
* Set to null to load the latest/main version
|
|
1932
|
+
* Set to undefined to not filter by version
|
|
1933
|
+
*/
|
|
1923
1934
|
branchVersion?: number | null;
|
|
1924
1935
|
}
|
|
1925
1936
|
/**
|
|
@@ -1932,15 +1943,15 @@ declare enum SupabaseErrorCode {
|
|
|
1932
1943
|
NETWORK_ERROR = "NETWORK_ERROR",
|
|
1933
1944
|
INVALID_DATA = "INVALID_DATA",
|
|
1934
1945
|
ENVIRONMENT_ERROR = "ENVIRONMENT_ERROR",
|
|
1935
|
-
PERMISSION_ERROR = "PERMISSION_ERROR"
|
|
1946
|
+
PERMISSION_ERROR = "PERMISSION_ERROR"
|
|
1936
1947
|
}
|
|
1937
1948
|
/**
|
|
1938
1949
|
* Custom error class for Supabase operations
|
|
1939
1950
|
*/
|
|
1940
1951
|
declare class SupabaseFromError extends Error {
|
|
1941
1952
|
readonly code: SupabaseErrorCode;
|
|
1942
|
-
readonly details?: any;
|
|
1943
|
-
constructor(message: string, code: SupabaseErrorCode, details?: any);
|
|
1953
|
+
readonly details?: any | undefined;
|
|
1954
|
+
constructor(message: string, code: SupabaseErrorCode, details?: any | undefined);
|
|
1944
1955
|
}
|
|
1945
1956
|
/**
|
|
1946
1957
|
* Result type for async operations that may fail
|
|
@@ -2009,16 +2020,16 @@ interface ProjectPayload {
|
|
|
2009
2020
|
interface FromSupabaseByProjectOptions {
|
|
2010
2021
|
projectName: string;
|
|
2011
2022
|
/**
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2023
|
+
* Name of the branch to load
|
|
2024
|
+
* Set to null to load the main/develop branch
|
|
2025
|
+
* Set to undefined to not filter by branch name
|
|
2026
|
+
*/
|
|
2016
2027
|
branchName?: string | null;
|
|
2017
2028
|
/**
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2029
|
+
* Version of the branch to load
|
|
2030
|
+
* Set to null to load the latest/main version
|
|
2031
|
+
* Set to undefined to not filter by version
|
|
2032
|
+
*/
|
|
2022
2033
|
branchVersion?: number | null;
|
|
2023
2034
|
}
|
|
2024
2035
|
/**
|
|
@@ -2211,7 +2222,7 @@ declare function fromSupabaseByName(options: FromSupabaseByNameOptions): Promise
|
|
|
2211
2222
|
* });
|
|
2212
2223
|
* ```
|
|
2213
2224
|
*/
|
|
2214
|
-
declare function fromSupabaseByProject(projectName?: string, branchId?: string): Promise<
|
|
2225
|
+
declare function fromSupabaseByProject(projectName?: string, branchId?: string): Promise<DbGameRomModule>;
|
|
2215
2226
|
declare function fromSupabaseByGameRom(gameName?: string, regionName?: string, platformName?: string, branchId?: string): Promise<ProjectPayload>;
|
|
2216
2227
|
declare function summaryFromSupabaseByProject(projectName?: string): Promise<ProjectBranchData>;
|
|
2217
2228
|
//#endregion
|
|
@@ -2314,6 +2325,7 @@ declare function removeDirectory(dirPath: string): Promise<void>;
|
|
|
2314
2325
|
interface DirectoryEntry {
|
|
2315
2326
|
name: string;
|
|
2316
2327
|
path: string;
|
|
2328
|
+
extension: string | null;
|
|
2317
2329
|
isDirectory: boolean;
|
|
2318
2330
|
isFile: boolean;
|
|
2319
2331
|
}
|
|
@@ -2389,25 +2401,6 @@ declare function encodeBase64String(text: string): string;
|
|
|
2389
2401
|
*/
|
|
2390
2402
|
declare function decodeBase64String(base64String: string): string;
|
|
2391
2403
|
//#endregion
|
|
2392
|
-
//#region src/utils/debug-export.d.ts
|
|
2393
|
-
/**
|
|
2394
|
-
* Debug utility to export processing results as JSON for comparison
|
|
2395
|
-
*/
|
|
2396
|
-
declare class DebugExporter {
|
|
2397
|
-
/**
|
|
2398
|
-
* Export chunk files to JSON for comparison with C# output
|
|
2399
|
-
*/
|
|
2400
|
-
static exportChunkFiles(files: ChunkFile[], filename: string): void;
|
|
2401
|
-
/**
|
|
2402
|
-
* Export patch application summary
|
|
2403
|
-
*/
|
|
2404
|
-
static exportPatchSummary(originalFiles: ChunkFile[], patchedFiles: ChunkFile[], patches: ChunkFile[], filename: string): void;
|
|
2405
|
-
/**
|
|
2406
|
-
* Export layout debugging information
|
|
2407
|
-
*/
|
|
2408
|
-
static exportLayoutDebug(files: ChunkFile[], filename: string): void;
|
|
2409
|
-
}
|
|
2410
|
-
//#endregion
|
|
2411
2404
|
//#region src/utils/index.d.ts
|
|
2412
2405
|
/**
|
|
2413
2406
|
* Convert bytes to hex string
|
|
@@ -2451,26 +2444,724 @@ declare function getNestedProperty(obj: any, path: string): any;
|
|
|
2451
2444
|
declare function indexOfAny(str: string, chars: string[], startIndex?: number): number;
|
|
2452
2445
|
//#endregion
|
|
2453
2446
|
//#region src/index.d.ts
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2447
|
+
declare const snes: {
|
|
2448
|
+
addressingModes: {
|
|
2449
|
+
Absolute: {
|
|
2450
|
+
shorthand: string;
|
|
2451
|
+
operands: string[];
|
|
2452
|
+
size: number;
|
|
2453
|
+
formatString: string;
|
|
2454
|
+
parseRegex: string;
|
|
2455
|
+
instructions: {
|
|
2456
|
+
ADC: number;
|
|
2457
|
+
AND: number;
|
|
2458
|
+
ASL: number;
|
|
2459
|
+
BIT: number;
|
|
2460
|
+
CMP: number;
|
|
2461
|
+
CPX: number;
|
|
2462
|
+
CPY: number;
|
|
2463
|
+
DEC: number;
|
|
2464
|
+
EOR: number;
|
|
2465
|
+
INC: number;
|
|
2466
|
+
JMP: number;
|
|
2467
|
+
JSR: number;
|
|
2468
|
+
LDA: number;
|
|
2469
|
+
LDX: number;
|
|
2470
|
+
LDY: number;
|
|
2471
|
+
LSR: number;
|
|
2472
|
+
ORA: number;
|
|
2473
|
+
PEA: number;
|
|
2474
|
+
ROL: number;
|
|
2475
|
+
ROR: number;
|
|
2476
|
+
SBC: number;
|
|
2477
|
+
STA: number;
|
|
2478
|
+
STX: number;
|
|
2479
|
+
STY: number;
|
|
2480
|
+
STZ: number;
|
|
2481
|
+
TRB: number;
|
|
2482
|
+
TSB: number;
|
|
2483
|
+
};
|
|
2484
|
+
};
|
|
2485
|
+
AbsoluteIndexedX: {
|
|
2486
|
+
shorthand: string;
|
|
2487
|
+
operands: string[];
|
|
2488
|
+
size: number;
|
|
2489
|
+
formatString: string;
|
|
2490
|
+
parseRegex: string;
|
|
2491
|
+
instructions: {
|
|
2492
|
+
ADC: number;
|
|
2493
|
+
AND: number;
|
|
2494
|
+
ASL: number;
|
|
2495
|
+
BIT: number;
|
|
2496
|
+
CMP: number;
|
|
2497
|
+
DEC: number;
|
|
2498
|
+
EOR: number;
|
|
2499
|
+
INC: number;
|
|
2500
|
+
LDA: number;
|
|
2501
|
+
LDY: number;
|
|
2502
|
+
LSR: number;
|
|
2503
|
+
ORA: number;
|
|
2504
|
+
ROL: number;
|
|
2505
|
+
ROR: number;
|
|
2506
|
+
SBC: number;
|
|
2507
|
+
STA: number;
|
|
2508
|
+
STZ: number;
|
|
2509
|
+
};
|
|
2510
|
+
};
|
|
2511
|
+
AbsoluteIndexedY: {
|
|
2512
|
+
shorthand: string;
|
|
2513
|
+
operands: string[];
|
|
2514
|
+
size: number;
|
|
2515
|
+
formatString: string;
|
|
2516
|
+
parseRegex: string;
|
|
2517
|
+
instructions: {
|
|
2518
|
+
ADC: number;
|
|
2519
|
+
AND: number;
|
|
2520
|
+
CMP: number;
|
|
2521
|
+
EOR: number;
|
|
2522
|
+
LDA: number;
|
|
2523
|
+
LDX: number;
|
|
2524
|
+
ORA: number;
|
|
2525
|
+
SBC: number;
|
|
2526
|
+
STA: number;
|
|
2527
|
+
};
|
|
2528
|
+
};
|
|
2529
|
+
AbsoluteIndirect: {
|
|
2530
|
+
shorthand: string;
|
|
2531
|
+
operands: string[];
|
|
2532
|
+
size: number;
|
|
2533
|
+
formatString: string;
|
|
2534
|
+
parseRegex: string;
|
|
2535
|
+
instructions: {
|
|
2536
|
+
JMP: number;
|
|
2537
|
+
};
|
|
2538
|
+
};
|
|
2539
|
+
AbsoluteIndirectLong: {
|
|
2540
|
+
shorthand: string;
|
|
2541
|
+
operands: string[];
|
|
2542
|
+
size: number;
|
|
2543
|
+
formatString: string;
|
|
2544
|
+
parseRegex: string;
|
|
2545
|
+
instructions: {
|
|
2546
|
+
JML: number;
|
|
2547
|
+
};
|
|
2548
|
+
};
|
|
2549
|
+
AbsoluteIndexedIndirect: {
|
|
2550
|
+
shorthand: string;
|
|
2551
|
+
operands: string[];
|
|
2552
|
+
size: number;
|
|
2553
|
+
formatString: string;
|
|
2554
|
+
parseRegex: string;
|
|
2555
|
+
instructions: {
|
|
2556
|
+
JMP: number;
|
|
2557
|
+
JSR: number;
|
|
2558
|
+
};
|
|
2559
|
+
};
|
|
2560
|
+
AbsoluteLong: {
|
|
2561
|
+
shorthand: string;
|
|
2562
|
+
operands: string[];
|
|
2563
|
+
size: number;
|
|
2564
|
+
formatString: string;
|
|
2565
|
+
parseRegex: string;
|
|
2566
|
+
instructions: {
|
|
2567
|
+
ADC: number;
|
|
2568
|
+
AND: number;
|
|
2569
|
+
CMP: number;
|
|
2570
|
+
EOR: number;
|
|
2571
|
+
JML: number;
|
|
2572
|
+
JSL: number;
|
|
2573
|
+
LDA: number;
|
|
2574
|
+
ORA: number;
|
|
2575
|
+
SBC: number;
|
|
2576
|
+
STA: number;
|
|
2577
|
+
};
|
|
2578
|
+
};
|
|
2579
|
+
AbsoluteLongIndexedX: {
|
|
2580
|
+
shorthand: string;
|
|
2581
|
+
operands: string[];
|
|
2582
|
+
size: number;
|
|
2583
|
+
formatString: string;
|
|
2584
|
+
parseRegex: string;
|
|
2585
|
+
instructions: {
|
|
2586
|
+
ADC: number;
|
|
2587
|
+
AND: number;
|
|
2588
|
+
CMP: number;
|
|
2589
|
+
EOR: number;
|
|
2590
|
+
LDA: number;
|
|
2591
|
+
ORA: number;
|
|
2592
|
+
SBC: number;
|
|
2593
|
+
STA: number;
|
|
2594
|
+
};
|
|
2595
|
+
};
|
|
2596
|
+
DirectPage: {
|
|
2597
|
+
shorthand: string;
|
|
2598
|
+
operands: string[];
|
|
2599
|
+
size: number;
|
|
2600
|
+
formatString: string;
|
|
2601
|
+
parseRegex: string;
|
|
2602
|
+
instructions: {
|
|
2603
|
+
ADC: number;
|
|
2604
|
+
AND: number;
|
|
2605
|
+
ASL: number;
|
|
2606
|
+
BIT: number;
|
|
2607
|
+
CMP: number;
|
|
2608
|
+
CPX: number;
|
|
2609
|
+
CPY: number;
|
|
2610
|
+
DEC: number;
|
|
2611
|
+
EOR: number;
|
|
2612
|
+
INC: number;
|
|
2613
|
+
LDA: number;
|
|
2614
|
+
LDX: number;
|
|
2615
|
+
LDY: number;
|
|
2616
|
+
LSR: number;
|
|
2617
|
+
ORA: number;
|
|
2618
|
+
ROL: number;
|
|
2619
|
+
ROR: number;
|
|
2620
|
+
SBC: number;
|
|
2621
|
+
STA: number;
|
|
2622
|
+
STX: number;
|
|
2623
|
+
STY: number;
|
|
2624
|
+
STZ: number;
|
|
2625
|
+
TRB: number;
|
|
2626
|
+
TSB: number;
|
|
2627
|
+
};
|
|
2628
|
+
};
|
|
2629
|
+
DirectPageIndexedX: {
|
|
2630
|
+
shorthand: string;
|
|
2631
|
+
operands: string[];
|
|
2632
|
+
size: number;
|
|
2633
|
+
formatString: string;
|
|
2634
|
+
parseRegex: string;
|
|
2635
|
+
instructions: {
|
|
2636
|
+
ADC: number;
|
|
2637
|
+
AND: number;
|
|
2638
|
+
ASL: number;
|
|
2639
|
+
BIT: number;
|
|
2640
|
+
CMP: number;
|
|
2641
|
+
DEC: number;
|
|
2642
|
+
EOR: number;
|
|
2643
|
+
INC: number;
|
|
2644
|
+
LDA: number;
|
|
2645
|
+
LDY: number;
|
|
2646
|
+
LSR: number;
|
|
2647
|
+
ORA: number;
|
|
2648
|
+
ROL: number;
|
|
2649
|
+
ROR: number;
|
|
2650
|
+
SBC: number;
|
|
2651
|
+
STA: number;
|
|
2652
|
+
STY: number;
|
|
2653
|
+
STZ: number;
|
|
2654
|
+
};
|
|
2655
|
+
};
|
|
2656
|
+
DirectPageIndexedY: {
|
|
2657
|
+
shorthand: string;
|
|
2658
|
+
operands: string[];
|
|
2659
|
+
size: number;
|
|
2660
|
+
formatString: string;
|
|
2661
|
+
parseRegex: string;
|
|
2662
|
+
instructions: {
|
|
2663
|
+
LDX: number;
|
|
2664
|
+
STX: number;
|
|
2665
|
+
};
|
|
2666
|
+
};
|
|
2667
|
+
DirectPageIndirect: {
|
|
2668
|
+
shorthand: string;
|
|
2669
|
+
operands: string[];
|
|
2670
|
+
size: number;
|
|
2671
|
+
formatString: string;
|
|
2672
|
+
parseRegex: string;
|
|
2673
|
+
instructions: {
|
|
2674
|
+
ADC: number;
|
|
2675
|
+
AND: number;
|
|
2676
|
+
CMP: number;
|
|
2677
|
+
EOR: number;
|
|
2678
|
+
LDA: number;
|
|
2679
|
+
ORA: number;
|
|
2680
|
+
PEI: number;
|
|
2681
|
+
SBC: number;
|
|
2682
|
+
STA: number;
|
|
2683
|
+
};
|
|
2684
|
+
};
|
|
2685
|
+
DirectPageIndirectLong: {
|
|
2686
|
+
shorthand: string;
|
|
2687
|
+
operands: string[];
|
|
2688
|
+
size: number;
|
|
2689
|
+
formatString: string;
|
|
2690
|
+
parseRegex: string;
|
|
2691
|
+
instructions: {
|
|
2692
|
+
ADC: number;
|
|
2693
|
+
AND: number;
|
|
2694
|
+
CMP: number;
|
|
2695
|
+
EOR: number;
|
|
2696
|
+
LDA: number;
|
|
2697
|
+
ORA: number;
|
|
2698
|
+
SBC: number;
|
|
2699
|
+
STA: number;
|
|
2700
|
+
};
|
|
2701
|
+
};
|
|
2702
|
+
DirectPageIndexedIndirectX: {
|
|
2703
|
+
shorthand: string;
|
|
2704
|
+
operands: string[];
|
|
2705
|
+
size: number;
|
|
2706
|
+
formatString: string;
|
|
2707
|
+
parseRegex: string;
|
|
2708
|
+
instructions: {
|
|
2709
|
+
ADC: number;
|
|
2710
|
+
AND: number;
|
|
2711
|
+
CMP: number;
|
|
2712
|
+
EOR: number;
|
|
2713
|
+
LDA: number;
|
|
2714
|
+
ORA: number;
|
|
2715
|
+
SBC: number;
|
|
2716
|
+
STA: number;
|
|
2717
|
+
};
|
|
2718
|
+
};
|
|
2719
|
+
DirectPageIndirectIndexedY: {
|
|
2720
|
+
shorthand: string;
|
|
2721
|
+
operands: string[];
|
|
2722
|
+
size: number;
|
|
2723
|
+
formatString: string;
|
|
2724
|
+
parseRegex: string;
|
|
2725
|
+
instructions: {
|
|
2726
|
+
ADC: number;
|
|
2727
|
+
AND: number;
|
|
2728
|
+
CMP: number;
|
|
2729
|
+
EOR: number;
|
|
2730
|
+
LDA: number;
|
|
2731
|
+
ORA: number;
|
|
2732
|
+
SBC: number;
|
|
2733
|
+
STA: number;
|
|
2734
|
+
};
|
|
2735
|
+
};
|
|
2736
|
+
DirectPageIndirectLongIndexedY: {
|
|
2737
|
+
shorthand: string;
|
|
2738
|
+
operands: string[];
|
|
2739
|
+
size: number;
|
|
2740
|
+
formatString: string;
|
|
2741
|
+
parseRegex: string;
|
|
2742
|
+
instructions: {
|
|
2743
|
+
ADC: number;
|
|
2744
|
+
AND: number;
|
|
2745
|
+
CMP: number;
|
|
2746
|
+
EOR: number;
|
|
2747
|
+
LDA: number;
|
|
2748
|
+
ORA: number;
|
|
2749
|
+
SBC: number;
|
|
2750
|
+
STA: number;
|
|
2751
|
+
};
|
|
2752
|
+
};
|
|
2753
|
+
Immediate: {
|
|
2754
|
+
shorthand: string;
|
|
2755
|
+
operands: string[];
|
|
2756
|
+
size: number;
|
|
2757
|
+
formatString: string;
|
|
2758
|
+
parseRegex: string;
|
|
2759
|
+
instructions: {
|
|
2760
|
+
ADC: number;
|
|
2761
|
+
AND: number;
|
|
2762
|
+
BIT: number;
|
|
2763
|
+
CMP: number;
|
|
2764
|
+
CPX: number;
|
|
2765
|
+
CPY: number;
|
|
2766
|
+
EOR: number;
|
|
2767
|
+
LDA: number;
|
|
2768
|
+
LDX: number;
|
|
2769
|
+
LDY: number;
|
|
2770
|
+
ORA: number;
|
|
2771
|
+
REP: number;
|
|
2772
|
+
SBC: number;
|
|
2773
|
+
SEP: number;
|
|
2774
|
+
};
|
|
2775
|
+
};
|
|
2776
|
+
Implied: {
|
|
2777
|
+
shorthand: string;
|
|
2778
|
+
operands: never[];
|
|
2779
|
+
size: number;
|
|
2780
|
+
formatString: null;
|
|
2781
|
+
parseRegex: null;
|
|
2782
|
+
instructions: {
|
|
2783
|
+
CLC: number;
|
|
2784
|
+
CLD: number;
|
|
2785
|
+
CLI: number;
|
|
2786
|
+
CLV: number;
|
|
2787
|
+
DEX: number;
|
|
2788
|
+
DEY: number;
|
|
2789
|
+
INX: number;
|
|
2790
|
+
INY: number;
|
|
2791
|
+
NOP: number;
|
|
2792
|
+
SEC: number;
|
|
2793
|
+
SED: number;
|
|
2794
|
+
SEI: number;
|
|
2795
|
+
STP: number;
|
|
2796
|
+
TAX: number;
|
|
2797
|
+
TAY: number;
|
|
2798
|
+
TCD: number;
|
|
2799
|
+
TCS: number;
|
|
2800
|
+
TDC: number;
|
|
2801
|
+
TSC: number;
|
|
2802
|
+
TSX: number;
|
|
2803
|
+
TXA: number;
|
|
2804
|
+
TXS: number;
|
|
2805
|
+
TXY: number;
|
|
2806
|
+
TYA: number;
|
|
2807
|
+
TYX: number;
|
|
2808
|
+
WAI: number;
|
|
2809
|
+
WDM: number;
|
|
2810
|
+
XBA: number;
|
|
2811
|
+
XCE: number;
|
|
2812
|
+
};
|
|
2813
|
+
};
|
|
2814
|
+
Accumulator: {
|
|
2815
|
+
shorthand: string;
|
|
2816
|
+
operands: never[];
|
|
2817
|
+
size: number;
|
|
2818
|
+
formatString: null;
|
|
2819
|
+
parseRegex: null;
|
|
2820
|
+
instructions: {
|
|
2821
|
+
ASL: number;
|
|
2822
|
+
DEC: number;
|
|
2823
|
+
INC: number;
|
|
2824
|
+
LSR: number;
|
|
2825
|
+
ROL: number;
|
|
2826
|
+
ROR: number;
|
|
2827
|
+
};
|
|
2828
|
+
};
|
|
2829
|
+
PCRelative: {
|
|
2830
|
+
shorthand: string;
|
|
2831
|
+
operands: string[];
|
|
2832
|
+
size: number;
|
|
2833
|
+
formatString: string;
|
|
2834
|
+
parseRegex: string;
|
|
2835
|
+
instructions: {
|
|
2836
|
+
BPL: number;
|
|
2837
|
+
BMI: number;
|
|
2838
|
+
BRA: number;
|
|
2839
|
+
BCC: number;
|
|
2840
|
+
BCS: number;
|
|
2841
|
+
BNE: number;
|
|
2842
|
+
BEQ: number;
|
|
2843
|
+
BVC: number;
|
|
2844
|
+
BVS: number;
|
|
2845
|
+
};
|
|
2846
|
+
};
|
|
2847
|
+
PCRelativeLong: {
|
|
2848
|
+
shorthand: string;
|
|
2849
|
+
operands: string[];
|
|
2850
|
+
size: number;
|
|
2851
|
+
formatString: string;
|
|
2852
|
+
parseRegex: string;
|
|
2853
|
+
instructions: {
|
|
2854
|
+
BRL: number;
|
|
2855
|
+
PER: number;
|
|
2856
|
+
};
|
|
2857
|
+
};
|
|
2858
|
+
StackRelative: {
|
|
2859
|
+
shorthand: string;
|
|
2860
|
+
operands: string[];
|
|
2861
|
+
size: number;
|
|
2862
|
+
formatString: string;
|
|
2863
|
+
parseRegex: string;
|
|
2864
|
+
instructions: {
|
|
2865
|
+
ADC: number;
|
|
2866
|
+
AND: number;
|
|
2867
|
+
CMP: number;
|
|
2868
|
+
EOR: number;
|
|
2869
|
+
LDA: number;
|
|
2870
|
+
ORA: number;
|
|
2871
|
+
SBC: number;
|
|
2872
|
+
STA: number;
|
|
2873
|
+
};
|
|
2874
|
+
};
|
|
2875
|
+
StackRelativeIndirectIndexedY: {
|
|
2876
|
+
shorthand: string;
|
|
2877
|
+
operands: string[];
|
|
2878
|
+
size: number;
|
|
2879
|
+
formatString: string;
|
|
2880
|
+
parseRegex: string;
|
|
2881
|
+
instructions: {
|
|
2882
|
+
ADC: number;
|
|
2883
|
+
AND: number;
|
|
2884
|
+
CMP: number;
|
|
2885
|
+
EOR: number;
|
|
2886
|
+
LDA: number;
|
|
2887
|
+
ORA: number;
|
|
2888
|
+
SBC: number;
|
|
2889
|
+
STA: number;
|
|
2890
|
+
};
|
|
2891
|
+
};
|
|
2892
|
+
BlockMove: {
|
|
2893
|
+
shorthand: string;
|
|
2894
|
+
operands: string[];
|
|
2895
|
+
size: number;
|
|
2896
|
+
formatString: string;
|
|
2897
|
+
parseRegex: string;
|
|
2898
|
+
instructions: {
|
|
2899
|
+
MVN: number;
|
|
2900
|
+
MVP: number;
|
|
2901
|
+
};
|
|
2902
|
+
};
|
|
2903
|
+
StackInterrupt: {
|
|
2904
|
+
shorthand: string;
|
|
2905
|
+
operands: string[];
|
|
2906
|
+
size: number;
|
|
2907
|
+
formatString: string;
|
|
2908
|
+
parseRegex: string;
|
|
2909
|
+
instructions: {
|
|
2910
|
+
BRK: number;
|
|
2911
|
+
COP: number;
|
|
2912
|
+
};
|
|
2913
|
+
};
|
|
2914
|
+
Stack: {
|
|
2915
|
+
shorthand: string;
|
|
2916
|
+
operands: never[];
|
|
2917
|
+
size: number;
|
|
2918
|
+
formatString: null;
|
|
2919
|
+
parseRegex: null;
|
|
2920
|
+
instructions: {
|
|
2921
|
+
PHA: number;
|
|
2922
|
+
PHB: number;
|
|
2923
|
+
PHD: number;
|
|
2924
|
+
PHK: number;
|
|
2925
|
+
PHP: number;
|
|
2926
|
+
PHX: number;
|
|
2927
|
+
PHY: number;
|
|
2928
|
+
PLA: number;
|
|
2929
|
+
PLB: number;
|
|
2930
|
+
PLD: number;
|
|
2931
|
+
PLP: number;
|
|
2932
|
+
PLX: number;
|
|
2933
|
+
PLY: number;
|
|
2934
|
+
RTI: number;
|
|
2935
|
+
RTL: number;
|
|
2936
|
+
RTS: number;
|
|
2937
|
+
};
|
|
2938
|
+
};
|
|
2939
|
+
};
|
|
2940
|
+
vectors: {
|
|
2941
|
+
"8448": string;
|
|
2942
|
+
"8449": string;
|
|
2943
|
+
"8450": string;
|
|
2944
|
+
"8451": string;
|
|
2945
|
+
"8452": string;
|
|
2946
|
+
"8453": string;
|
|
2947
|
+
"8454": string;
|
|
2948
|
+
"8455": string;
|
|
2949
|
+
"8456": string;
|
|
2950
|
+
"8457": string;
|
|
2951
|
+
"8458": string;
|
|
2952
|
+
"8459": string;
|
|
2953
|
+
"8460": string;
|
|
2954
|
+
"8461": string;
|
|
2955
|
+
"8462": string;
|
|
2956
|
+
"8463": string;
|
|
2957
|
+
"8464": string;
|
|
2958
|
+
"8465": string;
|
|
2959
|
+
"8466": string;
|
|
2960
|
+
"8467": string;
|
|
2961
|
+
"8468": string;
|
|
2962
|
+
"8469": string;
|
|
2963
|
+
"8470": string;
|
|
2964
|
+
"8471": string;
|
|
2965
|
+
"8472": string;
|
|
2966
|
+
"8473": string;
|
|
2967
|
+
"8474": string;
|
|
2968
|
+
"8475": string;
|
|
2969
|
+
"8476": string;
|
|
2970
|
+
"8477": string;
|
|
2971
|
+
"8478": string;
|
|
2972
|
+
"8479": string;
|
|
2973
|
+
"8480": string;
|
|
2974
|
+
"8481": string;
|
|
2975
|
+
"8482": string;
|
|
2976
|
+
"8483": string;
|
|
2977
|
+
"8484": string;
|
|
2978
|
+
"8485": string;
|
|
2979
|
+
"8486": string;
|
|
2980
|
+
"8487": string;
|
|
2981
|
+
"8488": string;
|
|
2982
|
+
"8489": string;
|
|
2983
|
+
"8490": string;
|
|
2984
|
+
"8491": string;
|
|
2985
|
+
"8492": string;
|
|
2986
|
+
"8493": string;
|
|
2987
|
+
"8494": string;
|
|
2988
|
+
"8495": string;
|
|
2989
|
+
"8496": string;
|
|
2990
|
+
"8497": string;
|
|
2991
|
+
"8498": string;
|
|
2992
|
+
"8499": string;
|
|
2993
|
+
"8500": string;
|
|
2994
|
+
"8501": string;
|
|
2995
|
+
"8502": string;
|
|
2996
|
+
"8503": string;
|
|
2997
|
+
"8504": string;
|
|
2998
|
+
"8505": string;
|
|
2999
|
+
"8506": string;
|
|
3000
|
+
"8507": string;
|
|
3001
|
+
"8508": string;
|
|
3002
|
+
"8509": string;
|
|
3003
|
+
"8510": string;
|
|
3004
|
+
"8511": string;
|
|
3005
|
+
"8512": string;
|
|
3006
|
+
"8513": string;
|
|
3007
|
+
"8514": string;
|
|
3008
|
+
"8515": string;
|
|
3009
|
+
"8576": string;
|
|
3010
|
+
"8577": string;
|
|
3011
|
+
"8578": string;
|
|
3012
|
+
"8579": string;
|
|
3013
|
+
"16406": string;
|
|
3014
|
+
"16407": string;
|
|
3015
|
+
"16896": string;
|
|
3016
|
+
"16897": string;
|
|
3017
|
+
"16898": string;
|
|
3018
|
+
"16899": string;
|
|
3019
|
+
"16900": string;
|
|
3020
|
+
"16901": string;
|
|
3021
|
+
"16902": string;
|
|
3022
|
+
"16903": string;
|
|
3023
|
+
"16904": string;
|
|
3024
|
+
"16905": string;
|
|
3025
|
+
"16906": string;
|
|
3026
|
+
"16907": string;
|
|
3027
|
+
"16908": string;
|
|
3028
|
+
"16909": string;
|
|
3029
|
+
"16912": string;
|
|
3030
|
+
"16913": string;
|
|
3031
|
+
"16914": string;
|
|
3032
|
+
"16915": string;
|
|
3033
|
+
"16916": string;
|
|
3034
|
+
"16917": string;
|
|
3035
|
+
"16918": string;
|
|
3036
|
+
"16919": string;
|
|
3037
|
+
"16920": string;
|
|
3038
|
+
"16921": string;
|
|
3039
|
+
"16922": string;
|
|
3040
|
+
"16923": string;
|
|
3041
|
+
"16924": string;
|
|
3042
|
+
"16925": string;
|
|
3043
|
+
"16926": string;
|
|
3044
|
+
"16927": string;
|
|
3045
|
+
"17152": string;
|
|
3046
|
+
"17153": string;
|
|
3047
|
+
"17154": string;
|
|
3048
|
+
"17155": string;
|
|
3049
|
+
"17156": string;
|
|
3050
|
+
"17157": string;
|
|
3051
|
+
"17158": string;
|
|
3052
|
+
"17159": string;
|
|
3053
|
+
"17160": string;
|
|
3054
|
+
"17161": string;
|
|
3055
|
+
"17162": string;
|
|
3056
|
+
"17168": string;
|
|
3057
|
+
"17169": string;
|
|
3058
|
+
"17170": string;
|
|
3059
|
+
"17171": string;
|
|
3060
|
+
"17172": string;
|
|
3061
|
+
"17173": string;
|
|
3062
|
+
"17174": string;
|
|
3063
|
+
"17175": string;
|
|
3064
|
+
"17176": string;
|
|
3065
|
+
"17177": string;
|
|
3066
|
+
"17178": string;
|
|
3067
|
+
"17184": string;
|
|
3068
|
+
"17185": string;
|
|
3069
|
+
"17186": string;
|
|
3070
|
+
"17187": string;
|
|
3071
|
+
"17188": string;
|
|
3072
|
+
"17189": string;
|
|
3073
|
+
"17190": string;
|
|
3074
|
+
"17191": string;
|
|
3075
|
+
"17192": string;
|
|
3076
|
+
"17193": string;
|
|
3077
|
+
"17194": string;
|
|
3078
|
+
"17200": string;
|
|
3079
|
+
"17201": string;
|
|
3080
|
+
"17202": string;
|
|
3081
|
+
"17203": string;
|
|
3082
|
+
"17204": string;
|
|
3083
|
+
"17205": string;
|
|
3084
|
+
"17206": string;
|
|
3085
|
+
"17207": string;
|
|
3086
|
+
"17208": string;
|
|
3087
|
+
"17209": string;
|
|
3088
|
+
"17210": string;
|
|
3089
|
+
"17216": string;
|
|
3090
|
+
"17217": string;
|
|
3091
|
+
"17218": string;
|
|
3092
|
+
"17219": string;
|
|
3093
|
+
"17220": string;
|
|
3094
|
+
"17221": string;
|
|
3095
|
+
"17222": string;
|
|
3096
|
+
"17223": string;
|
|
3097
|
+
"17224": string;
|
|
3098
|
+
"17225": string;
|
|
3099
|
+
"17226": string;
|
|
3100
|
+
"17232": string;
|
|
3101
|
+
"17233": string;
|
|
3102
|
+
"17234": string;
|
|
3103
|
+
"17235": string;
|
|
3104
|
+
"17236": string;
|
|
3105
|
+
"17237": string;
|
|
3106
|
+
"17238": string;
|
|
3107
|
+
"17239": string;
|
|
3108
|
+
"17240": string;
|
|
3109
|
+
"17241": string;
|
|
3110
|
+
"17242": string;
|
|
3111
|
+
"17248": string;
|
|
3112
|
+
"17249": string;
|
|
3113
|
+
"17250": string;
|
|
3114
|
+
"17251": string;
|
|
3115
|
+
"17252": string;
|
|
3116
|
+
"17253": string;
|
|
3117
|
+
"17254": string;
|
|
3118
|
+
"17255": string;
|
|
3119
|
+
"17256": string;
|
|
3120
|
+
"17257": string;
|
|
3121
|
+
"17258": string;
|
|
3122
|
+
"17264": string;
|
|
3123
|
+
"17265": string;
|
|
3124
|
+
"17266": string;
|
|
3125
|
+
"17267": string;
|
|
3126
|
+
"17268": string;
|
|
3127
|
+
"17269": string;
|
|
3128
|
+
"17270": string;
|
|
3129
|
+
"17271": string;
|
|
3130
|
+
"17272": string;
|
|
3131
|
+
"17273": string;
|
|
3132
|
+
"17274": string;
|
|
3133
|
+
};
|
|
3134
|
+
headers: ({
|
|
3135
|
+
address: number;
|
|
3136
|
+
condition: string;
|
|
3137
|
+
parts: ({
|
|
3138
|
+
name: string;
|
|
3139
|
+
size: number;
|
|
3140
|
+
type: string;
|
|
3141
|
+
value?: undefined;
|
|
3142
|
+
} | {
|
|
3143
|
+
name: string;
|
|
3144
|
+
size: number;
|
|
3145
|
+
type: string;
|
|
3146
|
+
value: number;
|
|
3147
|
+
})[];
|
|
3148
|
+
} | {
|
|
3149
|
+
address: number;
|
|
3150
|
+
parts: ({
|
|
3151
|
+
name: string;
|
|
3152
|
+
size: number;
|
|
3153
|
+
type: string;
|
|
3154
|
+
value?: undefined;
|
|
3155
|
+
} | {
|
|
3156
|
+
name: string;
|
|
3157
|
+
size: number;
|
|
3158
|
+
type: string;
|
|
3159
|
+
value: number;
|
|
3160
|
+
})[];
|
|
3161
|
+
condition?: undefined;
|
|
3162
|
+
})[];
|
|
3163
|
+
};
|
|
3164
|
+
declare const isPlatformNode: string | false;
|
|
3165
|
+
//#endregion
|
|
3166
|
+
export { Address, AddressSpace, AddressType, AddressingModeHandler, AsmBlock, AsmBlockUtils, AsmReader, Assembler, AssemblerState, BaseRomBranchData, BaseRomBranchFileRaw, BaseRomData, BaseRomFileData, BaseRomFileRaw, BaseRomPayload, BinType, BitStream, BlockReader, BlockReaderConstants, BlockWriter, BranchBaseData, Byte, ChunkFile, ChunkFileUtils, CollaborationConfig, CompressionAlgorithms, CompressionRegistry, CopCommandProcessor, CopDef, CpuMode, Database, DbAddressingMode, DbAsset, DbBaseRomModule, DbBlock, DbConfig, DbEntryPoint, DbFile, DbFileType, DbGameRomModule, DbGroup, DbHeader, DbHeaderPart, DbLabel, DbMnemonic, DbOverride, DbPart, DbPath, DbRewrite, DbRoot, DbRootUtils, DbScene, DbSfx, DbStringCommand, DbStringDictionary, DbStringLayer, DbStringType, DbStringTypeUtils, DbStruct, DbTransform, DeveloperData, DirectoryEntry, FileBaseData, FileBaseRaw, FileReadOptions, FromSupabaseByNameOptions, FromSupabaseByProjectOptions, GameData, GameDeveloperData, GameRomArtifactData, GameRomArtifactRaw, GameRomBranchArtifactRaw, GameRomBranchData, GameRomData, ICompressionProvider, LocationWrapper, Long, MapExt, MemberType, MemoryMapMode, ObjectType, Op, OpCode, OperationContext, PlatformBranchData, PlatformData, PostProcessor, ProcessorStateManager, ProjectBranchData, ProjectBranchFileRaw, ProjectConfig, ProjectData, ProjectFileData, ProjectFileRaw, ProjectPayload, QueryStats, QuintetLZ, ReferenceManager, RegionData, RegisterType, Registers, RomDataReader, RomGenerator, RomLayout, RomProcessingConstants, RomProcessor, RomState, RomStateUtils, RomWriter, SortedMap, SpriteFrame, SpriteGroup, SpriteMap, SpritePart, Stack, StackOperations, StatusFlags, StringEntry, StringMarker, StringProcessor, StringReader, StringSizeComparer, StringWrapper, StructDef, SupabaseErrorCode, SupabaseFromError, SupabaseResult, TableEntry, TransformProcessor, TypeParser, TypedNumber, Word, XformDef, XformType, base64ToUint8Array, binaryToUtf8String, bytesToHex, clamp, crc32_buffer, crc32_text_utf16, crc32_text_utf8, createChunkFileFromDbBlock, createChunkFileFromDbFile, createDbPath, createSupabaseClient, createTempDirectory, decodeBase64, decodeBase64String, decodeDataString, encodeBase64, encodeBase64String, fileExists, fromSupabaseByGameRom, fromSupabaseById, fromSupabaseByName, fromSupabaseByProject, getDirectory, getEnvVar, getNestedProperty, getSupabaseClient, hexToBytes, hexToUint8Array, indexOfAny, isPlatformNode, isValidBase64, listDirectory, readFileAsBinary, readFileAsText, readJsonFile, removeDirectory, resetSupabaseClient, saveFileAsBinary, saveFileAsText, snes, summaryFromSupabaseByProject, uint8ArrayToBase64, validateEnvironmentVariables };
|
|
2476
3167
|
//# sourceMappingURL=index.d.mts.map
|