From 974792cdfeb8777e84a20c5081a1a8ee5adf6d42 Mon Sep 17 00:00:00 2001 From: nattthebear Date: Wed, 6 May 2020 07:46:40 -0400 Subject: [PATCH] Make waterbox consistency check ui option only skip the memory check, not the core check (#1979) --- src/BizHawk.Emulation.Cores/Consoles/Belogic/Uzem.cs | 2 +- src/BizHawk.Emulation.Cores/Consoles/NEC/PCFX/Tst.cs | 2 +- .../Consoles/Nintendo/Gameboy/Sameboy.cs | 2 +- .../Consoles/Nintendo/SNES/LibsnesApi.cs | 2 +- .../Consoles/Nintendo/SNES9X/Snes9x.cs | 2 +- .../Consoles/Nintendo/VB/VirtualBoyee.cs | 2 +- src/BizHawk.Emulation.Cores/Consoles/SNK/NeoGeoPort.cs | 2 +- .../Consoles/Sega/PicoDrive/PicoDrive.cs | 2 +- .../Consoles/Sega/Saturn/Saturnus.cs | 2 +- src/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/GPGX.cs | 2 +- src/BizHawk.Emulation.Cores/Waterbox/PeRunner.cs | 7 +++++-- 11 files changed, 15 insertions(+), 12 deletions(-) diff --git a/src/BizHawk.Emulation.Cores/Consoles/Belogic/Uzem.cs b/src/BizHawk.Emulation.Cores/Consoles/Belogic/Uzem.cs index 6ed49b3789..c803c85036 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Belogic/Uzem.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Belogic/Uzem.cs @@ -33,7 +33,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Belogic MmapHeapSizeKB = 4, PlainHeapSizeKB = 4, SkipCoreConsistencyCheck = comm.CorePreferences.HasFlag(CoreComm.CorePreferencesFlags.WaterboxCoreConsistencyCheck), - SkipMemoryConsistencyCheck = comm.CorePreferences.HasFlag(CoreComm.CorePreferencesFlags.WaterboxCoreConsistencyCheck), + SkipMemoryConsistencyCheck = comm.CorePreferences.HasFlag(CoreComm.CorePreferencesFlags.WaterboxMemoryConsistencyCheck), }); _exe.AddReadonlyFile(rom, "romfile"); diff --git a/src/BizHawk.Emulation.Cores/Consoles/NEC/PCFX/Tst.cs b/src/BizHawk.Emulation.Cores/Consoles/NEC/PCFX/Tst.cs index 6042009eec..4846650bfa 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/NEC/PCFX/Tst.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/NEC/PCFX/Tst.cs @@ -71,7 +71,7 @@ namespace BizHawk.Emulation.Cores.Consoles.NEC.PCFX PlainHeapSizeKB = 4 * 1024, MmapHeapSizeKB = 6 * 1024, SkipCoreConsistencyCheck = comm.CorePreferences.HasFlag(CoreComm.CorePreferencesFlags.WaterboxCoreConsistencyCheck), - SkipMemoryConsistencyCheck = comm.CorePreferences.HasFlag(CoreComm.CorePreferencesFlags.WaterboxCoreConsistencyCheck), + SkipMemoryConsistencyCheck = comm.CorePreferences.HasFlag(CoreComm.CorePreferencesFlags.WaterboxMemoryConsistencyCheck), }); SetCdCallbacks(); diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Sameboy.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Sameboy.cs index bc02d585b1..cea3650abb 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Sameboy.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Sameboy.cs @@ -67,7 +67,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Nintendo.Gameboy PlainHeapSizeKB = 4, MmapHeapSizeKB = 1024, SkipCoreConsistencyCheck = comm.CorePreferences.HasFlag(CoreComm.CorePreferencesFlags.WaterboxCoreConsistencyCheck), - SkipMemoryConsistencyCheck = comm.CorePreferences.HasFlag(CoreComm.CorePreferencesFlags.WaterboxCoreConsistencyCheck), + SkipMemoryConsistencyCheck = comm.CorePreferences.HasFlag(CoreComm.CorePreferencesFlags.WaterboxMemoryConsistencyCheck), }); _cgb = (rom[0x143] & 0xc0) == 0xc0 && !sgb; diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesApi.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesApi.cs index 45a72b5d1d..1cdb0a79e5 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesApi.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesApi.cs @@ -71,7 +71,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.SNES PlainHeapSizeKB = 2 * 1024, // TODO: wasn't there more in here? SealedHeapSizeKB = 128 * 1024, SkipCoreConsistencyCheck = comm.CorePreferences.HasFlag(CoreComm.CorePreferencesFlags.WaterboxCoreConsistencyCheck), - SkipMemoryConsistencyCheck = comm.CorePreferences.HasFlag(CoreComm.CorePreferencesFlags.WaterboxCoreConsistencyCheck), + SkipMemoryConsistencyCheck = comm.CorePreferences.HasFlag(CoreComm.CorePreferencesFlags.WaterboxMemoryConsistencyCheck), }); using (_exe.EnterExit()) { diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES9X/Snes9x.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES9X/Snes9x.cs index f152b4aa1a..5e161a1765 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES9X/Snes9x.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES9X/Snes9x.cs @@ -40,7 +40,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.SNES9X InvisibleHeapSizeKB = 6 * 1024, PlainHeapSizeKB = 64, SkipCoreConsistencyCheck = comm.CorePreferences.HasFlag(CoreComm.CorePreferencesFlags.WaterboxCoreConsistencyCheck), - SkipMemoryConsistencyCheck = comm.CorePreferences.HasFlag(CoreComm.CorePreferencesFlags.WaterboxCoreConsistencyCheck), + SkipMemoryConsistencyCheck = comm.CorePreferences.HasFlag(CoreComm.CorePreferencesFlags.WaterboxMemoryConsistencyCheck), }); if (!_core.biz_init()) diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/VB/VirtualBoyee.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/VB/VirtualBoyee.cs index e4a042e3f4..24f01a7f49 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/VB/VirtualBoyee.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/VB/VirtualBoyee.cs @@ -41,7 +41,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Nintendo.VB InvisibleHeapSizeKB = 256, PlainHeapSizeKB = 256, SkipCoreConsistencyCheck = comm.CorePreferences.HasFlag(CoreComm.CorePreferencesFlags.WaterboxCoreConsistencyCheck), - SkipMemoryConsistencyCheck = comm.CorePreferences.HasFlag(CoreComm.CorePreferencesFlags.WaterboxCoreConsistencyCheck), + SkipMemoryConsistencyCheck = comm.CorePreferences.HasFlag(CoreComm.CorePreferencesFlags.WaterboxMemoryConsistencyCheck), }); if (!_boyee.Load(rom, rom.Length, LibVirtualBoyee.NativeSyncSettings.FromFrontendSettings(_syncSettings))) diff --git a/src/BizHawk.Emulation.Cores/Consoles/SNK/NeoGeoPort.cs b/src/BizHawk.Emulation.Cores/Consoles/SNK/NeoGeoPort.cs index f71f4e7f3f..a5c78ed327 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/SNK/NeoGeoPort.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/SNK/NeoGeoPort.cs @@ -50,7 +50,7 @@ namespace BizHawk.Emulation.Cores.Consoles.SNK PlainHeapSizeKB = 5 * 1024, // must be a bit larger than the ROM size StartAddress = startAddress, SkipCoreConsistencyCheck = comm.CorePreferences.HasFlag(CoreComm.CorePreferencesFlags.WaterboxCoreConsistencyCheck), - SkipMemoryConsistencyCheck = comm.CorePreferences.HasFlag(CoreComm.CorePreferencesFlags.WaterboxCoreConsistencyCheck), + SkipMemoryConsistencyCheck = comm.CorePreferences.HasFlag(CoreComm.CorePreferencesFlags.WaterboxMemoryConsistencyCheck), }); if (!_neopop.LoadSystem(rom, rom.Length, _syncSettings.Language)) diff --git a/src/BizHawk.Emulation.Cores/Consoles/Sega/PicoDrive/PicoDrive.cs b/src/BizHawk.Emulation.Cores/Consoles/Sega/PicoDrive/PicoDrive.cs index 7e5c2d5fb2..d6fc0a0b10 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Sega/PicoDrive/PicoDrive.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Sega/PicoDrive/PicoDrive.cs @@ -58,7 +58,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.PicoDrive MmapHeapSizeKB = 4096, PlainHeapSizeKB = 64, SkipCoreConsistencyCheck = comm.CorePreferences.HasFlag(CoreComm.CorePreferencesFlags.WaterboxCoreConsistencyCheck), - SkipMemoryConsistencyCheck = comm.CorePreferences.HasFlag(CoreComm.CorePreferencesFlags.WaterboxCoreConsistencyCheck), + SkipMemoryConsistencyCheck = comm.CorePreferences.HasFlag(CoreComm.CorePreferencesFlags.WaterboxMemoryConsistencyCheck), }); if (has32xBios) diff --git a/src/BizHawk.Emulation.Cores/Consoles/Sega/Saturn/Saturnus.cs b/src/BizHawk.Emulation.Cores/Consoles/Sega/Saturn/Saturnus.cs index 58920c2407..4a8f705c6c 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Sega/Saturn/Saturnus.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Sega/Saturn/Saturnus.cs @@ -95,7 +95,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.Saturn PlainHeapSizeKB = 24 * 1024, // up to 16MB of cart ram StartAddress = LibSaturnus.StartAddress, SkipCoreConsistencyCheck = comm.CorePreferences.HasFlag(CoreComm.CorePreferencesFlags.WaterboxCoreConsistencyCheck), - SkipMemoryConsistencyCheck = comm.CorePreferences.HasFlag(CoreComm.CorePreferencesFlags.WaterboxCoreConsistencyCheck), + SkipMemoryConsistencyCheck = comm.CorePreferences.HasFlag(CoreComm.CorePreferencesFlags.WaterboxMemoryConsistencyCheck), }); SetFirmwareCallbacks(); diff --git a/src/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/GPGX.cs b/src/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/GPGX.cs index fffe3d428a..ba38ce5c8a 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/GPGX.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/GPGX.cs @@ -53,7 +53,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.gpgx PlainHeapSizeKB = 64, MmapHeapSizeKB = 1 * 1024, SkipCoreConsistencyCheck = comm.CorePreferences.HasFlag(CoreComm.CorePreferencesFlags.WaterboxCoreConsistencyCheck), - SkipMemoryConsistencyCheck = comm.CorePreferences.HasFlag(CoreComm.CorePreferencesFlags.WaterboxCoreConsistencyCheck), + SkipMemoryConsistencyCheck = comm.CorePreferences.HasFlag(CoreComm.CorePreferencesFlags.WaterboxMemoryConsistencyCheck), }); using (_elf.EnterExit()) diff --git a/src/BizHawk.Emulation.Cores/Waterbox/PeRunner.cs b/src/BizHawk.Emulation.Cores/Waterbox/PeRunner.cs index 1abd671bcb..4a7b053895 100644 --- a/src/BizHawk.Emulation.Cores/Waterbox/PeRunner.cs +++ b/src/BizHawk.Emulation.Cores/Waterbox/PeRunner.cs @@ -58,12 +58,15 @@ namespace BizHawk.Emulation.Cores.Waterbox public ulong StartAddress { get; set; } = PeRunner.CanonicalStart; /// - /// Skips the "core consistency check" + /// Skips the check that the wbx file and other associated dlls match from state save to state load. + /// DO NOT SET THIS TO TRUE. A different executable most likely means different meanings for memory locations, + /// and nothing will make sense. /// public bool SkipCoreConsistencyCheck { get; set; } = false; /// - /// Skips the "memory consistency check" + /// Skips the check that the initial memory state (after init, but before any running) matches from state save to state load. + /// DO NOT SET THIS TO TRUE. The initial memory state must be the same for the XORed memory contents in the savestate to make sense. /// public bool SkipMemoryConsistencyCheck { get; set; } = false; }