From b089f2996c971130057766e3bdd75896e5784425 Mon Sep 17 00:00:00 2001 From: adelikat Date: Sun, 22 Jul 2012 16:57:44 +0000 Subject: [PATCH] NES - decently support mappers 74 and 192 (games play fine other than missing characters in text boxes)) --- BizHawk.Emulation/BizHawk.Emulation.csproj | 2 + .../NES/Boards/MMC3_family/Mapper074.cs | 55 +++++++++++++++++++ .../NES/Boards/MMC3_family/Mapper192.cs | 53 ++++++++++++++++++ 3 files changed, 110 insertions(+) create mode 100644 BizHawk.Emulation/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper074.cs create mode 100644 BizHawk.Emulation/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper192.cs diff --git a/BizHawk.Emulation/BizHawk.Emulation.csproj b/BizHawk.Emulation/BizHawk.Emulation.csproj index 1775107605..4144644e46 100644 --- a/BizHawk.Emulation/BizHawk.Emulation.csproj +++ b/BizHawk.Emulation/BizHawk.Emulation.csproj @@ -184,10 +184,12 @@ + + diff --git a/BizHawk.Emulation/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper074.cs b/BizHawk.Emulation/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper074.cs new file mode 100644 index 0000000000..d6d705dd75 --- /dev/null +++ b/BizHawk.Emulation/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper074.cs @@ -0,0 +1,55 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace BizHawk.Emulation.Consoles.Nintendo +{ + class Mapper074 : MMC3Board_Base + { + /* + Here are Disch's original notes: + ======================== + = Mapper 074 = + ======================== + + + aka: + -------------------------- + Pirate MMC3 variant + + + Example Games: + -------------------------- + Di 4 Ci - Ji Qi Ren Dai Zhan + Ji Jia Zhan Shi + + + Notes: + -------------------------- + This mapper is a modified MMC3 (or is based on MMC3?). + + In addition to any CHR-ROM present, there is also an additional 2k of CHR-RAM which is selectable. CHR pages + $08 and $09 select CHR-RAM, other pages select CHR-ROM + + Apart from that, this mapper behaves exactly like your typical MMC3. See mapper 004 for details. + + TODO: implement CHR-RAM behavior + */ + + public override bool Configure(NES.EDetectionOrigin origin) + { + //analyze board type + switch (Cart.board_type) + { + case "MAPPER074": + break; + default: + return false; + } + + BaseSetup(); + return true; + } + } +} diff --git a/BizHawk.Emulation/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper192.cs b/BizHawk.Emulation/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper192.cs new file mode 100644 index 0000000000..6038650f40 --- /dev/null +++ b/BizHawk.Emulation/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper192.cs @@ -0,0 +1,53 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace BizHawk.Emulation.Consoles.Nintendo +{ + class Mapper192 : MMC3Board_Base + { + /* + Here are Disch's original notes: + ======================== + = Mapper 192 = + ======================== + + + aka: + -------------------------- + Pirate MMC3 variant + + + Example Game: + -------------------------- + Ying Lie Qun Xia Zhuan + + + Notes: + -------------------------- + This mapper is a modified MMC3 (or is based on MMC3?). + + In addition to any CHR-ROM present, there is also an additional 4k of CHR-RAM which is selectable. + + CHR Pages $08-$0B are CHR-RAM, other pages are CHR-ROM. + + Apart from that, this mapper behaves exactly like your typical MMC3. See mapper 004 for details. + */ + + public override bool Configure(NES.EDetectionOrigin origin) + { + //analyze board type + switch (Cart.board_type) + { + case "MAPPER192": //adelikat: I couldn't find any ROMs that weren't labeled as Mapper 04. All of these ran fine as far as I could tell, but just in case, I added this. I'm considering the mapper fully supported until proven otherwise. + break; + default: + return false; + } + + BaseSetup(); + return true; + } + } +}