working on debug menu

This commit is contained in:
2025-05-30 18:27:31 -06:00
parent bb572cce69
commit 604a6d79f2
10 changed files with 251 additions and 126 deletions

View File

@ -33,6 +33,7 @@ typedef struct {
bool enabling_ime;
u8 ie_register;
u8 int_flags;
u16 inst_pc;
} cpu_context;
typedef struct {
@ -42,6 +43,8 @@ typedef struct {
void cpu_save_state(cpu_state*);
void cpu_load_state(const cpu_state*);
void fetch_instruction(cpu_context *ctx);
void cpu_init();
bool cpu_step();

19
include/debug.h Normal file
View File

@ -0,0 +1,19 @@
#pragma once
#include <common.h>
typedef enum {
DS_MAIN,
DS_DISASSEMBLE
} debug_state;
typedef struct {
debug_state state;
u16 dissasembly_scroll;
u16 dissasembly_target;
u16 dissasembly_pc;
} debug_context;
void debug_update();
debug_context *debug_get_context();
void debug_init();

View File

@ -9,6 +9,8 @@ typedef struct {
u64 ticks;
const char *app_path;
bool fast_forward;
bool debug;
u8 step;
} emu_context;
int emu_run(int, char**);