Fix mapper 51

This commit is contained in:
adelikat 2015-08-09 14:03:11 -04:00
parent ef656a9f5d
commit d12726a1fc
1 changed files with 12 additions and 5 deletions

View File

@ -35,7 +35,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
ser.Sync("mode", ref _mode); ser.Sync("mode", ref _mode);
} }
public override byte ReadPPU(int addr) public override byte ReadWRAM(int addr)
{ {
int prgBank8k; int prgBank8k;
if ((_mode & 0x02) > 0) if ((_mode & 0x02) > 0)
@ -80,11 +80,18 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
} }
} }
public override void WritePPU(int addr, byte value) public override void WriteWRAM(int addr, byte value)
{
if (addr < 0x2000)
{ {
_mode = value & 0x012; _mode = value & 0x012;
SyncMirroring(); SyncMirroring();
} }
else
{
base.WriteWRAM(addr, value);
}
}
public override void WritePRG(int addr, byte value) public override void WritePRG(int addr, byte value)
{ {