Attempt at fixing Jaleco-JF_11_14

This commit is contained in:
andres.delikat 2011-04-18 01:06:50 +00:00
parent db28312787
commit c7262b30c9
1 changed files with 22 additions and 2 deletions

View File

@ -24,7 +24,8 @@ Other chips used: Sunsoft-1
class Jaleco_JF_11_14 : NES.NESBoardBase
{
int chr, prg;
public override bool Configure(NES.EDetectionOrigin origin)
{
//configure
@ -39,14 +40,33 @@ Other chips used: Sunsoft-1
return true;
}
public override byte ReadPRG(int addr)
{
if (addr < 0x8000)
return ROM[addr + (prg * 0x8000)];
else
return base.ReadPRG(addr);
}
public override byte ReadPPU(int addr)
{
return base.ReadPPU(addr);
if (addr < 0x2000)
return VROM[(addr & 0x1FFF) + (chr * 0x2000)];
else
return base.ReadPPU(addr);
}
public override void WriteWRAM(int addr, byte value)
{
prg = (value >> 4) & 3;
chr = (value & 15);
}
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
ser.Sync("chr", ref chr);
ser.Sync("prg", ref prg);
}
}
}