From 8a577a0184543deb0d8685dbe6c12793a0688e52 Mon Sep 17 00:00:00 2001 From: zeromus Date: Mon, 18 Apr 2011 01:57:22 +0000 Subject: [PATCH] [NES] sort out Mississippi Satsujin Jiken, fix up some board autoconfiguration logic which was a bit broken, support pad_h and pad_v from gamedb --- BizHawk.Emulation/Consoles/Nintendo/NES/BoardSystem.cs | 4 ++++ BizHawk.Emulation/Consoles/Nintendo/NES/Boards/GxROM.cs | 7 +++++-- .../Consoles/Nintendo/NES/Boards/Jaleco-JF_11_14.cs | 1 - BizHawk.Emulation/Consoles/Nintendo/NES/NES.cs | 2 +- BizHawk.MultiClient/output/gamedb.txt | 5 +++-- 5 files changed, 13 insertions(+), 6 deletions(-) diff --git a/BizHawk.Emulation/Consoles/Nintendo/NES/BoardSystem.cs b/BizHawk.Emulation/Consoles/Nintendo/NES/BoardSystem.cs index 09cddffa6e..5331a65e09 100644 --- a/BizHawk.Emulation/Consoles/Nintendo/NES/BoardSystem.cs +++ b/BizHawk.Emulation/Consoles/Nintendo/NES/BoardSystem.cs @@ -273,6 +273,10 @@ namespace BizHawk.Emulation.Consoles.Nintendo cart.vram_size = short.Parse(dict["VRAM"]); if (dict.ContainsKey("WRAM")) cart.wram_size = short.Parse(dict["WRAM"]); + if (dict.ContainsKey("PAD_H")) + cart.pad_h = byte.Parse(dict["PAD_H"]); + if (dict.ContainsKey("PAD_V")) + cart.pad_h = byte.Parse(dict["PAD_V"]); if (dict.ContainsKey("bad")) Console.WriteLine("rom is flagged as BAD!"); diff --git a/BizHawk.Emulation/Consoles/Nintendo/NES/Boards/GxROM.cs b/BizHawk.Emulation/Consoles/Nintendo/NES/Boards/GxROM.cs index 1b768dadb6..c6f73e204c 100644 --- a/BizHawk.Emulation/Consoles/Nintendo/NES/Boards/GxROM.cs +++ b/BizHawk.Emulation/Consoles/Nintendo/NES/Boards/GxROM.cs @@ -31,7 +31,9 @@ namespace BizHawk.Emulation.Consoles.Nintendo case "BANDAI-GNROM": case "HVC-GNROM": case "NES-MHROM": //Super Mario Bros. / Duck Hunt - //AssertPrg(Cart.board_type == "NES-MHROM" ? 64 : 128); AssertChr(8, 16, 32); AssertVram(0); AssertWram(0); + AssertPrg(Cart.board_type == "NES-MHROM" ? 64 : 128); AssertChr(8, 16, 32); AssertVram(0); AssertWram(0); + break; + case "GXROM_HACKY": break; default: @@ -42,7 +44,8 @@ namespace BizHawk.Emulation.Consoles.Nintendo chr_mask = (Cart.chr_size / 8) - 1; SetMirrorType(Cart.pad_h, Cart.pad_v); - Console.WriteLine("Caution! If this board was inferred from iNES then the mirr.type might be wrong"); + if(origin == NES.EDetectionOrigin.INES) + Console.WriteLine("Caution! This board (inferred from iNES) might have wrong mirr.type"); return true; 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 9852dab48c..d9dc6465de 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 @@ -62,7 +62,6 @@ Other chips used: Sunsoft-1 { prg = (value >> 4) & 3; chr = (value & 15); - Console.WriteLine("{0} {1}", prg, chr); } public override void SyncState(Serializer ser) diff --git a/BizHawk.Emulation/Consoles/Nintendo/NES/NES.cs b/BizHawk.Emulation/Consoles/Nintendo/NES/NES.cs index 0fa4b7acc2..34f89cc561 100644 --- a/BizHawk.Emulation/Consoles/Nintendo/NES/NES.cs +++ b/BizHawk.Emulation/Consoles/Nintendo/NES/NES.cs @@ -453,7 +453,7 @@ namespace BizHawk.Emulation.Consoles.Nintendo //find a INESBoard to handle this Type boardType = null; - boardType = FindBoard(choice,EDetectionOrigin.INES); + boardType = FindBoard(choice, origin); if (boardType == null) throw new Exception("No class implements the necessary board type: " + choice.board_type); diff --git a/BizHawk.MultiClient/output/gamedb.txt b/BizHawk.MultiClient/output/gamedb.txt index a26836b243..46ae4cc303 100644 --- a/BizHawk.MultiClient/output/gamedb.txt +++ b/BizHawk.MultiClient/output/gamedb.txt @@ -2269,8 +2269,9 @@ sha1:894F20405286F5F75133CE4648300E2C67972B40 Solomon's Key (U) NES board=NES- sha1:0C53B06E1D13AE917536BB39010914EA3D111FF5 Thunder & Lightning (U) NES board=NES-GNROM;PRG=128;CHR=32;bad ;these roms are from goodNES but they are confusingly messed up somehow -sha1:192C543866F1037276D2778046ABEDCA84868E26 Bio Senshi Dan - Increaser To No Tatakai (J) NES board=JALECO-JF-14;PRG=128;CHR=128;mirror=0 -sha1:8A5FD1061ADACDEABF422A2D2E555FF70749AE7C Mississippi Satsujin Jiken (Alt) (J).nes NES board=JALECO-JF-11;PRG=127;CHR=32 +sha1:192C543866F1037276D2778046ABEDCA84868E26 Bio Senshi Dan - Increaser To No Tatakai (J) NES board=JALECO-JF-14;PRG=128;CHR=128 +sha1:E80FF0B707B0D675FDBEF474E3FDB1A83E2B7C44 Mississippi Satsujin Jiken (J) NES board=JALECO-JF-11;PRG=128;CHR=32;PAD_H=1 +sha1:8A5FD1061ADACDEABF422A2D2E555FF70749AE7C Mississippi Satsujin Jiken (Alt) (J) NES board=GXROM_HACKY;PRG=128;CHR=32;PAD_H=1 #include gamedb_neshomebrew.txt #include gamedb_user.txt