summaryrefslogtreecommitdiff
path: root/cpu.c
diff options
context:
space:
mode:
authorPeter Fors <peter.fors@mindkiller.com>2025-05-02 23:15:47 +0200
committerPeter Fors <peter.fors@mindkiller.com>2025-05-02 23:15:47 +0200
commit5808f00555c48e1cc1cc110af6a5cd73ddf13010 (patch)
treedff942b61441bafe297e7a99f0e799f32ae978b1 /cpu.c
parent9463faa436e1b981ef72000568445a83682f2658 (diff)
cleanup and rewrite of ppu_registers.c
Diffstat (limited to 'cpu.c')
-rw-r--r--cpu.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/cpu.c b/cpu.c
index 9f0639d..74d253d 100644
--- a/cpu.c
+++ b/cpu.c
@@ -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);
}
}