games/snes: minor oam bugs

This commit is contained in:
aiju 2014-03-21 14:25:08 +01:00
parent 52cb2d472b
commit 26777f4cef
2 changed files with 3 additions and 2 deletions

View file

@ -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)

View file

@ -877,6 +877,7 @@ ppustep(void)
reg[RDNMI] |= VBLANK;
if((reg[NMITIMEN] & VBLANK) != 0)
nmi = 2;
if((reg[INIDISP] & 0x80) == 0)
oamaddr = reg[0x2102] << 1 | (reg[0x2103] & 1) << 9;
if((reg[NMITIMEN] & AUTOJOY) != 0){
memwrite(0x4016, 1);