- [NEW] Added option for break on interrupt

This commit is contained in:
2024-12-11 16:38:40 +01:00
parent 231bb1f1ac
commit 52de24a076
4 changed files with 9 additions and 2 deletions

View File

@@ -10,7 +10,7 @@ namespace z80
static uint8_t memtouched[65536];
static uint32_t t = 0;
static uint16_t current_opcode_address = 0;
bool options[Z80_NUM_OPTIONS] = { true };
bool options[Z80_NUM_OPTIONS] = { true, false };
int (*in_ports[256])(int);
void (*out_ports[256])(int, int);
@@ -666,7 +666,12 @@ namespace z80
} else if (im==2) {
const uint16_t address = (rI<<8) | 0xFE;
rPC = READ_MEM_16(address);
} else if (im==0) {
printf("Interrupt mode 0!\n");
z80debug::stop();
return;
}
if (options[Z80_OPTION_BREAK_ON_INTERRUPT]) z80debug::stop();
}
void RST(uint8_t vec)