From c7262b30c92533a20b24476858c21020d983be35 Mon Sep 17 00:00:00 2001 From: "andres.delikat" Date: Mon, 18 Apr 2011 01:06:50 +0000 Subject: [PATCH] Attempt at fixing Jaleco-JF_11_14 --- .../Nintendo/NES/Boards/Jaleco-JF_11_14.cs | 24 +++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/BizHawk.Emulation/Consoles/Nintendo/NES/Boards/Jaleco-JF_11_14.cs b/BizHawk.Emulation/Consoles/Nintendo/NES/Boards/Jaleco-JF_11_14.cs index 1dcafb4a74..66697d1f80 100644 --- a/BizHawk.Emulation/Consoles/Nintendo/NES/Boards/Jaleco-JF_11_14.cs +++ b/BizHawk.Emulation/Consoles/Nintendo/NES/Boards/Jaleco-JF_11_14.cs @@ -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); } } }