- [NEW] F12 to StepOut() on debugger (break on RET, RETI or RETN)

- [FIX] Fixed visualizacion of some IX and IY opcodes
- [NEW] Scroll on memory viewer with mouse wheel
- [NEW] While debugging, on each step the screen refreshes, so screen redraw can be seen while happening
- [NEW] Search for sequences of bytes. Example: "search AB1140" to search for the sequece $AB $11 $40. "search next" to continue searching.
This commit is contained in:
2024-12-14 20:46:46 +01:00
parent 14d047cbb9
commit 0a758bbb33
7 changed files with 124 additions and 8 deletions

31
z80.cpp
View File

@@ -11,6 +11,7 @@ namespace z80
static uint32_t t = 0;
static uint16_t current_opcode_address = 0;
bool options[Z80_NUM_OPTIONS] = { true, false };
int calls_stacked = 0;
int (*in_ports[256])(int);
void (*out_ports[256])(int, int);
@@ -657,6 +658,11 @@ namespace z80
{
PUSH(rPC);
rPC = addr;
if (options[Z80_OPTION_BREAK_ON_RET]) {
calls_stacked++;
printf("CALL: calls stacked: %i", calls_stacked);
}
}
}
@@ -674,6 +680,20 @@ namespace z80
{
POP(_rPC);
if (cond != cNO) t++;
if (options[Z80_OPTION_BREAK_ON_RET]) {
if (calls_stacked>0) {
calls_stacked--;
printf("RET: calls still stacked: %i\n", calls_stacked);
} else {
printf("RET: BREAK\n");
options[Z80_OPTION_BREAK_ON_RET] = false;
z80debug::setcursor(rPC);
z80debug::history::store();
z80debug::stop();
}
}
} else {
t++;
}
@@ -683,6 +703,13 @@ namespace z80
{
POP(_rPC);
iff1 = iff2;
if (options[Z80_OPTION_BREAK_ON_RET]) {
options[Z80_OPTION_BREAK_ON_RET] = false;
z80debug::setcursor(rPC);
z80debug::history::store();
z80debug::stop();
}
}
void RETI()
@@ -2842,4 +2869,8 @@ namespace z80
options[option] = !options[option];
}
void resetStackedCalls()
{
calls_stacked=0;
}
}