[ChannelF] Add cart ram to memory domains, ensure loading a savestate keep the correct byte array for memory domains, expose cart ram for cheevos
This commit is contained in:
parent
60fae3540d
commit
425cafe1e8
|
@ -565,6 +565,11 @@ namespace BizHawk.Client.EmuHawk
|
|||
// special case
|
||||
mfs.Add(new ChanFMemFunctions(debuggable, domains["VRAM"]));
|
||||
mfs.Add(new(domains.SystemBus, 0, domains.SystemBus.Size));
|
||||
// only add in SRAM if it's from HANG/MAZE carts (where SRAM isn't on the System Bus)
|
||||
if (domains.Has("SRAM") && domains["SRAM"].Size == 0x200)
|
||||
{
|
||||
mfs.Add(new(domains["SRAM"], 0, domains["SRAM"].Size));
|
||||
}
|
||||
break;
|
||||
case ConsoleID.PCEngineCD:
|
||||
mfs.Add(new(domains["System Bus (21 bit)"], 0x1F0000, 0x2000));
|
||||
|
|
|
@ -12,6 +12,10 @@ namespace BizHawk.Emulation.Cores.Consoles.ChannelF
|
|||
public virtual void SyncByteArrayDomain(ChannelF sys)
|
||||
{
|
||||
sys.SyncByteArrayDomain("ROM", _rom);
|
||||
if (_ram?.Length > 0)
|
||||
{
|
||||
sys.SyncByteArrayDomain("SRAM", _ram);
|
||||
}
|
||||
}
|
||||
|
||||
public virtual byte[] ROM
|
||||
|
|
|
@ -36,6 +36,12 @@ namespace BizHawk.Emulation.Cores.Consoles.ChannelF
|
|||
CPU.SyncState(ser);
|
||||
Cartridge.SyncState(ser);
|
||||
ser.EndSection();
|
||||
|
||||
if (ser.IsReader)
|
||||
{
|
||||
SyncAllByteArrayDomains();
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
byte[] core = null;
|
||||
|
|
Loading…
Reference in New Issue