diff --git a/BizHawk.Emulation/BizHawk.Emulation.csproj b/BizHawk.Emulation/BizHawk.Emulation.csproj
index 0884662652..4ee9e1ea5c 100644
--- a/BizHawk.Emulation/BizHawk.Emulation.csproj
+++ b/BizHawk.Emulation/BizHawk.Emulation.csproj
@@ -153,6 +153,7 @@
+
diff --git a/BizHawk.Emulation/Consoles/Nintendo/Docs/compatibility.txt b/BizHawk.Emulation/Consoles/Nintendo/Docs/compatibility.txt
index 182ea85ac6..c088857db1 100644
--- a/BizHawk.Emulation/Consoles/Nintendo/Docs/compatibility.txt
+++ b/BizHawk.Emulation/Consoles/Nintendo/Docs/compatibility.txt
@@ -123,6 +123,7 @@ Open bus and bus conflict emulation is not considered complete or thorough in an
233 Multicart Junk
234 Misc Nothing
240 Misc (CN) Complete
+241 Misc (CN) Complete
242 Misc (CN) Complete
243 Misc Nothing
245 Pirate Junk
diff --git a/BizHawk.Emulation/Consoles/Nintendo/NES/BoardSystem.cs b/BizHawk.Emulation/Consoles/Nintendo/NES/BoardSystem.cs
index f0527a326c..eb1893c835 100644
--- a/BizHawk.Emulation/Consoles/Nintendo/NES/BoardSystem.cs
+++ b/BizHawk.Emulation/Consoles/Nintendo/NES/BoardSystem.cs
@@ -369,6 +369,15 @@ namespace BizHawk.Emulation.Consoles.Nintendo
cart.pad_h = byte.Parse(dict["PAD_H"]);
if (dict.ContainsKey("PAD_V"))
cart.pad_v = byte.Parse(dict["PAD_V"]);
+ if(dict.ContainsKey("MIR"))
+ if (dict["MIR"] == "H")
+ {
+ cart.pad_v = 1; cart.pad_h = 0;
+ }
+ else if (dict["MIR"] == "V")
+ {
+ cart.pad_h = 1; cart.pad_v = 0;
+ }
if (dict.ContainsKey("BAD"))
cart.bad = true;
if (dict.ContainsKey("MMC3"))
diff --git a/BizHawk.Emulation/Consoles/Nintendo/NES/Boards/Mapper015.cs b/BizHawk.Emulation/Consoles/Nintendo/NES/Boards/Mapper015.cs
index 29184edbd9..f231c017d9 100644
--- a/BizHawk.Emulation/Consoles/Nintendo/NES/Boards/Mapper015.cs
+++ b/BizHawk.Emulation/Consoles/Nintendo/NES/Boards/Mapper015.cs
@@ -22,7 +22,7 @@ namespace BizHawk.Emulation.Consoles.Nintendo
default:
return false;
}
- prg_bank_mask_8k = (Cart.prg_size / 16) - 1;
+ prg_bank_mask_8k = (Cart.prg_size / 8) - 1;
prg_banks_8k[0] = 0;
prg_banks_8k[1] = 1;
@@ -77,10 +77,10 @@ namespace BizHawk.Emulation.Consoles.Nintendo
prg_banks_8k[3] = (byte)((prg_high * 2 + 1) ^ prg_low_val);
break;
}
+
+ ApplyMemoryMapMask(prg_bank_mask_8k, prg_banks_8k);
}
-
-
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
diff --git a/BizHawk.Emulation/Consoles/Nintendo/NES/Boards/Mapper241.cs b/BizHawk.Emulation/Consoles/Nintendo/NES/Boards/Mapper241.cs
new file mode 100644
index 0000000000..ef50c446e0
--- /dev/null
+++ b/BizHawk.Emulation/Consoles/Nintendo/NES/Boards/Mapper241.cs
@@ -0,0 +1,70 @@
+//163 is for nanjing games
+
+using System;
+using System.IO;
+using System.Diagnostics;
+
+namespace BizHawk.Emulation.Consoles.Nintendo
+{
+ class Mapper241 : NES.NESBoardBase
+ {
+ //configuration
+ int prg_bank_mask_32k;
+
+ //state
+ ByteBuffer prg_banks_32k = new ByteBuffer(1);
+
+ public override bool Configure(NES.EDetectionOrigin origin)
+ {
+ //configure
+ switch (Cart.board_type)
+ {
+ case "MAPPER241":
+ break;
+ default:
+ return false;
+ }
+ prg_bank_mask_32k = (Cart.prg_size / 32) - 1;
+
+ prg_banks_32k[0] = 0;
+
+ SetMirrorType(Cart.pad_h, Cart.pad_v);
+
+ return true;
+ }
+
+ public override byte ReadEXP(int addr)
+ {
+ //some kind of magic number..
+ return 0x50;
+ }
+
+ public override void WritePPU(int addr, byte value)
+ {
+ base.WritePPU(addr, value);
+ }
+
+ public override byte ReadPPU(int addr)
+ {
+ return base.ReadPPU(addr);
+ }
+
+ public override void WritePRG(int addr, byte value)
+ {
+ prg_banks_32k[0] = value;
+ ApplyMemoryMapMask(prg_bank_mask_32k, prg_banks_32k);
+ }
+
+ public override byte ReadPRG(int addr)
+ {
+ addr = ApplyMemoryMap(15, prg_banks_32k, addr);
+ return ROM[addr];
+ }
+
+ public override void SyncState(Serializer ser)
+ {
+ base.SyncState(ser);
+ ser.Sync("prg_banks_32k", ref prg_banks_32k);
+ }
+ }
+}
diff --git a/BizHawk.MultiClient/output/gamedb.txt b/BizHawk.MultiClient/output/gamedb.txt
index 236a6dc504..e61361ea95 100644
--- a/BizHawk.MultiClient/output/gamedb.txt
+++ b/BizHawk.MultiClient/output/gamedb.txt
@@ -125,6 +125,9 @@ sha1:977286FDC76C34A618E2A2D0270641BC36CFE89C Nintendo World Championships 1990
;these are from the 2002 konami collection and castlevania at least has a published TAS. presumably these are good, as they came from a PC game
sha1:EC652EE1660E527098102E26A36A8B9B7BB3943F Castlevania (Konami Collection 2002) NES board=NES-UNROM;PRG=128;WRAM=0;VRAM=8;PAD_H=1
sha1:B5C4E5E858113F5AA5E063BC79A12D7F6B856E6C Contra (Konami Collection 2002) NES board=NES-UNROM;PRG=128;WRAM=0;VRAM=8;PAD_H=1
+
+;chinese shit
+sha1:BFA31777E077E64AF0E274B5A22B57C6765D36E1 Fan Kong Jing Ying (Unl) (Ch) NES board=MAPPER241;MIR=H
;;;;;;;;;;;;;;;;;;;-----------------------------------------------------------------------
;;;;;;;;;;;;;;;;;;;-----------------------------------------------------------------------