Add RAM exception for Golden Five

I added a check in start up for Golden Five (and extendable to other games) where certain start up RAM values break the game.

The check looks in the GameDBinfo, so any game requiring this check will need to be added to the game DB.

Should finally fix Golden Five
This commit is contained in:
alyosha-tas 2016-09-22 17:52:41 -04:00 committed by GitHub
parent e6a84f151c
commit 1c1c2b7f69
1 changed files with 17 additions and 1 deletions

View File

@ -245,7 +245,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
}
else
{
ram[i] = 0x00;
ram[i] = 0xFF;
}
}
}
@ -256,6 +256,22 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
cpu.PC = (ushort)(ReadMemory(0xFFFC) | (ReadMemory(0xFFFD) << 8));
cpu.P = 0x34;
cpu.S = 0xFD;
// some boards cannot have specific values in RAM upon initialization
// Let's hard code those cases here
// these will be defined through the gameDB exclusively for now.
if (cart.DB_GameInfo!=null)
{
// Camerica Golden 5
if (cart.DB_GameInfo.Hash == "60FC5FA5B5ACCAF3AEFEBA73FC8BFFD3C4DAE558" ||
cart.DB_GameInfo.Hash == "BAD382331C30B22A908DA4BFF2759C25113CC26A")
{
ram[0x701] = 0xFF;
}
}
}
bool resetSignal;