The Breakpoints Window

The Breakpoints window displays all current breakpoints, their type, pass count and any associated conditions. The Address displayed also indicates which area of memory or the Input/Output range the breakpoint is in.

All breakpoints can be given a Pass Count and Condition by double-clicking in the appropriate column in this window. The Count displays the number of times the breakpoint has been valid. If a pass count has not been set the breakpoint will interrupt the emulation every time, but if a pass count has been set this will also show the pass count so you can keep track of how many passes have occurred so far, and the emulation will not be interrupted until the valid count reaches the set pass count. See Breakpoint Properties for more information.

There are three types of Breakpoint:

Code Breakpoints

Code Breakpoints can be set using the Disassembler Pane of the debugger, or from assembler source code in the Assembler. Since the CPC memory map allows blocks of 16K to be switched in and out, the address shown is always relative to the start of the actual block in which the breakpoint was set. For example, a breakpoint set at #C006 in an Upper ROM would show as 0006:Upper n.

Memory Breakpoints

Memory Breakpoints can be set by selecting a section of memory in the Memory Dump Pane of the debugger, then clicking either Breakpoint on Read or Breakpoint on Write. They are similar to code breakpoints except they will only occur when the selected area of memory is read from or written to.

The variables address, value and previous can be used within memory breakpoint conditions to determine which address in the range was read or written, the value read or written, and the previous value in the case of a memory write.

Input/Output Breakpoints

Input/Output Breakpoints allow the emulation to be interrupted when a particular device is read from or written to. They can be set using the Add button on the Breakpoints Window, which will present the following screen:

On this screen, you can easily select from one of the predefined port mappings by selecting the device using the combo box, or you can select User Defined Port and enter your own Port value and Mask. The Port is a 4 digit hex I/O port address and can be entered using the X character to represent any value, automatically specifying the appropriate Mask. For example, entering BCXX will automatically enter a mask of FF00.

For user defined port mappings you must also specify either Input, Output or both. The Breakpoint Condition and Pass Count can also be set here, see Breakpoint Properties for more information.

Input/Output breakpoints also have access to the address and value variables to determine the exact port being read or written and the value read or written.