Breakpoint Properties
All WinAPE Breakpoints can be given a Condition and/or Pass Count.
The Pass Count specifies a number of times the emulator can run past the breakpoint before the emulation is interrupted. If it is set, it is shown in the Breakpoints Window as count / pass count in the Count column.
The Condition field allows an expression to be entered which determines if the breakpoint will interrupt the emulation or not. If the expression evaluates to a non-zero value the emulation will be interrupted (if the pass count is reached if also set).
Breakpoint conditions can use register values (including the use of 8-bit portions of index registers, for example IYh or LX), comparisons (<, <=, =, >=, >), mathematical operators (+, -, *, /, mod, and, or, xor, not, =), decimal numbers, hexadecimal numbers prefixed by # or &, binary numbers prefixed by %, assembler symbols from the last code assembly, brackets ( and ). Conditions also have access to a number of pre-defined variables and functions.
Note: All operators are bitwise and not logical operators, for example,
4 and 2
will evaluate to zero, not #fffffffe
will evaluate to 1.
Breakpoint Variables
address | 1The address or port read or written for a Memory or Input/Output breakpoint. |
ay_select | The currently selected PSG (AY) register. |
cartridge_bank | The cartridge bank mapped to Lower ROM. |
crtc_select | The currently selected CRTC (6845) register. |
false | the value 0. |
fdc_motor | true if the floppy disc motor is turned on. |
lower_enabled | true if the Lower ROM is enabled |
mode | The currently selected screen MODE. |
mouse_buttons | The current state of mouse buttons. |
mouse_wheel | The current mouse wheel value. |
mouse_x | The current mouse horizontal value. |
mouse_y | The current mouse vertical value. |
palette_select | The currently selected palette register. |
ppi_a | The current PPI (8255) port A value. |
ppi_b | The current PPI (8255) port B value. |
ppi_c | The current PPI (8255) port C value. |
ppi_control | The current PPI (8255) control value. |
previous | 1The previous value in the memory location given by address in a Memory Write breakpoint. |
psg_select | The currently selected PSG (AY) register. |
ram_bank | The currently selected extended RAM bank. |
rtc_select | The currently selected Symbiface RTC register. |
secondary_rom | ASIC secondary ROM select register. |
tape_motor | true if the tape motor is turned on. |
true | The value #ffffffff. |
upper_enabled | true if the Upper ROM is enabled |
upper_rom | The currently selected Upper ROM. |
value | 1The value read or written for a Memory or Input/Output breakpoint. |
Breakpoint Functions
ay([register]) | Reads either the currently selected PSG (AY) register, or the one specified by register. |
byte(value) | The low-order (lease significant) byte of the given value. (Bits 0..7). |
crtc([register]) | Reads either the currently selected CRTC (6845) register, or the one specified by register |
ga_palette([pen[,value]]) | Gets the Gate Array palette value for either the currently selected pen, or the one specified by pen. If a value is also specified, the palette for the selected pen is set to the hardware ink in value. |
hibyte(value) | The high-order byte of the low-order word of the given value. (Bits 8..15). |
hiword(value) | The high-order (most significant) word of the given value. (Bits 16..31). |
palette(pen[,grb]) | Gets or sets the ASIC palette value for the given pen.(eg. palette(2) would return the value for pen 2, palette(3, #fff) would set pen 3 to white) |
peek(addr) | Reads the byte from current readable memory at the given address |
poke(addr{,n}) | Writes values into write memory at the
given address (eg. poke(#1000,#10,#20,#30) would place the values #10, #20
and #30 at address #1000) |
psg([register]) | Reads either the currently selected PSG (AY) register, or the one specified by register. |
reset_cycles([value]) | Resets the cycle count (T) in the main debugger window to either zero or the value specified. |
rtc([register]) | Reads either the currently selected Symbiface Real Time Clock register, or the one specified by register. |
timer_start([id]) | Starts or resets the Timer with the given id, or id of 0. Always returns 0. |
timer_stop([id]) | Stops the Timer with the given id and returns the number of cycles since the timer was started, up to a maximum of #ffff. |
word(value) | The low-order (least significant) word of the given value. (Bits 0..15). |