finished debug menu, working on timing issues.
This commit is contained in:
13
lib/debug.c
13
lib/debug.c
@ -51,16 +51,13 @@ void debug_update() {
|
||||
} else if(!strcmp(cmd, "da")) {
|
||||
scanf("%d", &ctx.dissasembly_target);
|
||||
ctx.state = DS_DISASSEMBLE;
|
||||
} else if(!strcmp(cmd, "du")) {
|
||||
ctx.dissasembly_target--;
|
||||
ctx.state = DS_DISASSEMBLE;
|
||||
} else if(!strcmp(cmd, "dd")) {
|
||||
scanf("%d", &ctx.dissasembly_target);
|
||||
ctx.state = DS_DISASSEMBLE;
|
||||
} else if(cmd[0] == 'b' && cmd[1] == 'p') {
|
||||
scanf("%X", &ctx.breakpoint);
|
||||
//printf("Set breakpoint to %04X\n", ctx.breakpoint);
|
||||
} else if(cmd[0] == 's') {
|
||||
int steps;
|
||||
scanf("%d", &steps);
|
||||
printf("adding %d steps\n", steps);
|
||||
//printf("adding %d steps\n", steps);
|
||||
emu_get_context()->step += steps;
|
||||
emu_get_context()->debug = false;
|
||||
}
|
||||
@ -73,7 +70,7 @@ void debug_update() {
|
||||
fetch_instruction(&cpu_ctx);
|
||||
fetch_data(&cpu_ctx);
|
||||
char inst[16];
|
||||
inst_to_str(cpu_get_context(), inst);
|
||||
inst_to_str(&cpu_ctx, inst);
|
||||
sprintf(dissasembly[i], "%04X: %s", pc, inst);
|
||||
if(pc == cpu_get_context()->inst_pc) {
|
||||
ctx.dissasembly_scroll = i - 5;
|
||||
|
Reference in New Issue
Block a user