diff --git a/Assets/dll/libgambatte.dll b/Assets/dll/libgambatte.dll
index 591f5bf1f0..28e87e6af6 100644
Binary files a/Assets/dll/libgambatte.dll and b/Assets/dll/libgambatte.dll differ
diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.cs
index c43ec09ebd..853e4178ff 100644
--- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.cs
+++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.cs
@@ -60,16 +60,14 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
switch (_syncSettings.ConsoleMode)
{
case GambatteSyncSettings.ConsoleModeType.GB:
- flags |= LibGambatte.LoadFlags.FORCE_DMG;
break;
case GambatteSyncSettings.ConsoleModeType.GBC:
+ flags |= LibGambatte.LoadFlags.CGB_MODE;
break;
case GambatteSyncSettings.ConsoleModeType.GBA:
- flags |= LibGambatte.LoadFlags.GBA_CGB;
+ flags |= LibGambatte.LoadFlags.CGB_MODE | LibGambatte.LoadFlags.GBA_FLAG;
break;
default:
- if (game.System == "GB")
- flags |= LibGambatte.LoadFlags.FORCE_DMG;
break;
}
@@ -86,18 +84,18 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
byte[] bios;
string biosSystemId;
string biosId;
- if ((flags & LibGambatte.LoadFlags.FORCE_DMG) == LibGambatte.LoadFlags.FORCE_DMG)
- {
- biosSystemId = "GB";
- biosId = "World";
- IsCgb = false;
- }
- else
+ if ((flags & LibGambatte.LoadFlags.CGB_MODE) == LibGambatte.LoadFlags.CGB_MODE)
{
biosSystemId = "GBC";
biosId = _syncSettings.ConsoleMode == GambatteSyncSettings.ConsoleModeType.GBA ? "AGB" : "World";
IsCgb = true;
}
+ else
+ {
+ biosSystemId = "GB";
+ biosId = "World";
+ IsCgb = false;
+ }
if (_syncSettings.EnableBIOS)
{
diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/LibGambatte.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/LibGambatte.cs
index 10309f993b..54cdd92ac5 100644
--- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/LibGambatte.cs
+++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/LibGambatte.cs
@@ -20,10 +20,10 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
[Flags]
public enum LoadFlags : uint
{
- /// Treat the ROM as not having CGB support regardless of what its header advertises
- FORCE_DMG = 1,
+ /// Treat the ROM as having CGB support regardless of what its header advertises
+ CGB_MODE = 1,
/// Use GBA intial CPU register values when in CGB mode.
- GBA_CGB = 2,
+ GBA_FLAG = 2,
/// Use heuristics to detect and support some multicart MBCs disguised as MBC1.
MULTICART_COMPAT = 4
}
diff --git a/submodules/gambatte b/submodules/gambatte
index bfac3302a0..0bbe14d99f 160000
--- a/submodules/gambatte
+++ b/submodules/gambatte
@@ -1 +1 @@
-Subproject commit bfac3302a0a26ba306b873e538d03168d4c4716f
+Subproject commit 0bbe14d99f7e529bf119461965b26b988930ebe0