gba: more saveram connection
This commit is contained in:
parent
e6c3e922c5
commit
6476d80fb1
|
@ -1347,8 +1347,9 @@ namespace BizHawk.Client.EmuHawk
|
||||||
{
|
{
|
||||||
byte[] sram;
|
byte[] sram;
|
||||||
|
|
||||||
// GBA core might not know how big the saveram ought to be, so just send it the whole file
|
// GBA meteor core might not know how big the saveram ought to be, so just send it the whole file
|
||||||
if (Global.Emulator is GBA)
|
// 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));
|
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?");
|
// MessageBox.Show("Error: tried to load saveram, but core would not accept it?");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
// why do we silently truncate\pad here instead of warning\erroring?
|
||||||
sram = new byte[oldram.Length];
|
sram = new byte[oldram.Length];
|
||||||
using (var reader = new BinaryReader(
|
using (var reader = new BinaryReader(
|
||||||
new FileStream(PathManager.SaveRamPath(Global.Game), FileMode.Open, FileAccess.Read)))
|
new FileStream(PathManager.SaveRamPath(Global.Game), FileMode.Open, FileAccess.Read)))
|
||||||
|
|
|
@ -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,
|
// 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
|
// and most of the ones i've seen have done that, so this is not terribly useful
|
||||||
static const bool cpuIsMultiBoot = false;
|
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;
|
bool mirroringEnable;
|
||||||
|
|
||||||
int cpuDmaCount;
|
int cpuDmaCount;
|
||||||
|
|
Loading…
Reference in New Issue