gdb-style debugger of SNES roms. Upon starting the application, you will be prompted with a shell. You can use help
to see the possible commands.
- Rustc 1.70.0+
cargo run filename
. You can apply the following command line arguments as well:
--no-check
: Skip the checksum check for target rom and write to memory directly.- This is useful for test roms of very basic ASM.
- This is NOT useful for retail ROMs, as the header and checksum are important to discern the mapping of the rom.
--no-debug
: Run the program without executing the debugger. Currently hard coded to enable.
The prefix $
is allowed wherever an address literal is found to identify a hex value.
-
help
orh
: Display the help screen. -
p $XXXXXX
: Print the byte and word values at address$XXXXXX
-
r
orc
: Run (or Continue) the application until the next breakpoint is reached, or the program terminates. -
q
,exit
,quit
: Terminate the application. -
Breakpoints
b
: Create a breakpoint at the current PC.b tag_name
: Create a breakpoint at the current PC, with the tag nametag_name
.
b +X
: Set a breakpoint at the current PC, plus an offset value.b tag_name+X
: Set a breakpoint at the value represented bytag_name
plus an offset value.
b $XXXXXX
: Create a breakpoint at absolute address$XXXXXX
.b $XXXXXX tag_name
: Create a breakpoint at absolute address$XXXXXX
with the tag nametag_name
b show
: Show all current breakpoints in a table, with tag names if applicable.b list
b del $XXXXXX
: Remove breakpoint at$XXXXXX
b del tag_name
: Remove breakpoint associated with tagtag_name
.
-
Watches
w $XXXXXX
: Watch for value changes at address X, and break if the value is modified.w $XXXXXX tag_name
Watch for value changes at absolute address$XXXXXX
with the tag nametag_name
-
Steps
step
: Execute the next instruction.step +X
Step a number of times from the current instruction.
-
Dump
- TBD; Dump sections of memory to a .bin file for analysis.
- TBD; Dump tags to an external file for re-use.
- Areas to start with:
loram
: 0x000000 - 0x3F1FFF+0x7E0000 - 0x7E1FFF (SNES LoRAM) to loram.bin in working dir.ppu
: 0x002000 - 0x3F3FFF (SNES PPU/APU) to apu.bin in working dir.controller
: 0x004000 - 0x3F41FF to controller.bincpu
: 0x004200 - 0x3F5FFF to cpu.binram
: 0x7E0000 - 0x7FFFFF to ram.bin (includes slice of loram)tags
: Dump tags to a text fileb
: Dump breakpoints to a text file
-
Load
- TBD: Load sections of memory from a .bin file for analysis.
- TBD; Load tags from an external file for re-use.
CPU Implementation: 2 out of 255 opcodes
Primary focus is: debugger implementation