//#region src/rom/state.d.ts /** * Lightweight ROM state placeholder used during early development. * This stub will be expanded as the ROM extraction pipeline matures. */ export declare class RomState { readonly cgram: Uint8Array; readonly vram: Uint8Array; /** * Create ROM state from scene metadata. * Parameters are currently unused but kept for future implementation. */ static fromScene(_baseDir: string, _root: unknown, _metaFile: string, _id: number): Promise; } /** * Utility helpers for working with RomState. */ export declare class RomStateUtils { /** Create an empty ROM state */ static createEmpty(): RomState; /** Clear all data in the given ROM state */ static clear(state: RomState): void; } //#endregion //#region src/assembly/Stack.d.ts /** * Represents the stack for the 65816 processor */ export declare class Stack { bytes: Uint8Array; location: number; constructor(); /** * Push a byte onto the stack */ push(value: number): void; /** * Push a 16-bit value onto the stack (little-endian) */ pushUInt16(value: number): void; /** * Pop a byte from the stack */ popByte(): number; /** * Pop a 16-bit value from the stack (little-endian) */ popUInt16(): number; /** * Reset the stack to initial state */ reset(): void; } //#endregion //#region src/types/addressing.d.ts /** * Address type classifications * Converted from GaiaLib/Enum/AddressType.cs */ export declare enum AddressType { Unknown = "Unknown", Bank = "Bank", Offset = "Offset", Address = "Address", WBank = "WBank", Relative = "Relative", WRelative = "WRelative", Location = "Location", OddLocation = "OddLocation" } /** * Address space types * Converted from GaiaLib/Types/Address.cs */ export declare enum AddressSpace { None = "None", ROM = "ROM", WRAM = "WRAM", SRAM = "SRAM", System = "System" } export declare enum MemoryMapMode { Lo = "Lo", Hi = "Hi", ExHi = "ExHi" } export declare enum CpuMode { Slow = "Slow", Fast = "Fast" } /** * SNES address structure * Converted from GaiaLib/Types/Address.cs */ export declare class Address { offset: number; bank: number; mode: MemoryMapMode; isShort: boolean; static readonly UPPER_BANK = 32768; static readonly DATA_BANK_FLAG = 64; static readonly FAST_BANK_FLAG = 128; constructor(bank: number, offset: number, mode: MemoryMapMode, isShort?: boolean); get isROM(): boolean; get isWram(): boolean; get isCodeBank(): boolean; toLocation(): number; static fromLocation(value: number, mode: MemoryMapMode, cpuMode: CpuMode): Address; static resolveBank(value: number, mode: MemoryMapMode): number; toInt(): number; toOffsetString(): string; toString(): string; static typeFromCode(code: string): AddressType; static codeFromType(type: AddressType): string | null; } //#endregion //#region src/types/members.d.ts /** * Member type definitions for data structures * Converted from GaiaLib/Enum/MemberType.cs */ export declare enum MemberType { Byte = "Byte", Word = "Word", Offset = "Offset", Address = "Address", Binary = "Binary", Code = "Code", Branch = "Branch", Location = "Location", OddLocation = "OddLocation" } //#endregion //#region src/types/processor.d.ts /** * Processor register type definitions * Converted from GaiaLib/Enum/RegisterType.cs */ export declare enum RegisterType { M = "M", X = "X", B = "B" } /** * Status flags for 65816 processor * Converted from GaiaLib/Enum/StatusFlags.cs * * Bit pattern: [ n v m x d i z c ] * n = Negative * v = Overflow * m = Accumulator Mode * x = Index Mode * d = Decimal Mode * i = IRQ Disable * z = Zero * c = Carry */ export declare enum StatusFlags { /** * Clear before starting addition or subtraction. * Arithmetic overflow: * [addition - carry out of high bit:] * 0 = no carry * 1 = carry * [subtraction - borrow required to subtract:] * 0 = borrow required * 1 = no borrow required * [Logic:] * receives bit shifted or rotated out; * source of bit rotated in */ Carry = 1, /** * Indicates zero or non-zero result: * 0 = non-zero result * 1 = zero result */ Zero = 2, /** * Enables or disables processor's IRQ interrupt line: * Set to disable interrupts by masking the IRQ line * Clear to enable IRQ interrupts */ IrqDisable = 4, /** * Determines mode for add/subtract (not increment/decrement, though): * Set to force decimal operation (BCD) * Clear to return to binary operation */ DecimalMode = 8, IndexMode = 16, AccumulatorMode = 32, /** * Clear to reverse "set-overflow" hardware input. * Indicates invalid carry into high bit of arithmetic * result (two's-complement overflow): * 0 = two's-complement result ok * 1 = error if two's-complement arithmetic */ Overflow = 64, /** * Reflects most significant bit of result * (the sign of a two's-complement binary number): * 0 = high bit clear (positive result) * 1 = high bit set (negative result) */ Negative = 128 } //#endregion //#region src/types/resources.d.ts /** * Binary resource type definitions * Converted from GaiaLib/Enum/BinType.cs */ export declare enum BinType { Bitmap = "Bitmap", Tilemap = "Tilemap", Tileset = "Tileset", Palette = "Palette", Sound = "Sound", Music = "Music", Meta17 = "Meta17", Spritemap = "Spritemap", Assembly = "Assembly", Patch = "Patch", Transform = "Transform", Binary = "Binary" } //#endregion //#region src/types/transforms.d.ts /** * Transform type definitions * Converted from GaiaLib/Enum/XformType.cs */ export declare enum XformType { Lookup = "Lookup", Replace = "Replace" } /** * Transform definition * Converted from GaiaLib/Types/XformDef.cs */ export interface XformDef { type: XformType; key?: string; value?: string; keyIx?: number; valueIx?: number; } //#endregion //#region src/database/files.d.ts export declare class DbFile { name: string; type: string; start: number; end: number; compressed?: boolean; upper?: boolean; group?: string; scene?: string; base?: number; struct?: string; constructor(data: Partial); } export declare class DbFileType { name: string; extension: string; type: string; isPatch: boolean; isBlock: boolean; header: number; compressed?: boolean; struct?: string; base?: number; upper?: boolean; constructor(data: Partial); } //#endregion //#region src/database/parts.d.ts /** * Database part definition * Converted from GaiaLib/Database/DbPart.cs */ export declare class DbPart { name?: string; start: number; end: number; type?: string; order?: number; constructor(data: Partial); } //#endregion //#region src/database/transforms.d.ts export declare class DbTransform { key: string; value: string; constructor(data: Partial); } //#endregion //#region src/database/blocks.d.ts /** * Database block definition * Converted from GaiaLib/Database/DbBlock.cs */ export declare class DbBlock { name: string; movable: boolean; group?: string; scene?: string; parts: DbPart[]; transforms?: DbTransform[]; postProcess?: string; order?: number; base?: number; location: number; constructor(data: Partial); } //#endregion //#region src/types/compression.d.ts /** * Interface for compression providers */ export interface ICompressionProvider { /** * Expand (decompress) data * @param srcData Source data buffer * @param srcPosition Starting position in source data * @param srcLen Length of source data to process * @returns Expanded data */ expand(srcData: Uint8Array, srcPosition?: number, srcLen?: number): Uint8Array; /** * Compact (compress) data * @param srcData Source data to compress * @returns Compressed data */ compact(srcData: Uint8Array, srcPosition?: number, srcLen?: number): Uint8Array; } //#endregion //#region src/database/entrypoints.d.ts /** * Database entry point definition * Converted from GaiaLib/Database/DbEntryPoint.cs */ export interface DbEntryPoint { location: number; name: string; } //#endregion //#region src/database/config.d.ts /** * Database configuration * Converted from GaiaLib/Database/DbConfig.cs */ export interface DbConfig { sfxLocation: number; sfxCount: number; sfxType: string; sfxPack: string; compression: string; uncompress: boolean; entryPoints: DbEntryPoint[]; memoryMode: MemoryMapMode; cpuMode: CpuMode; chipset: number; ramSize: number; defaultBank?: number; oddLocationBase?: number; oddLocationSpan?: number; emitLineTracking?: boolean; } //#endregion //#region src/database/structs.d.ts /** * Database structure definition * Converted from GaiaLib/Database/DbStruct.cs */ export declare class DbStruct { name: string; types?: string[]; parent?: string; delimiter?: number; discriminator?: number; discriminatorLogic?: string; discriminatorSize?: number; null?: number; tail?: number; constructor(data: Partial); } //#endregion //#region src/database/addressingMode.d.ts export declare class DbAddressingMode { name: string; shorthand: string; operands: string[]; size: number; formatString?: string; parseRegex?: string; instructions: Record; constructor(data: Partial); } //#endregion //#region src/database/strings.d.ts /** * Database string command definition * Converted from GaiaLib/Database/DbStringCommand.cs */ export declare class DbStringCommand { id: number; name: string; types: string[]; delimiter?: number; halt: boolean; dictionary?: DbStringDictionary; newline: boolean; constructor(data: Partial); } /** * Database string layer definition * Converted from GaiaLib/Database/DbStringLayer.cs */ export interface DbStringLayer { base?: number; range?: number; on?: number; shiftBit?: number; map: string[]; } export declare class DbStringDictionary { base?: number; command?: number; commandName?: string; name: string; entries: string[]; constructor(data: Partial); } /** * Database string type definition * Converted from GaiaLib/Database/DbStringType.cs */ export declare class DbStringType { name: string; delimiter: string; terminator: number; commands: Record; commandLookup: Record; layers: DbStringLayer[]; greedyTerminator: boolean; dictionaries: Record; dictionaryLookup: { text: string; id: number; }[]; modifiers?: Record>; constructor(data: Partial); } //#endregion //#region src/database/cop.d.ts /** * COP instruction definition * Converted from GaiaLib/Database/CopDef.cs */ export declare class CopDef { id: number; name: string; parts: string[]; halt: boolean; conditions?: CopCondition[]; constructor(data: Partial); } export interface CopCondition { offset: number; value: number; parts: string[]; logic?: string; } //#endregion //#region src/database/opcode.d.ts export declare class OpCode { code: number; mnem: string; mode: string; constructor(code: number, mnem: string, mode: string); } //#endregion //#region src/database/assets.d.ts export interface DbAsset { index: number; type: string; file: string; scene: string; meta: any; } //#endregion //#region src/database/scenes.d.ts export declare class DbScene { name: string; id: number; description?: string; assets: DbAsset[]; constructor(data: Partial); } //#endregion //#region src/database/groups.d.ts export declare class DbGroup { name: string; prefix: string; description?: string; scenes: Record; constructor(data: Partial); } //#endregion //#region src/static/types.d.ts /** * Lightweight summary loaded on page init. * Contains only what the UI needs before the user clicks "Build ROM". */ export interface PackageSummary { projectName: string; version: string; notes: string[]; modules: any[]; crc: number; fileTypes: Record>; packageHash: string; } /** * File entry in the static ROM package. * Text files carry their content in `text`; binary files use base64-encoded `data`. */ export interface PackageFileEntry { name: string; type: string; text?: string; data?: string; module?: string; } //#endregion //#region src/database/modules.d.ts export interface DbGameRomModule { projectFiles?: PackageFileEntry[]; baseRomFiles?: PackageFileEntry[]; mnemonics: Record; overrides: Record>; rewrites: Record; blocks: Record>>; files: Record>>>; config: DbConfig; labels: Record; structs: Record; copdef: Record>; strings: Record>; transforms: Record[]>; addrModes: Record>; headers: Partial[]; groups: Record>; fileTypes: Record>; names?: Record; types?: Record; comments?: Record; blockNotes?: Record; partNotes?: Record; } //#endregion //#region src/database/header.d.ts export declare class DbHeader { bank: number; address: number; condition?: string; parts: DbHeaderPart[]; constructor(data: Partial); } export declare class DbHeaderPart { name: string; size: number; type: string; value?: any; constructor(data: Partial); } //#endregion //#region src/database/root.d.ts /** * Main database root class * Converted from GaiaLib/Database/DbRoot.cs */ export interface DbRoot { copDef: Record; copLookup: Record; mnemonics: Record; mnemonicsLookup: Record; structs: Record; stringTypes: Record; stringDelimiters: string[]; stringDelimiterLookup: Record; headers: DbHeader[]; files: DbFile[]; config: DbConfig; blocks: DbBlock[]; overrides: Record>; labels: Record; rewrites: Record; entryPoints: DbEntryPoint[]; opCodes: Record; opLookup: Record; addrLookup: Record; compression?: ICompressionProvider; baseRomFiles?: ChunkFile[]; projectFiles?: ChunkFile[]; groups: Record; scenes: Record; fileTypes: Record; fileExtLookup: Record; names: Record; comments: Record; blockNotes: Record; partNotes: Record; types: Record; } /** * Database root utilities */ export declare class DbRootUtils { /** * JSON serialization options */ static fromGameModule(module: DbGameRomModule): DbRoot; static applyFolder(root: DbRoot, folderPath: string, sourceFiles?: ChunkFile[], group?: string): Promise; static extractAllContent(root: DbRoot, romPath: string, outPath: string): Promise; static rebuildAllContent(root: DbRoot, inPath: string[], outPath: string): Promise<{ masterLookup: Record; files: ChunkFile[]; header: any; romData: Uint8Array; }>; } //#endregion //#region src/database/labels.d.ts /** * Database label definition * Converted from GaiaLib/Database/DbLabel.cs */ export interface DbLabel { location: number; label: string; } //#endregion //#region src/database/mnemonics.d.ts /** * Database mnemonic definition * Converted from GaiaLib/Database/DbMnemonic.cs */ export interface DbMnemonic { key: number; value: string; metadata?: string; } //#endregion //#region src/database/overrides.d.ts export declare class DbOverride { location: number; register: string; value: number; constructor(values: Partial); } //#endregion //#region src/database/paths.d.ts /** * Database path configuration * Converted from GaiaLib/Database/DbPath.cs */ export interface DbPath { folder: string; extension: string; } /** * Creates a default DbPath */ export declare function createDbPath(folder?: string, extension?: string): DbPath; //#endregion //#region src/database/rewrites.d.ts /** * Database rewrite rule definition * Converted from GaiaLib/Database/DbRewrite.cs */ export interface DbRewrite { location: number; value: number; } //#endregion //#region src/database/sfx.d.ts /** * Database sound effect definition * Converted from GaiaLib/Database/DbSfx.cs */ export interface DbSfx { location: number; size: number; names: string[]; } //#endregion //#region src/rom/extraction/references.d.ts /** * Manages references, chunks, and markers during ROM analysis * Converted from GaiaLib/Rom/Extraction/ReferenceManager.cs */ export declare class ReferenceManager { readonly structTable: Map; readonly markerTable: Map; readonly nameTable: Map; readonly fileTable: Map; private readonly root; constructor(root: DbRoot); tryGetStruct(location: number): { found: boolean; chunkType?: string; rawType?: string; isSoft?: boolean; isRaw?: boolean; }; tryAddStruct(location: number, chunkType: string): boolean; containsStruct(location: number): boolean; tryGetName(location: number): { found: boolean; referenceName?: string; isSoft?: boolean; }; tryAddName(location: number, referenceName: string): boolean; tryGetMarker(location: number): { found: boolean; offset?: number; }; setMarker(location: number, offset: number): void; createBranchLabel(location: number): string; createTypeName(type: string, location: number): string; createFallbackName(location: number): string; /** * Finds a reference location by its assigned name. */ findLocationByName(name: string): number | undefined; resolveName(location: number, type: AddressType, isBranch: boolean, block?: ChunkFile): string; findClosestReference(location: number): { name: string; label: string; location: number; } | undefined; processClosestMatch(location: number, closestLocation: number): string; } //#endregion //#region src/types/files.d.ts /** * Chunk file for ROM processing * Converted from GaiaLib/Types/ChunkFile.cs */ export declare class ChunkFile { name: string; size: number; location: number; type: DbFileType; parts?: AsmBlock[]; includes?: Set; includeLookup?: Record; bank?: number; compressed?: boolean; upper?: boolean; rawData?: Uint8Array | null; textData?: string; transforms?: { key: string; value: string; }[]; postProcess?: string; mnemonics: Record; group?: string; scene?: string; base?: number; referenceManager?: ReferenceManager; isFile: boolean; struct?: string; sizeHeader?: number; constructor(type: DbFileType, name: string, size?: number, location?: number); enrichWithRawDataFromDbFile(file: DbFile, rom: Uint8Array, compression: ICompressionProvider | undefined): void; enrichWithAsmBlocksFromDbBlock(block: DbBlock, memoryMode: MemoryMapMode): void; } export declare function combineHeader(data: Uint8Array, position: number, length: number, header: Uint8Array | null, type: BinType): Uint8Array; /** * Chunk file utilities */ export declare class ChunkFileUtils { /** * Rebase blocks to a new location */ static rebase(chunkFile: ChunkFile, newLocation?: number): void; /** * Calculate the total size of all blocks */ static calculateSize(chunkFile: ChunkFile): number; /** * Check if a location is outside this block and return the part (matches C# IsOutside) * Returns [isOutside, part] where part is the part containing the location */ static isOutsideWithPart(root: ChunkFile[], block: ChunkFile, location: number): [boolean, ChunkFile | null, AsmBlock | null]; /** * Check if a location is inside this block and return the part (matches C# IsInside) * Returns [isInside, part] where part is the part containing the location */ static isInsideWithPart(block: ChunkFile, location: number): [boolean, AsmBlock | null]; /** * Check if a location is outside this block (shorthand version) */ static isOutside(block: ChunkFile, location: number): boolean; /** * Check if a location is inside this block (shorthand version) */ static isInside(block: ChunkFile, location: number): boolean; /** * Get all included blocks */ static getIncludes(chunkFile: ChunkFile): ChunkFile[]; } //#endregion //#region src/types/assembly.d.ts /** * Represents a single assembly operation/instruction */ export declare class Op extends OpCode { location: number; operands: unknown[]; size: number; copDef?: CopDef; constructor(code: OpCode, location?: number, operands?: unknown[], size?: number); } /** * Represents a block of assembly code or data */ export declare class AsmBlock { label?: string; location: number; size: number; objList: any[]; structName?: string; includes?: Set<{ block: ChunkFile; part: AsmBlock; }>; file: ChunkFile; constructor(file: ChunkFile, location?: number, size?: number, label?: string, structName?: string); } /** * Database part utilities */ export declare class AsmBlockUtils { /** * Check if a location is inside this part */ static isInside(part: AsmBlock, location: number): boolean; /** * Check if a location is outside this part */ static isOutside(part: AsmBlock, location: number): boolean; } //#endregion //#region src/types/bitstream.d.ts /** * Bit stream for reading/writing binary data at bit level * Converted from GaiaLib/Types/BitStream.cs */ export declare class BitStream { private static readonly NIBBLE_MASK; private static readonly NIBBLE_PERFECT_POSITION; private data; private position; private bitFlag; private writeSample; constructor(data: Uint8Array, position?: number); get dataArray(): Uint8Array; get currentPosition(): number; set currentPosition(value: number); /** * Read a byte from the stream * @returns The byte read, or -1 if the end of the data has been reached */ readByte(): number; /** * Read a ushort from the stream (ignores the current bit flag) * @returns The short read, or -1 if the end of the data has been reached */ readShort(): number; /** * Read a bit from the stream * @returns True if the current bit at bitFlag is set, false otherwise */ readBit(): boolean; /** * Read a nibble from the stream * @returns The nibble read, or -1 if the end of the data has been reached */ readNibble(): number; /** * Write a bit to the stream * @param set True if the current bit should be set, false otherwise */ writeBit(set: boolean): void; /** * Write a byte to the stream * @param value The byte to write */ writeByte(value: number): void; /** * Write a nibble to the stream * @param value The nibble to write */ writeNibble(value: number): void; flush(): void; } //#endregion //#region src/types/compression-registry.d.ts /** * Registry for compression providers * Allows registration of compression implementations by string ID */ export declare class CompressionRegistry { private static providers; /** * Register a compression provider * @param id String identifier for the compression type * @param factory Factory function that creates the compression provider */ static register(id: string, factory: () => ICompressionProvider): void; /** * Get a compression provider by ID * @param id String identifier for the compression type * @returns Compression provider instance */ static get(id: string): ICompressionProvider; /** * Check if a compression provider is registered * @param id String identifier for the compression type * @returns True if provider is registered */ static has(id: string): boolean; /** * Get list of registered provider IDs * @returns Array of registered provider IDs */ static getRegisteredIds(): string[]; /** * Clear all registered providers (mainly for testing) */ static clear(): void; } //#endregion //#region src/types/constants.d.ts /** * ROM processing constants * Converted from GaiaLib/Types/RomProcessingConstants.cs */ export declare class RomProcessingConstants { static readonly PAGE_SIZE = 32768; static readonly SNES_HEADER_SIZE = 80; static readonly DICTIONARIES: string[]; static readonly DICT_COMMANDS: number[]; static readonly END_CHARS: number[]; static readonly WHITESPACE: string[]; static readonly OPERATORS: string[]; static readonly COMMA_SPACE: string[]; static readonly ADDRESS_SPACE: string[]; static readonly SYMBOL_SPACE: string[]; static readonly LABEL_SPACE: string[]; static readonly OBJECT_SPACE: string[]; static readonly COP_SPLIT_CHARS: string[]; static readonly OVERRIDE_CHARS: string[]; static readonly WHITESPACE_REGEX: RegExp; static readonly COMMA_SPACE_REGEX: RegExp; static readonly SYMBOL_SPACE_REGEX: RegExp; static readonly LABEL_SPACE_REGEX: RegExp; static readonly OBJECT_SPACE_REGEX: RegExp; static readonly ADDRESS_SPACE_REGEX: RegExp; static readonly COP_SPLIT_REGEX: RegExp; static readonly COMMA_SPACE_TRIM_REGEX: RegExp; static readonly IS_WINDOWS: boolean; static readonly NEWLINE: string; static stripMarkers(name: string): { raw: string; name: string; isSoft: boolean; isRaw: boolean; }; /** * Gets the size of an object for processing purposes * @param obj The object to get the size for * @returns Size in bytes * @throws Error when unable to determine size */ static getSize(obj: unknown): number; } /** * BlockReader specific constants */ export declare class BlockReaderConstants { static readonly REF_SEARCH_MAX_RANGE = 896; static readonly BANK_MASK_CHECK = 64; static readonly BYTE_DELIMITER_THRESHOLD = 256; static readonly BANK_HIGH_MEMORY_1 = 126; static readonly BANK_HIGH_MEMORY_2 = 127; static readonly POINTER_CHARACTERS: string[]; static readonly BINARY_TYPE = "Binary"; static readonly CODE_TYPE = "Code"; static readonly MARKER_FORMAT = "+M"; } //#endregion //#region src/types/location.d.ts /** * Location wrapper for additional metadata * Converted from GaiaLib/Types/LocationWrapper.cs */ export declare class LocationWrapper { location: number; type: AddressType; constructor(location: number, type: AddressType); } //#endregion //#region src/types/strings.d.ts /** * String marker for positioning * Converted from GaiaLib/Types/StringMarker.cs */ export interface StringMarker { offset: number; } /** * String wrapper with type and location information * Converted from GaiaLib/Types/StringWrapper.cs */ export interface StringWrapper { string: string; type: DbStringType; marker: number; location: number; fixedSize: number; isRaw: boolean; } /** * String entry (commented out in original C# code) * Converted from GaiaLib/Types/StringEntry.cs */ export interface StringEntry { block: AsmBlock; index: number; size: number; data: Uint8Array; } /** * String size comparer utility * Converted from GaiaLib/Types/StringSizeComparer.cs */ export declare class StringSizeComparer { /** * Compare two strings by length */ static compare(a: string, b: string): number; /** * Compare two StringWrapper objects by string length */ static compareWrappers(a: StringWrapper, b: StringWrapper): number; } //#endregion //#region src/types/structs.d.ts /** * Structure definition * Converted from GaiaLib/Types/StructDef.cs */ export interface StructDef { name: string; parts: unknown[]; location: number; } //#endregion //#region src/types/tables.d.ts export declare class TableEntry { location: number; object: unknown; name?: string; constructor(location: number, object?: unknown, name?: string); } //#endregion //#region src/types/operands.d.ts export declare class TypedNumber { value: number; size: number; isDelimiter?: boolean; constructor(value: number, size: number, isDelimiter?: boolean); } export declare class Byte extends TypedNumber { constructor(value: number, isDelimiter?: boolean); } export declare class Word extends TypedNumber { constructor(value: number, isDelimiter?: boolean); } export declare class Long extends TypedNumber { constructor(value: number); } //#endregion //#region src/assembly/Registers.d.ts /** * Manages the 65816 processor registers and status flags */ export declare class Registers { value: Record; stack: Stack; mode: MemoryMapMode; constructor(mode: MemoryMapMode); } //#endregion //#region src/rom/extraction/processor.d.ts export declare class MapExt extends Map { constructor(); tryAdd(key: K, value: V): boolean; setFlag(key: K, flag: number, value?: boolean): void; clearFlag(key: K, flag: number): void; } /** * Manages CPU processor state during ROM analysis * Converted from GaiaLib/Rom/Extraction/ProcessorStateManager.cs */ export declare class ProcessorStateManager { readonly stackPositions: MapExt; private readonly _buckets; get(key: string): MapExt; /** * Hydrate processor registers with stored state * Uses Registers from gaia-core/assembly for processor state management */ hydrateRegisters(position: number, reg: Registers): void; getStackPosition(location: number): number | undefined; setStackPosition(location: number, value: number): void; tryAddStackPosition(location: number, value: number): boolean; } //#endregion //#region src/rom/extraction/reader.d.ts /** * Provides low-level ROM data reading functionality * Converted from GaiaLib/Rom/Extraction/RomDataReader.cs */ export declare class RomDataReader { romData: Uint8Array; position: number; offset?: number; constructor(romData: Uint8Array, offset?: number); readByte(): number; readSByte(): number; readUShort(): number; readShort(): number; readAddress(): number; readInt(): number; peekByte(): number; peekShort(): number; peekAddress(): number; } //#endregion //#region src/rom/extraction/strings.d.ts /** * Reads and processes strings from ROM data * Converted from GaiaLib/Rom/Extraction/StringReader.cs */ export declare class StringReader { static readonly STRING_REFERENCE_CHARACTERS: string[]; private readonly _blockReader; private readonly _romDataReader; constructor(blockReader: BlockReader); private resolveCommand; parseString(stringType: DbStringType, fixedSize: number, isRaw: boolean): StringWrapper; resolveString(sw: StringWrapper, isBranch: boolean): void; } //#endregion //#region src/rom/extraction/asm.d.ts /** * Parses assembly instructions from ROM data, handling different addressing modes * and maintaining CPU register state during analysis. * Converted from GaiaLib/Rom/Extraction/AsmReader.cs */ export declare class AsmReader { private static readonly STATUS_OP_MASK; private static readonly STATUS_OP_VALUE; private static readonly ACCUMULATOR_OP_MASK; private static readonly ACCUMULATOR_OP_VALUE; static readonly VARIABLE_SIZE_INDICATOR = -2; private readonly _blockReader; private readonly _transformProcessor; private readonly _addressingModeHandler; private readonly _romDataReader; constructor(blockReader: BlockReader); parseAsm(reg: Registers): Op; clearDestinationRegister(code: OpCode, reg: Registers): void; private initializeOperation; private calculateInstructionSize; } //#endregion //#region src/rom/extraction/parser.d.ts /** * Handles parsing of different data types from ROM * Converted from GaiaLib/Rom/Extraction/TypeParser.cs */ export declare class TypeParser { private readonly _blockReader; private readonly _romDataReader; private readonly _stringReader; private readonly _stringTypes; private readonly _referenceManager; constructor(blockReader: BlockReader); parseType(typeName: string, reg: Registers | null, depth: number, bank?: number, single?: boolean): unknown; static tryParseMemberType(memberTypeName: string): MemberType | null; private parseWordSafe; private parseBinary; private parseLocation; private parseCode; } //#endregion //#region src/rom/extraction/blocks.d.ts /** * Central class for reading and analyzing ROM blocks * Converted from GaiaLib/Rom/Extraction/BlockReader.cs */ export declare class BlockReader { private static readonly REF_SEARCH_MAX_RANGE; private static readonly BANK_MASK_CHECK; private static readonly BYTE_DELIMITER_THRESHOLD; private static readonly BANK_HIGH_MEMORY_1; private static readonly BANK_HIGH_MEMORY_2; private static readonly POINTER_CHARACTERS; private static readonly LOCATION_REGEX; readonly _root: DbRoot; readonly _stringReader: StringReader; readonly _asmReader: AsmReader; _typeParser: TypeParser; _romDataReader: RomDataReader; readonly _stateManager: ProcessorStateManager; _referenceManager: ReferenceManager; _transformProcessor: TransformProcessor; _partEnd: number; _currentChunk: ChunkFile | null; _currentAsmBlock: AsmBlock | null; _enrichedChunks: ChunkFile[]; constructor(romData: Uint8Array, root: DbRoot); /** * Processes predefined overrides for registers and bank notes */ private initializeOverrides; /** * Processes predefined file references */ /** * Resolves mnemonic for a given address */ resolveMnemonic(addr: Address, emitAll: boolean): void; /** * Resolves name for a location (delegated to ReferenceManager) */ /** * Resolves include for a location */ resolveInclude(loc: number, isBranch: boolean): void; /** * Notes a type at a location and manages chunk references */ noteType(loc: number, type: string, silent?: boolean, reg?: Registers): string; updateRegisterState(loc: number, reg: Registers): void; /** * Checks if a delimiter has been reached */ delimiterReached(delimiter?: number): boolean; /** * Checks if processing of the current part can continue */ partCanContinue(): boolean; analyzeAndResolve(): ChunkFile[]; /** * Analyzes all blocks in the ROM */ /** * Initializes blocks and parts with base references */ private initializeBlocksAndParts; /** * Processes a single part */ processPart(part: AsmBlock): void; /** * Processes a continuous entry (same type as previous) */ private processContinuousEntry; /** * Processes a new entry */ private processNewEntry; /** * Creates ChunkFile objects from database structure */ private createChunkFilesFromDatabase; /** * Creates binary ChunkFiles from DbFiles (enriched with rawData) */ private createChunkFilesFromSfx; /** * Creates binary ChunkFiles from DbFiles (enriched with rawData) */ private createChunkFilesFromDbFiles; /** * Creates assembly ChunkFiles from DbBlocks (enriched with parts) */ private createChunkFilesFromDbBlocks; /** * Analyzes only assembly ChunkFiles (those with parts from DbBlocks) */ private analyzeChunkFiles; /** * Resolves references in assembly ChunkFiles only */ private resolveReferences; /** * Resolves a single object and its references */ private resolveObject; /** * Resolves references in an operation object */ private resolveOperationObject; /** * Checks if an operation is a branch operation */ private isBranchOperation; /** * Hydrates registers with stored state */ hydrateRegisters(reg: Registers): void; } //#endregion //#region src/rom/extraction/transforms.d.ts /** * Handles transform processing for assembly instructions * Converted from GaiaLib/Rom/Extraction/TransformProcessor.cs */ export declare class TransformProcessor { private readonly _blockReader; private readonly _romDataReader; private readonly _referenceManager; private readonly _labelLookup; private static readonly LOCATION_REGEX; constructor(romReader: BlockReader); /** * Retrieves transform information for the current ROM position */ getTransform(): string | undefined; /** * Applies transforms to operands */ applyTransforms(op1Label: string | undefined, op2Label: string | undefined, operands: any[]): void; applyTransform(transform: string | undefined, operand: any | undefined): any; private cleanTransformName; private resolveTransformReference; } //#endregion //#region src/rom/extraction/addressing.d.ts /** * Context information for an operation being processed * Converted from GaiaLib/Rom/Extraction/AsmReader.cs OperationContext */ export declare class OperationContext { size: number; nextAddress: number; xForm1: string | undefined; xForm2: string | undefined; copDef: CopDef | null; } /** * Handles different addressing modes for assembly instructions * Converted from GaiaLib/Rom/Extraction/AddressingModeHandler.cs */ export declare class AddressingModeHandler { private readonly _blockReader; private readonly _transformProcessor; private readonly _copProcessor; private readonly _dataReader; constructor(blockReader: BlockReader, transformProcessor: TransformProcessor); processAddressingMode(code: OpCode, context: OperationContext, reg: Registers): unknown[]; private handleImmediateMode; private readImmediateOperand; private updateRegisterForImmediateInstruction; private calculateRegisterValue; private handleAbsoluteLongMode; private handleBlockMoveMode; private handleDirectPageMode; private handlePCRelativeMode; private handleStackRelativeMode; private handleStackInterruptMode; private handleStackOrImpliedMode; private handleAbsoluteMode; private isJumpInstruction; private isPushInstruction; } //#endregion //#region src/rom/extraction/stack.d.ts /** * Handles stack operations for various stack-related instructions * Converted from GaiaLib/Rom/Extraction/StackOperations.cs */ export declare class StackOperations { private readonly _registers; private readonly _blockReader; constructor(registers: Registers, blockReader: BlockReader); handleStackOperation(mnemonic: string): void; private handleAccumulatorPush; private handleAccumulatorPull; private handleXIndexPush; private handleXIndexPull; private handleYIndexPush; private handleYIndexPull; private handleExchangeBytes; } //#endregion //#region src/rom/extraction/cop.d.ts /** * Handles COP (Coprocessor) command processing * Converted from GaiaLib/Rom/Extraction/CopCommandProcessor.cs */ export declare class CopCommandProcessor { private readonly _blockReader; private readonly _romDataReader; private readonly _transformProcessor; constructor(blockReader: BlockReader, transformProcessor: TransformProcessor); /** * Parses a COP command based on its definition */ parseCopCommand(copDef: CopDef, operands: unknown[], reg: Registers): void; private tryParseMemberType; private getMemberTypeSize; private readMemberTypeValue; private createCopLocation; private tryParseAddressType; } //#endregion //#region src/rom/extraction/writer.d.ts export declare enum ObjectType { TableEntryArray = "TableEntryArray", StructDef = "StructDef", OpArray = "OpArray", LocationWrapper = "LocationWrapper", Address = "Address", StringWrapper = "StringWrapper", ByteArray = "ByteArray", Array = "Array", String = "String", Number = "Number", TypedNumber = "TypedNumber" } export declare class BlockWriter { private _root; private _blockReader; private _referenceManager; private _postProcessor; private _isInline; private _currentPart; private _currentBlock; constructor(reader: BlockReader); generateAllAsm(chunkFiles: ChunkFile[]): any[]; generateAsm(block: ChunkFile): string; private getMnemonicsForBlock; private resolveOperand; private getObjectType; private writeObject; private writeTableEntryArray; private writeStructDef; private writeOpArray; private formatDefaultOperand; private writeStringWrapper; private writeArray; private writeNumber; private formatTypedNumber; private writeTypedNumber; private formatOperand; } //#endregion //#region src/rom/extraction/postprocessor.d.ts /** * Handles post processing of extracted blocks. * Mirrors functionality of GaiaLib.Rom.Extraction.PostProcessor. */ export declare class PostProcessor { private readonly _referenceManager; constructor(reader: BlockReader); /** * Execute post process directive on a block if present. */ process(block: ChunkFile): void; /** * Builds a lookup table from struct entries. * Equivalent to PostProcessor.Lookup in C# implementation. */ Lookup(block: ChunkFile, keyIx: string, valueIx: string, maxId: string): void; Label(block: ChunkFile, structType: string, listName?: string): void; Extract(block: ChunkFile, valueIndexString: string): void; } //#endregion //#region src/rom/rebuild/layout.d.ts /** * ROM layout planner * Converted from ext/GaiaLib/Rom/Rebuild/RomLayout.cs */ export declare class RomLayout { private static readonly MIN_ACCEPTED_REMAINING; readonly unmatchedFiles: ChunkFile[]; private readonly bestResult; private readonly bestSample; private currentBank; private currentUpper; private bestDepth; private bestOffset; private bestRemain; private root; private config; private sfxPackType; readonly srcFiles: ChunkFile[]; readonly sfxFiles: ChunkFile[]; constructor(files: ChunkFile[], root: DbRoot); organize(): number; private testDepth; private commitPage; } //#endregion //#region src/rom/rebuild/writer.d.ts /** * ROM writer (binary) * Converted from ext/GaiaLib/Rom/Rebuild/RomWriter.cs (subset: binary write only) */ export declare class RomWriter { bpsPath?: string; outBuffer?: Uint8Array; private romSize?; readonly root: DbRoot; constructor(root: DbRoot); repack(files: ChunkFile[], modules?: string[]): Promise<{ masterLookup: Record; files: ChunkFile[]; header: any; romData: Uint8Array; }>; allocate(pages: number): void; writeHeaders(masterLookup: Record): any; prepareHeaderValues(): any; writeHeader(header: DbHeader, values: any, masterLookup: Record): void; writeChecksum(values: any): void; writeEntryPoints(asmFiles: ChunkFile[]): void; writeFile(file: ChunkFile, fileLookup: Record): Promise; private writeAscii; /** * Parse assembly blocks and write binary data to output buffer * Converted from ext/GaiaLib/Rom/Rebuild/RomWriter.cs ParseAssembly method */ static parseAssembly(root: DbRoot, blocks: AsmBlock[], fileLookup: Record, includeLookup: Record, outBuffer: Uint8Array, addrOffset?: number): void; /** * Helper method to find index of any character from an array in a string */ static indexOfAny(str: string, chars: string[]): number; /** * Helper method to check if an object is a StringMarker */ static isStringMarker(obj: unknown): obj is StringMarker; static isTableEntry(obj: unknown): obj is TableEntry; } //#endregion //#region src/rom/rebuild/processor.d.ts /** * ROM rebuild processor * Converted from ext/GaiaLib/Rom/Rebuild/RomProcessor.cs */ export declare class RomProcessor { private readonly writer; constructor(writer: RomWriter); repack(allFiles: ChunkFile[], modules?: string[]): Promise>; static applyPatches(asmFiles: ChunkFile[], patches: ChunkFile[], masterLookup: Record): void; } //#endregion //#region src/rom/rebuild/string-processor.d.ts /** * String processor for assembly parsing * Converted from GaiaLib/Rom/Rebuild/StringProcessor.cs */ export declare class StringProcessor { private memBuffer; private totalSize; private fixedStr; private readonly context; private readonly root; private readonly stringCharLookup; private readonly testRegex; private inShift; constructor(context: Assembler); consumeString(typeChar: string): void; private flushBuffer; private processString; private processStringCommand; } //#endregion //#region src/rom/rebuild/assembler.d.ts /** * Main assembler class for parsing assembly files * Converted from GaiaLib/Rom/Rebuild/Assembler.cs */ export declare class Assembler { readonly root: DbRoot; private readonly lines; currentLineIndex: number; readonly stringProcessor: StringProcessor; file: ChunkFile; lineBuffer: string; includes: Set; blocks: AsmBlock[]; tags: Record; currentBlock?: AsmBlock; lineCount: number; lastDelimiter?: number; reqBank?: number; eof: boolean; strDelimRegex: RegExp; conditionFiles: string[]; private inCondition; private exitCondition; private failCondition; constructor(dbRoot: DbRoot, file: ChunkFile, conditionFiles: string[]); parseAssembly(): { blocks: AsmBlock[]; includes: Set; reqBank?: number; }; getLine(): boolean; private trimComments; private processDirectives; private processTags; parseOperand(opnd: string): unknown; processRawData(): void; private hexStringToBytes; } //#endregion //#region src/rom/rebuild/assembler-state.d.ts /** * Assembler state machine for processing assembly text * Converted from GaiaLib/Rom/Rebuild/AssemblerState.cs */ export declare class AssemblerState { private readonly dbStruct?; private readonly parentStruct?; private readonly root; private readonly discriminator?; private readonly discriminatorLogic?; private readonly discriminatorSize; private delimiter?; private memberOffset; private dataOffset; private readonly memberTypes?; private currentType?; private readonly context; private readonly openTag?; constructor(context: Assembler, structType?: string, openTag?: string, saveDelimiter?: boolean); private checkDisc; private advancePart; private static doMath; private tryCreateLabel; processText(): void; private hexStringToBytes; } //#endregion //#region src/rom/rebuild/sorted-map.d.ts /** * A map that sorts keys by length in descending order, then alphabetically * This is used for tag replacement where longer tags should be replaced first * to avoid conflicts (e.g., "ABCD" should be replaced before "ABC") */ export declare class SortedMap { private map; private _keys; get size(): number; set(key: string, value: V): this; get(key: string): V | undefined; has(key: string): boolean; delete(key: string): boolean; clear(): void; keys(): string[]; values(): V[]; entries(): [string, V][]; [Symbol.iterator](): Generator<[string, V], void, unknown>; private sortKeys; } //#endregion //#region src/rom/generator.d.ts export declare class RomGenerator { readonly projectName: string; readonly crc: number; dbRoot: DbRoot; private sourceData; constructor(projectName: string, crc: number); validateAndLoad(sourceData: Uint8Array, gameModule: DbGameRomModule, baseRomPath: string, modulePath: string): Promise; validateAndLoadFromUrl(sourceData: Uint8Array, packageUrl: string, packageHash?: string): Promise; generateProject(modules: string[], manualFiles?: ChunkFile[], unshiftManualFiles?: boolean): Promise; private applyProjectInit; applyPatchFile(chunkFile: ChunkFile, chunkFiles: ChunkFile[], asmFiles: ChunkFile[], patchFiles: ChunkFile[]): void; } //#endregion //#region src/compression/QuintetLZ.d.ts /** * QuintetLZ compression algorithm implementation * Dictionary-based compression used in Quintet games */ export declare class QuintetLZ implements ICompressionProvider { static readonly DICTIONARY_SIZE = 256; static readonly DICTIONARY_INIT = 32; static readonly DICTIONARY_OFFSET = 239; private static readonly DEFAULT_PAGE_SIZE; /** * Expand (decompress) data using QuintetLZ algorithm * @param srcData Source data buffer * @param srcPosition Starting position in source data * @param srcLen Length of source data to process * @returns Expanded data */ expand(srcData: Uint8Array, srcPosition?: number, srcLen?: number): Uint8Array; /** * Compact (compress) data using QuintetLZ algorithm * @param srcData Source data to compress * @returns Compressed data */ compact(srcData: Uint8Array, srcPosition?: number, srcLen?: number): Uint8Array; } //#endregion //#region src/compression/index.d.ts export declare const CompressionAlgorithms: Record ICompressionProvider>; //#endregion //#region src/sprites/SpriteFrame.d.ts /** * Represents a single frame in a sprite animation sequence */ export declare class SpriteFrame { duration: number; groupIndex: number; /** * Internal offset to the group data (not serialized) */ groupOffset: number; constructor(duration?: number, groupIndex?: number, groupOffset?: number); } //#endregion //#region src/sprites/SpritePart.d.ts /** * Represents a single part/piece of a sprite */ export declare class SpritePart { isLarge: boolean; xOffset: number; xOffsetMirror: number; yOffset: number; yOffsetMirror: number; vMirror: boolean; hMirror: boolean; someOffset: number; paletteIndex: number; tileIndex: number; constructor(); } //#endregion //#region src/sprites/SpriteGroup.d.ts /** * Represents a group of sprite parts that form a complete sprite frame */ export declare class SpriteGroup { xOffset: number; xOffsetMirror: number; yOffset: number; yOffsetMirror: number; xRecoilHitboxOffset: number; yRecoilHitboxOffset: number; xRecoilHitboxTilesize: number; yRecoilHitboxTilesize: number; xHostileHitboxOffset: number; xHostileHitboxSize: number; yHostileHitboxOffset: number; yHostileHitboxSize: number; parts: SpritePart[]; constructor(); } //#endregion //#region src/sprites/SpriteMap.d.ts /** * Represents a complete sprite map with frame sets and groups */ export declare class SpriteMap { frameSets: SpriteFrame[][]; groups: SpriteGroup[]; constructor(); /** * Create a SpriteMap from binary data * @param data Binary data buffer * @returns SpriteMap instance */ static fromBytes(data: Uint8Array): SpriteMap; /** * Convert this SpriteMap to binary data * @returns Binary data buffer */ toBytes(): Uint8Array; } //#endregion //#region src/project/config.d.ts /** * Project configuration types * TODO: Implement comprehensive project configuration */ export interface ProjectConfig { name: string; version: string; description?: string; } //#endregion //#region src/collaboration/index.d.ts /** * Collaboration types and utilities * TODO: Implement collaboration functionality */ export interface CollaborationConfig { enabled: boolean; } //#endregion //#region src/static/package-loader.d.ts /** * Fetch the lightweight summary from a static package URL. * Appends a timestamp query param to bypass browser/CDN caching so the * summary (and its embedded `packageHash`) is always fresh. * * @param baseUrl - Base URL where the static package is hosted (e.g. '/data' or 'https://example.com/data') * @returns PackageSummary with project name, version, modules, CRC, fileTypes, packageHash */ export declare function summaryFromPackageUrl(baseUrl: string): Promise; /** * Fetch the full ROM package from a static URL and assemble a DbGameRomModule. * * When a `packageHash` is provided (from the summary), it is appended as a * query param so the browser cache invalidates whenever the content changes. * * Binary file data stored as base64 strings is decoded to Uint8Array. * * @param baseUrl - Base URL where the static package is hosted (e.g. '/data' or 'https://example.com/data') * @param packageHash - Content hash from PackageSummary.packageHash for cache-busting * @returns DbGameRomModule ready for use with DbRootUtils.fromGameModule() */ export declare function fromPackageUrl(baseUrl: string, packageHash?: string): Promise; //#endregion //#region src/utils/file.d.ts /** * Universal file reading utilities * Works in both Node.js and browser environments */ export interface FileReadOptions { encoding?: 'utf8' | 'binary'; } /** * Read a file as text * @param path File path or URL * @param options Read options * @returns Promise */ export declare function readFileAsText(path: string, options?: FileReadOptions): Promise; /** * Read a file as binary data (Uint8Array) * @param path File path or URL * @returns Promise */ export declare function readFileAsBinary(path: string): Promise; /** * Read a JSON file and parse it * @param path File path or URL * @returns Promise */ export declare function readJsonFile(path: string): Promise; /** * Check if a file exists * @param path File path * @returns Promise */ export declare function fileExists(path: string): Promise; /** * Get the directory path containing a file * @param filePath File path * @returns string */ export declare function getDirectory(filePath: string): Promise; /** * Create a temporary directory. * This is a Node.js-specific operation. * @param prefix Prefix for the temporary directory name. * @returns Promise Path to the created temporary directory. */ export declare function createTempDirectory(prefix: string): Promise; /** * Remove a directory recursively. * This is a Node.js-specific operation. * @param dirPath Path to the directory to remove. * @returns Promise */ export declare function removeDirectory(dirPath: string): Promise; export interface DirectoryEntry { name: string; path: string; extension: string | null; isDirectory: boolean; isFile: boolean; } /** * List directory contents * This is a Node.js-specific operation. * @param dirPath Path to the directory to list * @param options Options for filtering and recursion * @returns Promise */ export declare function listDirectory(dirPath: string, options?: { recursive?: boolean; filter?: (entry: DirectoryEntry) => boolean; extension?: string; }): Promise; /** * Save text content to a file * This is a Node.js-specific operation. * @param path File path where to save the content * @param text Text content to save * @returns Promise */ export declare function saveFileAsText(path: string, text: string): Promise; /** * Save binary data to a file * This is a Node.js-specific operation. * @param path File path where to save the data * @param data Binary data as Uint8Array to save * @returns Promise */ export declare function saveFileAsBinary(path: string, data: Uint8Array): Promise; //#endregion //#region src/utils/crc.d.ts export declare function crc32_buffer(data: Uint8Array): number; export declare function crc32_text_utf8(text: string): number; export declare function crc32_text_utf16(text: string): number; //#endregion //#region src/utils/base64.d.ts /** * Base64 encoding and decoding utilities for Uint8Arrays * Works in both Node.js and browser environments */ /** * Encode a Uint8Array to a base64 string * @param data The binary data to encode * @returns Base64 encoded string */ export declare function encodeBase64(data: Uint8Array): string; /** * Decode a base64 string to a Uint8Array * @param base64String The base64 string to decode * @returns Decoded binary data as Uint8Array * @throws {Error} If the input is not a valid base64 string */ export declare function decodeBase64(base64String: string): Uint8Array; /** * Check if a string is valid base64 * @param str The string to validate * @returns True if the string is valid base64, false otherwise */ export declare function isValidBase64(str: string): boolean; /** * Encode a string to base64 (convenience function) * @param text The text string to encode * @returns Base64 encoded string */ export declare function encodeBase64String(text: string): string; /** * Decode a base64 string to text (convenience function) * @param base64String The base64 string to decode * @returns Decoded text string * @throws {Error} If the input is not a valid base64 string or doesn't contain valid UTF-8 */ export declare function decodeBase64String(base64String: string): string; //#endregion //#region src/utils/index.d.ts /** * Convert bytes to hex string */ export declare function bytesToHex(bytes: Uint8Array): string; /** * Convert hex string to bytes */ export declare function hexToBytes(hex: string): Uint8Array; /** * Clamp a value between min and max */ export declare function clamp(value: number, min: number, max: number): number; /** * Convert binary data (Uint8Array) to UTF-8 string representation * * This function properly decodes UTF-8 encoded binary data to avoid corruption * of special characters and multi-byte sequences. * * @param binaryData - The binary data as Uint8Array containing UTF-8 encoded text * @returns The decoded UTF-8 string * @throws {Error} If the binary data contains invalid UTF-8 sequences * * @example * ```typescript * const binaryData = new Uint8Array([72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100]); * const text = binaryToUtf8String(binaryData); * console.log(text); // "Hello World" * * // Handle UTF-8 multi-byte characters * const utf8Data = new Uint8Array([240, 159, 152, 128]); // 😀 emoji * const emoji = binaryToUtf8String(utf8Data); * console.log(emoji); // "😀" * ``` */ export declare function binaryToUtf8String(binaryData: Uint8Array): string; /** * Safely get nested object property */ export declare function getNestedProperty(obj: any, path: string): any; export declare function indexOfAny(str: string, chars: string[], startIndex?: number): number; //#endregion //#region src/index.d.ts export declare const snes: { addressingModes: { Absolute: { shorthand: string; operands: string[]; size: number; formatString: string; parseRegex: string; instructions: { ADC: number; AND: number; ASL: number; BIT: number; CMP: number; CPX: number; CPY: number; DEC: number; EOR: number; INC: number; JMP: number; JSR: number; LDA: number; LDX: number; LDY: number; LSR: number; ORA: number; PEA: number; ROL: number; ROR: number; SBC: number; STA: number; STX: number; STY: number; STZ: number; TRB: number; TSB: number; }; }; AbsoluteIndexedX: { shorthand: string; operands: string[]; size: number; formatString: string; parseRegex: string; instructions: { ADC: number; AND: number; ASL: number; BIT: number; CMP: number; DEC: number; EOR: number; INC: number; LDA: number; LDY: number; LSR: number; ORA: number; ROL: number; ROR: number; SBC: number; STA: number; STZ: number; }; }; AbsoluteIndexedY: { shorthand: string; operands: string[]; size: number; formatString: string; parseRegex: string; instructions: { ADC: number; AND: number; CMP: number; EOR: number; LDA: number; LDX: number; ORA: number; SBC: number; STA: number; }; }; AbsoluteIndirect: { shorthand: string; operands: string[]; size: number; formatString: string; parseRegex: string; instructions: { JMP: number; }; }; AbsoluteIndirectLong: { shorthand: string; operands: string[]; size: number; formatString: string; parseRegex: string; instructions: { JML: number; }; }; AbsoluteIndexedIndirect: { shorthand: string; operands: string[]; size: number; formatString: string; parseRegex: string; instructions: { JMP: number; JSR: number; }; }; AbsoluteLong: { shorthand: string; operands: string[]; size: number; formatString: string; parseRegex: string; instructions: { ADC: number; AND: number; CMP: number; EOR: number; JML: number; JSL: number; LDA: number; ORA: number; SBC: number; STA: number; }; }; AbsoluteLongIndexedX: { shorthand: string; operands: string[]; size: number; formatString: string; parseRegex: string; instructions: { ADC: number; AND: number; CMP: number; EOR: number; LDA: number; ORA: number; SBC: number; STA: number; }; }; DirectPage: { shorthand: string; operands: string[]; size: number; formatString: string; parseRegex: string; instructions: { ADC: number; AND: number; ASL: number; BIT: number; CMP: number; CPX: number; CPY: number; DEC: number; EOR: number; INC: number; LDA: number; LDX: number; LDY: number; LSR: number; ORA: number; ROL: number; ROR: number; SBC: number; STA: number; STX: number; STY: number; STZ: number; TRB: number; TSB: number; }; }; DirectPageIndexedX: { shorthand: string; operands: string[]; size: number; formatString: string; parseRegex: string; instructions: { ADC: number; AND: number; ASL: number; BIT: number; CMP: number; DEC: number; EOR: number; INC: number; LDA: number; LDY: number; LSR: number; ORA: number; ROL: number; ROR: number; SBC: number; STA: number; STY: number; STZ: number; }; }; DirectPageIndexedY: { shorthand: string; operands: string[]; size: number; formatString: string; parseRegex: string; instructions: { LDX: number; STX: number; }; }; DirectPageIndirect: { shorthand: string; operands: string[]; size: number; formatString: string; parseRegex: string; instructions: { ADC: number; AND: number; CMP: number; EOR: number; LDA: number; ORA: number; PEI: number; SBC: number; STA: number; }; }; DirectPageIndirectLong: { shorthand: string; operands: string[]; size: number; formatString: string; parseRegex: string; instructions: { ADC: number; AND: number; CMP: number; EOR: number; LDA: number; ORA: number; SBC: number; STA: number; }; }; DirectPageIndexedIndirectX: { shorthand: string; operands: string[]; size: number; formatString: string; parseRegex: string; instructions: { ADC: number; AND: number; CMP: number; EOR: number; LDA: number; ORA: number; SBC: number; STA: number; }; }; DirectPageIndirectIndexedY: { shorthand: string; operands: string[]; size: number; formatString: string; parseRegex: string; instructions: { ADC: number; AND: number; CMP: number; EOR: number; LDA: number; ORA: number; SBC: number; STA: number; }; }; DirectPageIndirectLongIndexedY: { shorthand: string; operands: string[]; size: number; formatString: string; parseRegex: string; instructions: { ADC: number; AND: number; CMP: number; EOR: number; LDA: number; ORA: number; SBC: number; STA: number; }; }; Immediate: { shorthand: string; operands: string[]; size: number; formatString: string; parseRegex: string; instructions: { ADC: number; AND: number; BIT: number; CMP: number; CPX: number; CPY: number; EOR: number; LDA: number; LDX: number; LDY: number; ORA: number; REP: number; SBC: number; SEP: number; }; }; Implied: { shorthand: string; operands: never[]; size: number; formatString: null; parseRegex: null; instructions: { CLC: number; CLD: number; CLI: number; CLV: number; DEX: number; DEY: number; INX: number; INY: number; NOP: number; SEC: number; SED: number; SEI: number; STP: number; TAX: number; TAY: number; TCD: number; TCS: number; TDC: number; TSC: number; TSX: number; TXA: number; TXS: number; TXY: number; TYA: number; TYX: number; WAI: number; WDM: number; XBA: number; XCE: number; }; }; Accumulator: { shorthand: string; operands: never[]; size: number; formatString: null; parseRegex: null; instructions: { ASL: number; DEC: number; INC: number; LSR: number; ROL: number; ROR: number; }; }; PCRelative: { shorthand: string; operands: string[]; size: number; formatString: string; parseRegex: string; instructions: { BPL: number; BMI: number; BRA: number; BCC: number; BCS: number; BNE: number; BEQ: number; BVC: number; BVS: number; }; }; PCRelativeLong: { shorthand: string; operands: string[]; size: number; formatString: string; parseRegex: string; instructions: { BRL: number; PER: number; }; }; StackRelative: { shorthand: string; operands: string[]; size: number; formatString: string; parseRegex: string; instructions: { ADC: number; AND: number; CMP: number; EOR: number; LDA: number; ORA: number; SBC: number; STA: number; }; }; StackRelativeIndirectIndexedY: { shorthand: string; operands: string[]; size: number; formatString: string; parseRegex: string; instructions: { ADC: number; AND: number; CMP: number; EOR: number; LDA: number; ORA: number; SBC: number; STA: number; }; }; BlockMove: { shorthand: string; operands: string[]; size: number; formatString: string; parseRegex: string; instructions: { MVN: number; MVP: number; }; }; StackInterrupt: { shorthand: string; operands: string[]; size: number; formatString: string; parseRegex: string; instructions: { BRK: number; COP: number; }; }; Stack: { shorthand: string; operands: never[]; size: number; formatString: null; parseRegex: null; instructions: { PHA: number; PHB: number; PHD: number; PHK: number; PHP: number; PHX: number; PHY: number; PLA: number; PLB: number; PLD: number; PLP: number; PLX: number; PLY: number; RTI: number; RTL: number; RTS: number; }; }; }; vectors: { "8448": string; "8449": string; "8450": string; "8451": string; "8452": string; "8453": string; "8454": string; "8455": string; "8456": string; "8457": string; "8458": string; "8459": string; "8460": string; "8461": string; "8462": string; "8463": string; "8464": string; "8465": string; "8466": string; "8467": string; "8468": string; "8469": string; "8470": string; "8471": string; "8472": string; "8473": string; "8474": string; "8475": string; "8476": string; "8477": string; "8478": string; "8479": string; "8480": string; "8481": string; "8482": string; "8483": string; "8484": string; "8485": string; "8486": string; "8487": string; "8488": string; "8489": string; "8490": string; "8491": string; "8492": string; "8493": string; "8494": string; "8495": string; "8496": string; "8497": string; "8498": string; "8499": string; "8500": string; "8501": string; "8502": string; "8503": string; "8504": string; "8505": string; "8506": string; "8507": string; "8508": string; "8509": string; "8510": string; "8511": string; "8512": string; "8513": string; "8514": string; "8515": string; "8576": string; "8577": string; "8578": string; "8579": string; "16406": string; "16407": string; "16896": string; "16897": string; "16898": string; "16899": string; "16900": string; "16901": string; "16902": string; "16903": string; "16904": string; "16905": string; "16906": string; "16907": string; "16908": string; "16909": string; "16912": string; "16913": string; "16914": string; "16915": string; "16916": string; "16917": string; "16918": string; "16919": string; "16920": string; "16921": string; "16922": string; "16923": string; "16924": string; "16925": string; "16926": string; "16927": string; "17152": string; "17153": string; "17154": string; "17155": string; "17156": string; "17157": string; "17158": string; "17159": string; "17160": string; "17161": string; "17162": string; "17168": string; "17169": string; "17170": string; "17171": string; "17172": string; "17173": string; "17174": string; "17175": string; "17176": string; "17177": string; "17178": string; "17184": string; "17185": string; "17186": string; "17187": string; "17188": string; "17189": string; "17190": string; "17191": string; "17192": string; "17193": string; "17194": string; "17200": string; "17201": string; "17202": string; "17203": string; "17204": string; "17205": string; "17206": string; "17207": string; "17208": string; "17209": string; "17210": string; "17216": string; "17217": string; "17218": string; "17219": string; "17220": string; "17221": string; "17222": string; "17223": string; "17224": string; "17225": string; "17226": string; "17232": string; "17233": string; "17234": string; "17235": string; "17236": string; "17237": string; "17238": string; "17239": string; "17240": string; "17241": string; "17242": string; "17248": string; "17249": string; "17250": string; "17251": string; "17252": string; "17253": string; "17254": string; "17255": string; "17256": string; "17257": string; "17258": string; "17264": string; "17265": string; "17266": string; "17267": string; "17268": string; "17269": string; "17270": string; "17271": string; "17272": string; "17273": string; "17274": string; }; headers: ({ address: number; condition: string; parts: ({ name: string; size: number; type: string; value?: undefined; } | { name: string; size: number; type: string; value: number; })[]; } | { address: number; parts: ({ name: string; size: number; type: string; value?: undefined; } | { name: string; size: number; type: string; value: number; })[]; condition?: undefined; })[]; }; export declare const isPlatformNode: string | false; //#endregion //# sourceMappingURL=index.d.cts.map