From fece5fd7e28a6f2c75e182ff798280c1584a76aa Mon Sep 17 00:00:00 2001 From: "andres.delikat" Date: Sun, 25 Sep 2011 01:20:32 +0000 Subject: [PATCH] NES - Start HVC-CNROM-256K-01 board (for mapper 185). Finishing will require finding a rom with the right sha1. --- BizHawk.Emulation/BizHawk.Emulation.csproj | 1 + .../Nintendo/NES/Boards/HVC_CNROM_256K_01.cs | 48 +++++++++++++++++++ BizHawk.MultiClient/output/gamedb.txt | 1 + 3 files changed, 50 insertions(+) create mode 100644 BizHawk.Emulation/Consoles/Nintendo/NES/Boards/HVC_CNROM_256K_01.cs diff --git a/BizHawk.Emulation/BizHawk.Emulation.csproj b/BizHawk.Emulation/BizHawk.Emulation.csproj index 2a0b5e19a2..51d51f8638 100644 --- a/BizHawk.Emulation/BizHawk.Emulation.csproj +++ b/BizHawk.Emulation/BizHawk.Emulation.csproj @@ -95,6 +95,7 @@ Code + diff --git a/BizHawk.Emulation/Consoles/Nintendo/NES/Boards/HVC_CNROM_256K_01.cs b/BizHawk.Emulation/Consoles/Nintendo/NES/Boards/HVC_CNROM_256K_01.cs new file mode 100644 index 0000000000..e5db8578e2 --- /dev/null +++ b/BizHawk.Emulation/Consoles/Nintendo/NES/Boards/HVC_CNROM_256K_01.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace BizHawk.Emulation.Consoles.Nintendo +{ + class HVC_CNROM_256K_01 : NES.NESBoardBase + { + //Mapper 185 + //Spy Vs. Spy (J) + //Mighty Bomb Jack (J) + + int chr; + + public override bool Configure(NES.EDetectionOrigin origin) + { + //configure + switch (Cart.board_type) + { + case "HVC-CNROM-256K-01": + break; + default: + return false; + } + SetMirrorType(Cart.pad_h, Cart.pad_v); + return true; + } + + public override void SyncState(Serializer ser) + { + base.SyncState(ser); + ser.Sync("chr", ref chr); + } + + public override void WritePRG(int addr, byte value) + { + chr = value; + } + + public override byte ReadPPU(int addr) + { + if (addr < 0x2000) + return VROM[addr + (chr * 0x2000)]; + return base.ReadPPU(addr); + } + } +} diff --git a/BizHawk.MultiClient/output/gamedb.txt b/BizHawk.MultiClient/output/gamedb.txt index a20b07f05e..6a3d0601d1 100644 --- a/BizHawk.MultiClient/output/gamedb.txt +++ b/BizHawk.MultiClient/output/gamedb.txt @@ -76,6 +76,7 @@ sha1:8C7D33753649A2BAF2EAAF8D5FFC2AE8E9316A13 Akira (J) NES board=TAITO-TC0190 sha1:0AE47BD83202A5A2235B0BC16278F56D66038AB5 Deathbots (U) NES board=AVE-NINA-06;PRG=64;CHR=64;PAD_H=1;PAD_V=0 ;these roms are in goodNES but theyre junk +sha1:8885F4F00C0B73C156179BCEABA5381487DBEAAD H Spy vs Spy (J) NES board=HVC-CNROM-256K-01;PRG=32;CHR=8;WRAM=8 sha1:8C676CC9BEF5B93C5A7630D12B8A5B2FEBCE3438 H Rad Racket - Deluxe Tennis II NES board=NINA-06;PRG=32;CHR=32 sha1:89C455E1793A1603BB977AD7215AB308B3586958 V Moero!! Pro Yakyuu (Red) NES board=JALECO-JF-13;PRG=128;CHR=64;WRAM=8 sha1:A906B9E67F0FFCFABB36C9B7140BC2CBA9E1F5A3 Space Shadow (J) NES board=BANDAI-74*161/161/32;PRG=64;CHR=128;WRAM=8