Azayaka features a powerful console based debugger.
To use it, you must start Azayaka with --debug to have debug-mode enabled.
To enter debug-mode and enter a command you can press Ctrl+C to interrupt the emulator.
- A decimal number is written as is with no special prefix.
- A hexadecimal number is prefixed with $ or 0x.
- A binary number is prefixed with 0b.
- 8-bit registers: a, f, b, c, d, e, h and l.
- 16-bit registers: af, bc, de, hl, pc and sp.
A memory address can either be a constant value, or it can be retrieved from a register.
To actually get a value from the memory, the address must be enclosed in brackets("[]") or parenthesis("()").
A breakpoint is an address of a location in the program, that when reached, will alert the user and temporally halt execution of the program.
A watchpoint is an address of a location in the memory, that when changed, will alert the user and temporally halt execution of the program.
Each command has a long form, and an optional alias.
Command | Alias | Description |
---|---|---|
break | b | Add a breakpoint |
cartridge | cart | Prints information about the cartridge |
continue | c | Run until a breakpoint or watchpoint is triggered |
delete | d | Delete a breakpoint |
disassemble | dis | Disassemble an instruction |
help | h | Show a help message |
lcd | Prints information about the LCD | |
list | l | List breakpoints and watchpoints |
p | Print a value | |
quit | q | Quit the debugger |
registers | reg | Print the values of the registers |
step | s | Run the next instruction |
unwatch | u | Remove a watchpoint |
watch | w | Adds a watchpoint |
Adds a breakpoint by it's address.
Usage: break [Address]
Prints information about the cartridge.
Usage: cartridge
Run until a breakpoint or watchpoint is triggered.
Usage: continue
Removes a breakpoint by it's address, or removes all of the breakpoints.
Usage: delete [Address]
Disassembles an instruction by it's address.
Usage: disassemble [Address]
Shows a help message for a specific command or every command.
Usage: help [Command]
Prints information about the LCD.
Usage: lcd
Lists all of the breakpoints and watchpoints.
Usage: list
Prints the value of a register or a value in the memory.
Usage: print [Register name or Address]
Quits the debugger.
Usage: quit
Prints the values of the registers.
Usage: registers
Runs the next instruction.
Usage: step
Removes a watchpoint by it's address, or removes all of the watchpoints.
Usage: unwatch [Address]
Adds a watchpoint by it's address.
Usage: watch [Address]