summaryrefslogtreecommitdiff
path: root/sys/src/games
diff options
context:
space:
mode:
authoraiju <devnull@localhost>2014-03-21 14:25:08 +0100
committeraiju <devnull@localhost>2014-03-21 14:25:08 +0100
commit26777f4cefb1dc5a19da585cb38e08a7db9f143a (patch)
tree51738e3799abbf76e8ae2d5c6e42139796e0e906 /sys/src/games
parent52cb2d472b040bf057f49369a86e0ca4bffa88c6 (diff)
games/snes: minor oam bugs
Diffstat (limited to 'sys/src/games')
-rw-r--r--sys/src/games/snes/mem.c2
-rw-r--r--sys/src/games/snes/ppu.c3
2 files changed, 3 insertions, 2 deletions
diff --git a/sys/src/games/snes/mem.c b/sys/src/games/snes/mem.c
index 1c8728e99..a9156bc25 100644
--- a/sys/src/games/snes/mem.c
+++ b/sys/src/games/snes/mem.c
@@ -231,7 +231,7 @@ regwrite(u16int p, u8int v)
oamaddr = (reg[0x2103] & 1) << 9 | v << 1;
break;
case 0x2103:
- oamaddr = (v & 1) << 9 | reg[0x2102];
+ oamaddr = (v & 1) << 9 | reg[0x2102] << 1;
break;
case 0x2104:
if((oamaddr & 1) == 0)
diff --git a/sys/src/games/snes/ppu.c b/sys/src/games/snes/ppu.c
index b905fc34a..9d3fab477 100644
--- a/sys/src/games/snes/ppu.c
+++ b/sys/src/games/snes/ppu.c
@@ -877,7 +877,8 @@ ppustep(void)
reg[RDNMI] |= VBLANK;
if((reg[NMITIMEN] & VBLANK) != 0)
nmi = 2;
- oamaddr = reg[0x2102] << 1 | (reg[0x2103] & 1) << 9;
+ if((reg[INIDISP] & 0x80) == 0)
+ oamaddr = reg[0x2102] << 1 | (reg[0x2103] & 1) << 9;
if((reg[NMITIMEN] & AUTOJOY) != 0){
memwrite(0x4016, 1);
memwrite(0x4016, 0);