From 5808f00555c48e1cc1cc110af6a5cd73ddf13010 Mon Sep 17 00:00:00 2001 From: Peter Fors Date: Fri, 2 May 2025 23:15:47 +0200 Subject: cleanup and rewrite of ppu_registers.c --- cpu.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'cpu.c') diff --git a/cpu.c b/cpu.c index 9f0639d..74d253d 100644 --- a/cpu.c +++ b/cpu.c @@ -2,7 +2,7 @@ #include #include -// REMOVE FOR NES!!!!! +// DO NOT ENABLE FOR NES!!!!! // #define ENABLE_DECIMAL_MODE __attribute__((hot)) @@ -75,11 +75,11 @@ __attribute__((always_inline, hot)) static inline void check_interrupts(struct nes_state * restrict state) { struct cpu_state * restrict cpu = &state->cpu; - if(state->nmi_pending) { - state->nmi_pending = 0; + if(state->cpu.nmi_pending) { + state->cpu.nmi_pending = 0; do_nmi(state); - } else if(state->irq_pending && cpu->i == 0) { - state->irq_pending = 0; + } else if(state->cpu.irq_pending && cpu->i == 0) { + state->cpu.irq_pending = 0; do_irq(state); } } -- cgit v1.2.3