Fix Mapper 185 (Seicross)

Seicross uses different security settings then other games in this mapper.
We have to check them explicitly just for this game.
This commit is contained in:
alyosha-tas 2016-11-02 12:13:26 -04:00 committed by GitHub
parent 51dadcbfed
commit 6200edd192
1 changed files with 27 additions and 5 deletions

View File

@ -18,6 +18,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
int prg_byte_mask, chr_mask; int prg_byte_mask, chr_mask;
bool copyprotection = false; bool copyprotection = false;
bool bus_conflict; bool bus_conflict;
bool seicross;
//state //state
int chr; int chr;
@ -86,6 +87,9 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
chr_mask = (Cart.chr_size / 8) - 1; chr_mask = (Cart.chr_size / 8) - 1;
SetMirrorType(Cart.pad_h, Cart.pad_v); SetMirrorType(Cart.pad_h, Cart.pad_v);
if (Cart.sha1 == "sha1:4C9C05FAD6F6F33A92A27C2EDC1E7DE12D7F216D")
seicross = true;
return true; return true;
} }
@ -98,16 +102,33 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
if (copyprotection) if (copyprotection)
{ {
if ((value & 0x0F) > 0 && (value != 0x13)) if (seicross)
{ {
chr_enabled = true; if (value != 0x21)
Console.WriteLine("chr enabled"); {
chr_enabled = true;
Console.WriteLine("chr enabled");
}
else
{
chr_enabled = false;
Console.WriteLine("chr disabled");
}
} }
else else
{ {
chr_enabled = false; if ((value & 0x0F) > 0 && (value != 0x13))
Console.WriteLine("chr disabled"); {
chr_enabled = true;
Console.WriteLine("chr enabled");
}
else
{
chr_enabled = false;
Console.WriteLine("chr disabled");
}
} }
} }
} }
@ -131,6 +152,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
{ {
base.SyncState(ser); base.SyncState(ser);
ser.Sync("chr", ref chr); ser.Sync("chr", ref chr);
ser.Sync("seicross", ref seicross);
ser.Sync("chr_enabled", ref chr_enabled); ser.Sync("chr_enabled", ref chr_enabled);
} }