Code Trace: Code View

The Code View displays programs in assembly format.
When a ROM file is loaded, a preliminary analysis is performed to display the assembly code. However, detailed analysis is conducted during execution, and the results are reflected in the Code View when the program is paused.
(For cases like writing commands to RAM and executing them, analysis cannot be performed until the actual execution.)


How to Display the Code View

  1. Open the settings view by selecting “Setting” → “Setting” from the menu.
  2. In the settings view, check “Code” under the “Window” tab to display the Code View.

Screen Features

  • Displays both the ROM area (0x000000–0x400000) and the RAM area (0xff0000–0xffffff) in sequence.
  • You can also view data values in the RAM area on this screen.

Operations

1. Stop the Program:

  • Press the “F6” key in the Code View or select “Trace” → “Stop”.

2. Resume Execution:

  • Press the “F5” key in the Code View or select “Trace” → “Run”.

3. Execute Step In:

  • Press the “F8” key in the Code View or select “Trace” → “Step In”.
    • Step In: Executes the next instruction. If the next instruction calls a function, execution stops at the first instruction of that function.

4. Execute Step Over:

  • Press the “F7” key in the Code View or select “Trace” → “Step Over”.
    • Step Over: Executes the next instruction. If the next instruction calls a function, execution skips the function and stops at the instruction following the call.

5. Stop at the Start of VDP’s Frame Rendering (1/60 seconds):

  • Press “Ctrl + F5”.

Setting Breakpoints

  • Set Breakpoint:
    Click the right edge of a line in the Code View or press “F9”. A “BK” marker appears, and execution will stop at this instruction.
  • Remove Breakpoint:
    Click the right edge again or press “F9” to remove the “BK” marker.

Working with Jump Instructions

1. Display Jump Destination:

  • Click on a jump instruction (e.g., JMP) in the Code View to show the destination with an arrow.

2. Move to Jump Destination:

  • Double-click a jump instruction to move the display to the destination.

Search Functions

1. Display a Specific Address:

  • Enter a hexadecimal address in the “address” field of the Code View to navigate to the instruction at that address.

2. Search for Commands Accessing VDP or Joystick:

  • Use the “comment1” dropdown list in the Code View to select a target.
    • This displays a list of command addresses. Clicking an address navigates to that command in the Code View.
    • Double-clicking an address both navigates to the command and sets a breakpoint (“BK”) there.
      (Note: Commands not yet executed are excluded from the search, as analysis is required.)

3. Stop on Memory Access or Modification:

  • Enter a hexadecimal address in the “memory monitoring” field and select a mode:
    • “read”: Stops on read access.
    • “write”: Stops on write access.
    • “read/write”: Stops on both.

Special Features

1. Stop at the Program’s First Instruction:

  • In the settings view, check “First Step Break” under the “Trace” tab.
    On the next execution (or after pressing F12 for a hard reset), the program will stop at the first instruction.

2. Skip Interrupt Processing:

  • Check “Skip interrupt processing” in the “Trace” tab of the settings view to prevent the program from stopping during interrupt processing.