summaryrefslogtreecommitdiff
path: root/emu/6502.h
diff options
context:
space:
mode:
Diffstat (limited to 'emu/6502.h')
-rw-r--r--emu/6502.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/emu/6502.h b/emu/6502.h
index bfc8314..1880c90 100644
--- a/emu/6502.h
+++ b/emu/6502.h
@@ -53,7 +53,7 @@ enum {
DEX_IMPL = 0xCA,
DEY_IMPL = 0x88,
INY_IMPL = 0xC8,
- INC_IMPL = 0xE6,
+ INC_ZERO = 0xE6,
ROL_ACC = 0x2A,
BNE_REL = 0xD0,
BCC_REL = 0x90,
@@ -67,6 +67,12 @@ enum {
NOP_IMPL = 0xEA
};
+enum {
+ MAX_OPCODE_MNEMONIC_STRING_LENGTH = 20,
+ MAX_MENMONIC_LENGTH = 5,
+ NOF_OPCODES = 256
+};
+
void cpu_6502_init( cpu_6502_t *cpu, bus_t *bus, bool initialize );
void cpu_6502_reset( cpu_6502_t *cpu );
uint8_t cpu_6502_read_byte( cpu_6502_t *cpu, uint16_t addr );
@@ -78,7 +84,8 @@ uint8_t cpu_6502_pop_byte( cpu_6502_t *cpu );
uint16_t cpu_6502_pop_word( cpu_6502_t *cpu );
void cpu_6502_run( cpu_6502_t *cpu, int steps );
void cpu_6502_step( cpu_6502_t *cpu );
-void cpu_6502_print_state( cpu_6502_t *cpu, uint8_t opcode );
+void cpu_6502_get_opcode_mnemonic( cpu_6502_t *cpu, char *buf, int buflen, uint16_t addr );
+void cpu_6502_print_state( cpu_6502_t *cpu, uint16_t addr );
void cpu_6502_print_memory( cpu_6502_t *cpu, uint16_t base, uint8_t size );
void cpu_6502_print_stack( cpu_6502_t *cpu );
void cpu_6502_print_zerop_page( cpu_6502_t *cpu );