snes - a sneaky hack to enforce that compatibility profile is ALWAYS in deterministic mode, and that performance profile is NEVER in deterministic mode, this fixes a lot of undefined and bugged behavior when the deterministic flag gets out of whack with the act of loading a savestate

This commit is contained in:
adelikat 2014-07-21 19:07:21 +00:00
parent bee1dfcb02
commit 2190b15099
1 changed files with 7 additions and 4 deletions

View File

@ -327,7 +327,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.SNES
else return api.CMD_load_cartridge_super_game_boy(CurrLoadParams.rom_xml, CurrLoadParams.rom_data, CurrLoadParams.rom_size, CurrLoadParams.dmg_xml, CurrLoadParams.dmg_data, CurrLoadParams.dmg_size);
}
public void Load(GameInfo game, byte[] romData, bool DeterministicEmulation, byte[] xmlData)
public void Load(GameInfo game, byte[] romData, bool deterministicEmulation, byte[] xmlData)
{
byte[] sgbRomData = null;
if (game["SGB"])
@ -433,7 +433,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.SNES
SetupMemoryDomains(romData,sgbRomData);
this.DeterministicEmulation = DeterministicEmulation;
DeterministicEmulation = deterministicEmulation;
if (DeterministicEmulation) // save frame-0 savestate now
{
MemoryStream ms = new MemoryStream();
@ -719,10 +719,13 @@ namespace BizHawk.Emulation.Cores.Nintendo.SNES
public string BoardName { get; private set; }
// adelikat: Nasty hack to force new business logic. Compatibility (and Accuracy when fully supported) will ALWAYS be in deterministic mode,
// a consequence is a permanent performance hit to the compatibility core
// Perormance will NEVER be in deterministic mode (and the client side logic will prohibit movie recording on it)
public bool DeterministicEmulation
{
get;
private set;
get { return SyncSettings.Profile == "Compatibility" || SyncSettings.Profile == "Accuracy"; }
private set { /* Do nothing */ }
}