summaryrefslogtreecommitdiff
path: root/sys/src/games/nes/cpu.c
diff options
context:
space:
mode:
authoraiju <devnull@localhost>2014-02-22 17:43:15 +0100
committeraiju <devnull@localhost>2014-02-22 17:43:15 +0100
commitaf8c91cf6d30628c17c7d7cb9733dee9e7488ab0 (patch)
tree78a21b6b94bd39829463f9910dc231b62f1996b9 /sys/src/games/nes/cpu.c
parent2bfcea9197d7b18219a7f2dea1a079ec91cf2cc5 (diff)
games/nes: mmc3 and bugfixes
Diffstat (limited to 'sys/src/games/nes/cpu.c')
-rw-r--r--sys/src/games/nes/cpu.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/src/games/nes/cpu.c b/sys/src/games/nes/cpu.c
index f0469db8c..e21c2e88c 100644
--- a/sys/src/games/nes/cpu.c
+++ b/sys/src/games/nes/cpu.c
@@ -5,7 +5,7 @@
u16int pc, curpc;
u8int rA, rX, rY, rS, rP;
-int nmi;
+u8int irq, nmi;
static u8int
fetch8(void)
@@ -249,6 +249,10 @@ step(void)
nmi = 0;
return 7;
}
+ if(irq && (rP & 4) == 0){
+ interrupt(0, 0);
+ return 7;
+ }
curpc = pc;
op = fetch8();
if(trace)