diff --git a/BizHawk.Client.EmuHawk/MainForm.cs b/BizHawk.Client.EmuHawk/MainForm.cs index e6cd991137..ef29f795f5 100644 --- a/BizHawk.Client.EmuHawk/MainForm.cs +++ b/BizHawk.Client.EmuHawk/MainForm.cs @@ -1347,8 +1347,9 @@ namespace BizHawk.Client.EmuHawk { byte[] sram; - // GBA core might not know how big the saveram ought to be, so just send it the whole file - if (Global.Emulator is GBA) + // GBA meteor core might not know how big the saveram ought to be, so just send it the whole file + // GBA vba-next core will try to eat anything, regardless of size + if (Global.Emulator is GBA || Global.Emulator is VBANext) { sram = File.ReadAllBytes(PathManager.SaveRamPath(Global.Game)); } @@ -1362,6 +1363,7 @@ namespace BizHawk.Client.EmuHawk // MessageBox.Show("Error: tried to load saveram, but core would not accept it?"); return; } + // why do we silently truncate\pad here instead of warning\erroring? sram = new byte[oldram.Length]; using (var reader = new BinaryReader( new FileStream(PathManager.SaveRamPath(Global.Game), FileMode.Open, FileAccess.Read))) diff --git a/vbanext/instance.cpp b/vbanext/instance.cpp index 473c3f67ea..9f48a56e07 100644 --- a/vbanext/instance.cpp +++ b/vbanext/instance.cpp @@ -8881,7 +8881,7 @@ bool skipBios; // it's a few bytes in the linkscript to make a multiboot image work in normal boot as well, // and most of the ones i've seen have done that, so this is not terribly useful static const bool cpuIsMultiBoot = false; -int cpuSaveType; // used only in init() to set up function pointers +int cpuSaveType; // used only in init() to set up function pointers and for save file determination bool mirroringEnable; int cpuDmaCount;