diff options
| author | Peter Fors <peter.fors@mindkiller.com> | 2025-05-02 23:15:47 +0200 |
|---|---|---|
| committer | Peter Fors <peter.fors@mindkiller.com> | 2025-05-02 23:15:47 +0200 |
| commit | 5808f00555c48e1cc1cc110af6a5cd73ddf13010 (patch) | |
| tree | dff942b61441bafe297e7a99f0e799f32ae978b1 /cpu.c | |
| parent | 9463faa436e1b981ef72000568445a83682f2658 (diff) | |
cleanup and rewrite of ppu_registers.c
Diffstat (limited to 'cpu.c')
| -rw-r--r-- | cpu.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -2,7 +2,7 @@ #include <stdio.h> #include <string.h> -// 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); } } |
