finished debug menu, working on timing issues.
This commit is contained in:
@ -6,6 +6,7 @@
|
||||
#include <dbg.h>
|
||||
#include <timer.h>
|
||||
#include <memory.h>
|
||||
#include <debug.h>
|
||||
|
||||
static cpu_context ctx = {0};
|
||||
#define CPU_DEBUG 1
|
||||
@ -68,12 +69,17 @@ bool cpu_step() {
|
||||
);
|
||||
#endif
|
||||
fetch_data(&ctx);
|
||||
if(debug_get_context()->breakpoint && pc == debug_get_context()->breakpoint) {
|
||||
emu_get_context()->paused = true;
|
||||
emu_get_context()->debug = true;
|
||||
debug_get_context()->state = DS_DISASSEMBLE;
|
||||
}
|
||||
while(emu_get_context()->paused && !emu_get_context()->step)
|
||||
delay(10);
|
||||
if(emu_get_context()->paused) {
|
||||
emu_get_context()->step--;
|
||||
if(emu_get_context()->step == 0) {
|
||||
printf("debug!\n");
|
||||
//printf("debug!\n");
|
||||
emu_get_context()->debug = true;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user