Z80: IO Breakpoint/watchpoint mask defaults to 0xFF

Change-Id: Ifbe37871ad9cee29fedc81f967149dc058ab3648
This commit is contained in:
David Banks 2021-03-20 17:21:03 +00:00
parent 97a1e9ad74
commit 0e6a31360f
1 changed files with 8 additions and 0 deletions

View File

@ -453,6 +453,10 @@ modes_t modes[MAXBKPTS];
#define WATCH_EXEC 9
#define TRANSIENT 10
// Mask to test if the breakpoint/watchpoint is a Z80 IO
#if defined(CPU_Z80)
#define MASK_IO ((1 << BRKPT_IO_READ) | (1 << WATCH_IO_READ) | (1 << BRKPT_IO_WRITE) | (1 << WATCH_IO_WRITE))
#endif
static const char MODE0[] PROGMEM = "Mem Rd Brkpt";
static const char MODE1[] PROGMEM = "Mem Rd Watch";
@ -1228,7 +1232,11 @@ void clearBreakpoint(bknum_t n) {
void genericBreakpoint(char *params, unsigned int mode) {
bknum_t i;
addr_t addr;
#if defined(CPU_Z80)
addr_t mask = (mode & MASK_IO) ? 0xFF : 0xFFFF;
#else
addr_t mask = 0xFFFF;
#endif
trigger_t trigger = TRIGGER_UNDEFINED;
params = parsehex4required(params, &addr);
if (checkargs(params)) {