update sameboy, fix bug with SRAM loading

This commit is contained in:
CasualPokePlayer 2022-04-02 10:22:18 -07:00
parent cc0a30e5b2
commit 178264ce67
5 changed files with 9 additions and 11 deletions

Binary file not shown.

Binary file not shown.

View File

@ -19,7 +19,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.Sameboy
return ret;
}
return Array.Empty<byte>();
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);
}
}
}
}

View File

@ -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);

@ -1 +1 @@
Subproject commit 4c6bc91ded1b68de887986ff1495060690cd4172
Subproject commit b31bd586427d486d556a0977084c0d0ab4f64089