diff options
author | aiju <devnull@localhost> | 2014-02-20 23:22:14 +0100 |
---|---|---|
committer | aiju <devnull@localhost> | 2014-02-20 23:22:14 +0100 |
commit | eeac553c36e1cb1d7786115d7202bfe732deb54e (patch) | |
tree | 1eecc9e02649526248006476fda7ad4030e2a6a4 /sys/src/games/nes/mem.c | |
parent | 9c40e15ba8ae000f73c23d89143d6c44b75220fd (diff) |
games/nes: bug fixing
Diffstat (limited to 'sys/src/games/nes/mem.c')
-rw-r--r-- | sys/src/games/nes/mem.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/src/games/nes/mem.c b/sys/src/games/nes/mem.c index 1354678d8..d018400e8 100644 --- a/sys/src/games/nes/mem.c +++ b/sys/src/games/nes/mem.c @@ -193,7 +193,8 @@ memwrite(u16int p, u8int v) p &= 0x2007; switch(p){ case PPUCTRL: - if((v & PPUNMI) != 0 && (mem[PPUSTATUS] & PPUVBLANK) != 0) + if((mem[PPUCTRL] & PPUNMI) == 0 && (v & PPUNMI) != 0 && + (mem[PPUSTATUS] & PPUVBLANK) != 0) nmi = 1; pput = (pput & 0xF3FF) | ((v & 3) << 10); break; |