Memory map


 
Following on from Friday's architecture overview, here are a few important way-points for  the cartographers out there.

 $d279 - Workspace RAM
 $d3a8 - Handle unconstrained trace of instructions
 $d3bb - Handle trace to non-EXEC instruction
 $d3db - Handle trace to subroutine exit
 $d408 - Breakpoint entry points
 $d466 - Common breakpoint handling
 $d482 - Unconditional trap entry point
 $d491 - Main action button entry point
 $d4c8 - Debugger screen definition data
 $d575 - Interactive main loop
 $d588 - Controller input routines
 $d6df - User input handler jump table
 $d649 - Handle run to breakpoint
 $d64c - Handle unconstrained run
 $d674 - Handle clear current field
 $d67a - Handle increment current field
 $d6c0 - Handle decrement current field
 $d6c9 - Handle hex input to current field
 $d6d5 - Store / read values in cached field
 $d704 - Handle disc press screen flip
 $d714 - Handle focussed field increment
 $d721 - Handle focussed field decrement
 $d72e - Debugger state dispatch table
 $d747 - Handle single step instruction
 $d748 - Execute a single instruction
 $d893 - Capture post instruction CPU state
 $d93e - Controller input support functions
 $d9ee - Draw the debugger screen
 $da7a - Write a 1 bit value to the screen
 $da82 - Write a 4 character mnemonic to the screen
 $da9f - Instruction mnemonics
 $db87 - Write a 16 bit hex value to the screen
 $dba7 - Write a 4 bit hex value to the screen
 $dbb7 - Parse a mnemonic and write it to the screen
 $dd9f - Flip between game and debugger screens
 $ddbb - ISR / VBLANK functions

Something to note here is the amount of memory devoted to the execution of a single instruction (502 decles) and the decoding and display of the instruction mnemonics (488 decles of code, 232 decles of mnemonic data).  Together these two aspects amount to nearly half of the debugger's code and standing data.

Comments