summaryrefslogtreecommitdiff
path: root/cpu.c
diff options
context:
space:
mode:
authorPeter Fors <peter.fors@mindkiller.com>2025-06-08 17:32:05 +0200
committerPeter Fors <peter.fors@mindkiller.com>2025-06-08 17:32:05 +0200
commit412b2ef851516c1de8ba5006ddd284192cbcaf9b (patch)
treee8b68d60125bf89e375ec9acc4e7833825abbfaa /cpu.c
parent6dd73982c514445c4d2a4787c37666d0812a3dad (diff)
tests
Diffstat (limited to 'cpu.c')
-rw-r--r--cpu.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/cpu.c b/cpu.c
index f6a070e..e3e83e6 100644
--- a/cpu.c
+++ b/cpu.c
@@ -5,6 +5,8 @@
// DO NOT ENABLE FOR NES!!!!!
// #define ENABLE_DECIMAL_MODE
+#define PAGE_CROSSED(base, addr) (((base ^ addr) > 0xff))
+
static inline uint8_t pack_flags(struct cpu_state *cpu) {
return (cpu->n << 7) | (cpu->v << 6) | (1 << 5) | (cpu->d << 3) | (cpu->i << 2) | (cpu->z << 1) | cpu->c;
}