|
www.icons8.com |
With breakpoint actions can be triggered at given conditions.
Conditions can be logical AND which means that more then one condition has to be true within an CPU instruction to trigger the action.
Possible conditions values:
CPU.C | CPU Clock Cycle |
CPU.A | Accumulator |
CPU.X | X-Register |
CPU.Y | Y-Register |
CPU.SP | Stackpointer |
CPU.PC | Programcounter |
CPU.IRQ | Interruptmask |
CPU.MRD | CPU Read the given data from bus |
CPU.MWD | CPU Write the given data from bus |
CPU.MRA | CPU Read access to the given address |
CPU.MWA | CPU Write access to the given address |
CPU.F.V | Overflow Flag (1=Set, 0=Cleared) |
CPU.F.I | Interrupt Flag (1=Set, 0=Cleared) |
CPU.F.N | Negative Flag (1=Set, 0=Cleared) |
CPU.F.Z | Zero Flag (1=Set, 0=Cleared) |
CPU.F.C | Carry Flag (1=Set, 0=Cleared) |
CPU.F.D | Decimal Flag (1=Set, 0=Cleared) |
VIC.RL | Rasterline started (Use value 0 for start of frame) |
VIC.IRQ | VIC interrupt set mask |
1541.TRACK | Current Track (0... including half tracks) |
1541.SYNC | Sync mark (1=Sync, 0=Data) |
1541.WRITE | Head mode (1=Writing, 0=Reading) |
Possible comparision:
= | Equal |
<> | Not equal |
> | Greater |
< | Less |
>= | Greater or equal |
<= | Less or equal |
AND | Bitwise AND |
NAND | Bitwise NAND |
MOD | Modulo not equal 0 |
NMOD | Modulo equals 0 |
Triggers are activated, when a condition is true or a value is not 0 (e.g. "CPU.A AND $10").
Possible actions are:
DO | Executes any console command or batch file. |
INFO | Trace an information with the given text |
WARN | Trace a warning with the given text |
ERROR | Trace an error with the given text |
BREAK | Pause the system |
Setting a breakpoint can be done within the Debugger or with the console command "BS"(breakpoint set).
The format is as follows:
BS <number> <condition> [condition]* [DO|INFO|WARN|ERROR|BREAK <command or text>] [ONCE] [SILENT] [DISABLE]
Using the CPU.Mxx conditions is quit tricky, because theses condition values check the read/write access to the data and address bus within the complete execution of one CPU instruction.
The following is the code of Commando, where the joystick is read from CIA:
We want to break execution, when any joystick contact is closed:
BS 1 "CPU.PC = $0FB2" "CPU.A <> $7F" BREAK SILENT
When you want to break, whenever a read access to the Joystick CIA port is done, just set a breakpoint as follows:
BS 2 "CPU.MRA = $DC00" "CPU.A <> $7F" BREAK SILENT
Note that this breakpoint is not bound to a specific execution address, so it will not be displayed in disassembly.