GNOME Bugzilla – Bug 787548
mGBA fails to save memory
Last modified: 2017-09-11 14:51:31 UTC
In mGBA, retro_get_memory_size value can be less than the actual allocated memory size. In this case, retro-gtk doesn't save it at all and fails with this: ** (gnome-games:30172): WARNING **: retro-runner.vala:442: Unexpected RAM data size: got 65536, expected 131072 See: https://github.com/libretro/mgba/blob/master/src/platform/libretro/libretro.c#L611 https://github.com/libretro/mgba/blob/master/src/platform/libretro/libretro.c#L477 https://github.com/libretro/mgba/blob/master/src/platform/libretro/libretro.c#L513 This may be either a misbehavior on mGBA side or a corner-case retro-gtk should support.
Created attachment 359533 [details] [review] retro-core: Support partially setting memory regions When a memory region is set with less data than expected, fill the rest with zeros instead of failing. This helps supporting Libretro cores with fluctuating memory sizes.
Attachment 359533 [details] pushed as e3f9193 - retro-core: Support partially setting memory regions