From a5262488c707152f474352f46600cc56ba4f54fa Mon Sep 17 00:00:00 2001 From: adelikat Date: Tue, 31 Jul 2012 03:07:38 +0000 Subject: [PATCH] NES - fix mapper 96 prg mapping. These games are working as well as can be tested without better peripheral support, so I'm considering this mapper complete. --- .../NES/Boards/BANDAI_74_161_02_74.cs | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/BizHawk.Emulation/Consoles/Nintendo/NES/Boards/BANDAI_74_161_02_74.cs b/BizHawk.Emulation/Consoles/Nintendo/NES/Boards/BANDAI_74_161_02_74.cs index a058205008..31bd45b403 100644 --- a/BizHawk.Emulation/Consoles/Nintendo/NES/Boards/BANDAI_74_161_02_74.cs +++ b/BizHawk.Emulation/Consoles/Nintendo/NES/Boards/BANDAI_74_161_02_74.cs @@ -138,13 +138,31 @@ namespace BizHawk.Emulation.Consoles.Nintendo public override void WritePRG(int addr, byte value) { - prg_bank_mask_32k = (byte)(value & 0x03); + prg_bank_32k = (byte)(value & 0x03); chr_block = (value >> 2) & 0x01; } public override byte ReadPRG(int addr) { int bank_32k = prg_bank_32k & prg_bank_mask_32k; + + int x = 0; + switch (bank_32k) + { + case 0: + x += 0; + break; + case 1: + x += 1; + break; + case 2: + x += 2; + break; + case 3: + x += 3; + break; + } + int y = 0; return ROM[(bank_32k * 0x8000) + addr]; }