Fix SXROM Detection (#3170)

* fix #3168?

* revert iNES 2.0 parsing changes (and revert 4ff7745), add special iNES 2.0 case for SXROM

* oh right subboard crap
This commit is contained in:
CasualPokePlayer 2022-03-01 09:18:49 -08:00 committed by GitHub
parent 5435de75fb
commit 0ff69c560f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 11 deletions

View File

@ -589,6 +589,11 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
{
switch (Cart.BoardType)
{
case "MAPPER0001-00":
if (Cart.WramSize < 32)
return false;
AssertPrg(128, 256, 512); AssertChr(0); AssertVram(8); AssertWram(32);
break;
case "HVC-SXROM": //final fantasy 1& 2
AssertPrg(128, 256, 512); AssertChr(0); AssertVram(8); AssertWram(32);
break;

View File

@ -48,17 +48,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
int mapper = data[6] >> 4 | data[7] & 0xf0 | data[8] << 8 & 0xf00;
int submapper = data[8] >> 4;
// only add submapper if it is non-zero
if (submapper != 0)
{
CartV2.BoardType = $"MAPPER{mapper:d4}-{submapper:d2}";
}
else
{
CartV2.BoardType = $"MAPPER{mapper:d4}";
}
CartV2.BoardType = $"MAPPER{mapper:d4}-{submapper:d2}";
int vrambat = iNES2Wram(data[11] >> 4);
int vramnon = iNES2Wram(data[11] & 15);