m68k_pulse_reset();
}
-int execute_cpu(int irq, const uint32_t stop_at[])
+int execute_cpu(int irq, const struct cpu_stop stop_at[], int *event)
{
int cycle_count = 0;
int instruction_count = 0;
break;
}
- for (i = 0; stop_at[i]; i++) {
- if (REG_PC == stop_at[i])
- break;
- }
- if (stop_at[i])
- break;
- } while (42);
+ for (i = 0; stop_at[i].event; i++) {
+ if (REG_PC == stop_at[i].pc) {
#ifdef DEBUG_CPU
- printf("execution to address 0x%06x took %d opcodes\n", REG_PC, instruction_count);
+ printf("execution to address 0x%06x took %d opcodes\n", REG_PC, instruction_count);
#endif
+ *event = stop_at[i].event;
+ return cycle_count;
+ }
+ }
+ } while (42);
}
return cycle_count;