working on debug menu
This commit is contained in:
@ -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
19
include/debug.h
Normal 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();
|
@ -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**);
|
||||
|
Reference in New Issue
Block a user