Menu: Tools → Debugger / Disassembler → Debugger / Disassembler
When opening this menu item you enter one of the most powerful coding tools of Emu64. The Debugger / Disassembler. The debugger lets the coder see the different states of registers and connections while the program is running. The disassembler translates the machine code present in the RAM to assembly so that the code is easier to understand.
Coders need these functions to search for bugs and to understand the inner workings of a program. It is useful to know the C64 hardware inside out and a lot of assembly. You can write your assembly code within this screen and test it at the same time. The debugger features an intuitive workflow and you don't have to learn any codes or mnemonics.
This window is parted into 8 areas. You can open 5 more information windows and you can switch mode between C64 and Floppy 1541.
The upper pull down menu (A) lets you switch the modes between C64 and Floppy 1541 mode. When switching the mode the display changes accordingly. You can use the buttons (G) and (H) to minimize parts of the debugger window to have a better view. You can use the buttons (B), (C), (D), (E) and (F) to open more small windows with special information about the states of the custom chips VIC, SID, CIA 1, CIA 2 and IEC-BUS. You can close these small windows by clicking the Symbol (X) in the upper right of the window.
Area (1) of the debugger window
Depending on the settings in the pull down menu (A) the possible registers of C64 or Floppy are shown.
You can change the registers from PC to SR as you want. As soon as you click on a number behind the register the input field is activated. Now you can enter the values as decimal-, hexadecimal-($) or dualnumber(%). You acknowledge your input with the RETURN key.
Change the state of a flag of the register by clicking on the according LED.
Processor state - Register |
---|
N = Negative |
V = Overflow |
/ = unused (should be high all the time) |
B = Break |
D = Decimal |
I = Interrupt |
Z = Zero |
C = Carry |
Area (2) of the debugger window
This area is interesting if you want to check a program cycle exact. You can see what will happen on the next cycle. You can't change things here. The LED „CPU Wait“ shows that the CPU is blocked by the VIC.
The Micro Code is my invention, this mean every C64 command consists of Micro Code. Every cycle a micro code command is executed. The green area shows what the micro code does.
As there are different processors used within the C64 II (6510) and the 1541-II (6502) the display of the CPU internal registers changes according to the mode set in (A).
Area (3) of the debugger window
You can control how the program is executed.
exactly one Cycle is done
exactly one Opcode is executed
the program is executed while all changes are shown.
Stops the execution of the program.
Use the slider control to set a value for the cycles per second between 1 and 59901. This influences the animated speed in the debugger window.
Area (4) of the debugger window
Depending on the mode you selected the most important states of the connections to the CPU 6502 or CPU 6510 (low or high) are displayed.
Area (5) of the debugger window
This area of the debugger window is the disassembler. The displayed memory area is shown as disasslembly.
The memory addresses are in the first column, the second column is for the Opcodes (illegal opcodes are shown in red) and the third column is for the content (Value / Address) of the opcode.
Use the slider control to change the part if the memory you can see ($0000 to $FFFF).
Use the three input fields to write opcodes directly into memory.
You can open a context menu within the disassembler / Assembler window area. This window has the following options:
Display list from… | enter the memory address where the display should start. |
---|---|
Export | Enter the start and end value which you want to export as .TXT, .PRG or .RAW file. |
Mark start | marks the startpoint for the export. |
Mark end | marks the endpoint for the export. |
Area (6) of the debugger window
This part of the debugger window lets you activate and deactivate breakpoints per context menu. If you added a breakpoint matrix you can change the values by clicking on the numbers. An input field is activated for this and you have to acknowledge your input with the RETURN key. You can freely choose the name of the breakpoint.
Area (7) of the debugger window
The last 100 PC values are saved within the program counter. You can open a context menu in this area too, while the export function is about the disassembler / assembler area.
Area(8) of the debugger window
The last area of the debugger window features a memory monitor and more status displays. The status display is only active while in C64 mode, otherwise it is not visible. The status display shows the read and write access to RAM, LO-RAM, HI-RAM, Kernel-ROM, BASIC-ROM, Char-ROM and I/O block. You can manipulate data in the memory area. The two input fields below are used to enter memory address and value. If the option Auto Address is activated the address in the value input field is increased by one after pressing the RETURN key. There is also a context menu to export memory ranges. You define the memory range by the start and end address and then you can export it as .TXT, .PRG or .RAW file.
Button (B) of the debugger window
This function is not available yet.
It is planned to make the state of the Video Interface Chip visible via an extra window.
Button (C) of the debugger window
This function is not available yet.
It is planned to make the state of the Sound Interface Device visible via an extra window.
Button (D) and (e) of the debugger window
Every C64 has two built in CIA blocks that control most of the I/O tasks and also contain the internal timer (the clock) of the computer. When you click on either the CIA1 button or the CIA2 button another window opens displaying more information about the CIA chip. You can not change values or states within this window.
Button (F) of the debugger window
You activate this status window by clicking the IEC BUS button. Only the most important connections of the IEC bus are displayed. As soon as the C64 or the floppy use one of the shown connections the LED next to it lights up in green.
Signalname | Signaldescription |
---|---|
DATA Serial Data In/Out | The data is transfered on this connection bit by bit one after the other. When sending one byte the lowest bit 0 (LSB) is transfered first and the higher bit 7 (MSB) last. |
CLK Serial Clock In/Out | This signal is the tact for the data transfered. The sending machine generates the tact. On a rising edge the databit (DATA) is accepted by the receiver. |
ATN Serial Attention In/Out | If this signal is LOW and a byte is sent the devices connected to the serial bus interpret this as a command. As soon as the C64 sets the signal to LOW all other devices on the bus wait for a transmission of their address (device number). The addressed device has to answer within a set time, otherwise the C64 concludes the device is not present and sends an error. After sending the device address the secondary address is sent, the line stays on low in that time. Before the first normal byte is sent it switches to HIGH. |
When calling the debugger / Disassembler the raster ray position is shown on the C64 screen since the C64.dll patch to V4.32.
Emu64 Help V4.xx Navigation
V4.xx: Table of Content
Portal: old-archiv
help text for Emu64 up to version 4.32.