summaryrefslogtreecommitdiff
path: root/emu/6502.h
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2020-12-05 20:25:38 +0100
committerAndreas Baumann <mail@andreasbaumann.cc>2020-12-05 20:25:38 +0100
commit655ee84ba2304b2fe85b28290580338d29a68c3c (patch)
treefaf435242895bd75affdf206dd1c7538e85b3d0d /emu/6502.h
parentc40499b83f238de9b1a88a080261546149784586 (diff)
download6502-655ee84ba2304b2fe85b28290580338d29a68c3c.tar.gz
6502-655ee84ba2304b2fe85b28290580338d29a68c3c.tar.bz2
- have some emulation modes for single stepping, breaking, changing emulation speed
- started to make a better CPU state output with opcode mnemonics
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 );