snes-disassembler
Version:
A Super Nintendo (SNES) ROM disassembler for 65816 assembly
71 lines • 2.28 kB
TypeScript
/**
* SNES Reference Tables - Authoritative lookup data from snes-mcp-server
*
* This module provides comprehensive validation and reference data for:
* - 65816 instruction set with opcodes, cycles, and flags
* - SNES hardware registers with bit layouts and usage
* - Memory mapping and addressing modes
*
* Generated from snes-mcp-server for maximum accuracy
*/
export interface InstructionReference {
mnemonic: string;
opcode: number;
addressingMode: string;
bytes: number;
cycles: number;
flagsAffected?: string[];
description: string;
examples?: string[];
notes?: string[];
}
export declare const INSTRUCTION_REFERENCE: Record<number, InstructionReference>;
export interface RegisterReference {
address: number;
name: string;
description: string;
access: 'read' | 'write' | 'read/write';
category: 'ppu' | 'cpu' | 'apu' | 'dma';
bitLayout: Array<{
bit: number | string;
description: string;
values?: Record<string, string>;
}>;
notes?: string[];
examples?: string[];
}
export declare const REGISTER_REFERENCE: Record<number, RegisterReference>;
/**
* Validate an instruction against the reference database
*/
export declare function validateInstruction(opcode: number, expectedMnemonic?: string, expectedBytes?: number): {
isValid: boolean;
reference?: InstructionReference;
discrepancies: string[];
};
/**
* Validate a register access against the reference database
*/
export declare function validateRegister(address: number, operation: 'read' | 'write'): {
isValid: boolean;
reference?: RegisterReference;
warnings: string[];
};
/**
* Get register name and description for a given address
*/
export declare function getRegisterInfo(address: number): {
name?: string;
description?: string;
category?: string;
bitDescription?: string;
};
/**
* Generate enhanced instruction comment with reference data
*/
export declare function generateInstructionComment(opcode: number, _operand?: number): string;
/**
* Generate enhanced register comment with reference data
*/
export declare function generateRegisterComment(address: number, operation: 'read' | 'write'): string;
//# sourceMappingURL=snes-reference-tables.d.ts.map