Mednafen Debugger Documentation

Valid as of version 0.7.0


Quick Key Reference

KeyAction
ALT+1CPU debugger view.
ALT+2Graphics viewer.
CPU Debugger
RRun
SStep
ReturnEdit disassembly address, or edit selected register.
SHIFT+ReturnEdit watch address.
SpaceToggle opcode breakpoint on selected disassembly address.
SHIFT+REdit read breakpoints.
SHIFT+WEdit write breakpoints.
CTRL+SHIFT+REdit I/O read breakpoints(for PC-FX).
CTRL+SHIFT+WEdit I/O write breakpoints(for PC-FX).
CTRL+REdit Aux read breakpoints.
CTRL+WEdit Aux write breakpoints.
Up, Left, Right, Down, PageUp, PageDownSelect disassembly address or select register.
SHIFT + (Up, Left, Right, Down, PageUp, PageDown)Select watch address.
MToggle watch window between logical and physical(if available) addressing.
PPoke a value to memory.
DDump memory to file, using the CPU's logical memory map. Prefix the first address with a '*' to dump using physical addresses.
SHIFT + DDump memory to file, using the video processor's logical memory map.
SHIFT + PHigh-level poke a value to the underlying ROM or RAM.
Graphics Viewer
<Decrease palette bank number.
>Increase palette bank number.
Up, DownScroll up or down.
Left, RightSelect graphics layer.
-/+Select line number(not necessarily visible line number...) to decode graphics on.


Memory Poking

High-level poking will attempt to write the desired value to the underlying storage(ROM or RAM). Normal(low-level) poking will go through the same write handlers as the virtual CPU operates through.

The format for the string to enter when poking memory(highlevel or lowlevel), is "[*]address value [size]", with values in brackets being optional. Prefixing the address with a "*" will cause the address to be treated as a physical address, which is currently only meaningful on systems that have paging registers internal to the CPU, such as the PC Engine/TurboGrafx 16.

Read and Write Breakpoints

You may enter either a single address to break on, or a range. Read and write breakpoints operate on logical addresses, unless you prefix the address with a "*", or the first address in the case of a range. Multiple entries should be separated by one space character. Examples:

   2000-2007 4014 4015
   0000 1800 2300-23ff
   *1fe000
  
You may also use "segment:offset" form with absolute addresses with PC Engine emulation, such as:
   *ff:0000-ff:03ff
  
...which will cause a break on any writes to the VDC, including the ST0, ST1, ST2 instructions. Note that the offset is internally ANDed with 0x1FFF, so 0x2000 and 0x0000 would be equivalent offsets.

Aux Read and Write Breakpoints

Aux r/w breakpoints operate on secondary storage reads and writes.
PC-FX
00000-3FFFFKING Bank A/0
40000-7FFFFKING Bank B/1
80000-8FFFFVDC-A
90000-9FFFFVDC-B

PC Engine
0000-7FFFVDC
10000-17FFFVDC-B(SuperGrafx only!)