Watcher

The Watcher

The Watcher window shows the registers and some places in memory, and follows them while the machine runs. Open it with Tools > Watcher in the main window, or with Watcher under the Tools button over the listing.

  1. CPU - the registers, in hex or decimal as in the CPU panel. IFF1 and IFF2 are shown as marks.

  2. MEMORY - the watches, two rows each.

  3. The four memory banks, from #0000 to #C000: ROM or RAM, and the page.

In the picture, the game Exolon is running, with a file of labels loaded for it. AMMO is its ammo counter: the first byte, 63, is 99 rounds. VITORC + 0x60 is the second frame of its hero’s sprite. SP is the stack, and [SP] is the code the routine will return to. 0x3D00 is the start of the font in ROM.

Right-click the MEMORY list and choose Add watcher to add a watch, or Delete watcher to remove the selected one. Double-click a watch to change it.

The Watcher Editor

The Watcher Editor has:

  • Type - CPU addr reads memory through the current CPU mapping. RAM addr and ROM addr read physical memory. In a physical watch, a label gives its page as well as its offset;

  • Expression - an address, in the same syntax as a condition (see Conditions): HL, 0x5C3A, IX + 5, [0x5C53], a label. The button beside it opens the list of labels, and the label you pick there goes into the field.

OK accepts the watch only if the expression is correct. The first row of a watch shows its type, its expression and its value as an address, written the same way as the Debugger’s other addresses (see Hex or decimal). The second row shows the 16 bytes that start at that address, in groups of four. ?? means the expression cannot be worked out at the moment.

On the Next, a label in a CPU addr watch follows MMU paging. If its page is not mapped, the watch shows ??. A RAM addr watch still reads the label’s own RAM page.

The watches are not kept when Xpeccy+ closes.

Watched ports

The PORTS block of the MEMMAP panel shows the last value on the ports you choose. See Watched ports.