Fix SHERO board
This commit is contained in:
parent
9a06c726a6
commit
4b51420231
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue