boot_test: updates for changes to breakpoints
Because now they actually stop in the correct place. Also, some other fixups because I'm too lazy to properly split patches for a personal project.
This commit is contained in:
@@ -227,7 +227,6 @@ static void step(char *arg_list)
|
||||
if (end_steps <= cpu.metrics.retired_instrs) {
|
||||
gb_log("CPU stopped after %" PRId64 " instructions\n", steps);
|
||||
} else if (paused_breakpoint) {
|
||||
breakpoint_addr_hit(cpu.pc);
|
||||
gb_log("Breakpoint hit\n");
|
||||
} else if (paused_signal){
|
||||
gb_log("Interrupted\n");
|
||||
@@ -482,7 +481,6 @@ static void do_run(void) {
|
||||
if (paused_signal) {
|
||||
gb_log("Interrupted.\n");
|
||||
} else if (paused_breakpoint) {
|
||||
breakpoint_addr_hit(cpu.pc);
|
||||
gb_log("Breakpoint hit\n");
|
||||
}
|
||||
|
||||
@@ -610,7 +608,7 @@ static void breakpoint_addr_hit(uint16_t addr)
|
||||
|
||||
for (i = 0; i < num_breakpoints; i++) {
|
||||
if (breakpoints[i].addr == addr) {
|
||||
bkpt= &breakpoints[i];
|
||||
bkpt = &breakpoints[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -393,8 +393,7 @@ void lr35902_cycle(struct lr35902_state *cpu)
|
||||
WRITE_BIT(cpu->a, 7, cpu->cf);
|
||||
break;
|
||||
case 0x10: /* STOP */
|
||||
//TODO:
|
||||
//cpu->stopped = true;
|
||||
ASSERT(0); //TODO: Implement me
|
||||
break;
|
||||
case 0x11: /* LD DE, d16 */
|
||||
LD_D16(cpu, cpu->de);
|
||||
@@ -1409,10 +1408,11 @@ void lr35902_cycle(struct lr35902_state *cpu)
|
||||
POP_16(cpu, cpu->hl);
|
||||
break;
|
||||
case 0xe2:
|
||||
cpu->mem_write(cpu, 0xff00 + cpu->c, cpu->a);
|
||||
break;
|
||||
case 0xe3: /* UNDEF */
|
||||
break;
|
||||
case 0xe4: /* UNDEF */
|
||||
break;
|
||||
ASSERT(0);
|
||||
case 0xe5: /* PUSH HL */
|
||||
PUSH_16(cpu, cpu->hl);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user