summaryrefslogtreecommitdiff
path: root/emu/6502.h
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2020-11-26 19:55:02 +0100
committerAndreas Baumann <mail@andreasbaumann.cc>2020-11-26 19:55:02 +0100
commit3d77f3f5ad41e931117425f58c74f49c9503bf7b (patch)
tree8165c8f10a1b3b3cec27cfb283ee218e7af3a519 /emu/6502.h
parent394c9fbb6cc243e46b32aa9e7221b0e6cadd4c13 (diff)
download6502-3d77f3f5ad41e931117425f58c74f49c9503bf7b.tar.gz
6502-3d77f3f5ad41e931117425f58c74f49c9503bf7b.tar.bz2
more work on emulator, mainly debug and 7seg stuff
Diffstat (limited to 'emu/6502.h')
-rw-r--r--emu/6502.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/emu/6502.h b/emu/6502.h
index dac07a1..20574c3 100644
--- a/emu/6502.h
+++ b/emu/6502.h
@@ -15,11 +15,19 @@ typedef struct
struct memory_t *memory;
- bool debug;
+ int debug_flags;
int steps;
} cpu_6502_t;
+// debug flags
+enum {
+ DEBUG_STATUS = 0x01,
+ DEBUG_ZERO_PAGE = 0x02,
+ DEBUG_STACK = 0x04
+};
+
+// processor state bits
enum {
PS_N = 0x80,
PS_V = 0x40,
@@ -30,6 +38,7 @@ enum {
PS_C = 0x01
};
+// opcodes
enum {
LDX_IMM = 0xA2,
LDX_ZERO = 0xA6,