Fix Mapper 195

Note: God Slayer moved to mapper 74 (per Nestopia)
This commit is contained in:
alyosha-tas 2016-09-23 13:51:47 -04:00 committed by GitHub
parent 8821d1ca3c
commit d6de51125c
1 changed files with 39 additions and 0 deletions

View File

@ -30,5 +30,44 @@
{
base.WritePRG(addr, value);
}
public override byte ReadPPU(int addr)
{
if (addr < 0x2000)
{
int bank_1k = Get_CHRBank_1K(addr);
if (bank_1k<=3)
{
return VRAM[(bank_1k << 10) + (addr & 0x3FF)];
}
else
{
addr = MapCHR(addr);
return VROM[addr + extra_vrom];
}
}
else
return base.ReadPPU(addr);
}
public override void WritePPU(int addr, byte value)
{
if (addr < 0x2000)
{
int bank_1k = Get_CHRBank_1K(addr);
if (bank_1k <= 3)
{
VRAM[(bank_1k << 10) + (addr & 0x3FF)]=value;
}
else
{
// nothing to write to VROM
}
}
else
base.WritePPU(addr, value);
}
}
}