diff --git a/Assets/dll/libsameboy.dll b/Assets/dll/libsameboy.dll index 1fa20ff8b7..e470f65ffb 100644 Binary files a/Assets/dll/libsameboy.dll and b/Assets/dll/libsameboy.dll differ diff --git a/Assets/dll/libsameboy.so b/Assets/dll/libsameboy.so index cc6e53d5ec..c2f6ef1612 100755 Binary files a/Assets/dll/libsameboy.so and b/Assets/dll/libsameboy.so differ diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/SameBoy/SameBoy.ISaveRam.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/SameBoy/SameBoy.ISaveRam.cs index c258cc2045..cef62cb31f 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/SameBoy/SameBoy.ISaveRam.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/SameBoy/SameBoy.ISaveRam.cs @@ -19,7 +19,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.Sameboy return ret; } - return Array.Empty(); + return null; } public void StoreSaveRam(byte[] data) @@ -30,7 +30,10 @@ namespace BizHawk.Emulation.Cores.Nintendo.Sameboy throw new ArgumentException("Size of saveram data does not match expected!"); } - LibSameboy.sameboy_loadsram(SameboyState, data, data.Length); + if (expected > 0) + { + LibSameboy.sameboy_loadsram(SameboyState, data, data.Length); + } } } } diff --git a/submodules/sameboy/BizInterface.c b/submodules/sameboy/BizInterface.c index 67dbaa3b8d..86e1e9fac8 100644 --- a/submodules/sameboy/BizInterface.c +++ b/submodules/sameboy/BizInterface.c @@ -8,21 +8,16 @@ #define EXPORT __attribute__((visibility("default"))) #endif +typedef int8_t s8; typedef int16_t s16; +typedef int32_t s32; +typedef int64_t s64; typedef uint8_t u8; typedef uint16_t u16; typedef uint32_t u32; typedef uint64_t u64; -typedef enum -{ - IS_DMG = 0, - IS_CGB = 1, - IS_AGB = 2, - RTC_ACCURATE = 4, -} LoadFlags; - typedef void (*input_callback_t)(void); typedef void (*trace_callback_t)(u16); typedef void (*memory_callback_t)(u16); diff --git a/submodules/sameboy/libsameboy b/submodules/sameboy/libsameboy index 4c6bc91ded..b31bd58642 160000 --- a/submodules/sameboy/libsameboy +++ b/submodules/sameboy/libsameboy @@ -1 +1 @@ -Subproject commit 4c6bc91ded1b68de887986ff1495060690cd4172 +Subproject commit b31bd586427d486d556a0977084c0d0ab4f64089