gba: more saveram connection

This commit is contained in:
goyuken 2014-08-14 21:19:54 +00:00
parent e6c3e922c5
commit 6476d80fb1
2 changed files with 5 additions and 3 deletions

View File

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

View File

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