diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL-SHERO.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL-SHERO.cs index 9ad814d9a6..cead6631f5 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL-SHERO.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL-SHERO.cs @@ -21,7 +21,6 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES BaseSetup(); AutoMapperProps.Apply(this); - return true; } @@ -54,14 +53,43 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override byte ReadPPU(int addr) - { - // TODO: why doesn't this work? - if (addr < 0x2000 & ((reg & 0x40) > 0)) - { - return VROM[addr]; - } + { + // TODO: why doesn't this work? + if (addr < 0x2000) + { + if ((reg & 0x40) > 0) + { + return VRAM[addr]; + } + else + { + int bank_1k = Get_CHRBank_1K(addr); + addr = (bank_1k << 10) | (addr & 0x3FF); + + return VROM[addr]; + } + + } + else + return VRAM[addr]; + } - return base.ReadPPU(addr); + public override void WritePPU(int addr, byte value) + { + if (addr < 0x2000) + { + if ((reg & 0x40) > 0) + { + VRAM[addr] = value; + } + else + { + //nothing to write to VROM + } + + } + else + VRAM[addr] = value; } protected override int Get_CHRBank_1K(int addr)