Removing no-longer needed SRAM logic
This commit is contained in:
parent
a9387eee96
commit
488ec5ddf4
|
@ -1,59 +0,0 @@
|
|||
using BizHawk.Emulation.Common;
|
||||
|
||||
namespace BizHawk.Emulation.Cores.Computers.DOS
|
||||
{
|
||||
public partial class DOSBox : ISaveRam
|
||||
{
|
||||
public override bool SaveRamModified
|
||||
{
|
||||
get
|
||||
{
|
||||
bool sramChanged = _libDOSBox.sram_changed();
|
||||
return sramChanged;
|
||||
}
|
||||
}
|
||||
|
||||
public override byte[] CloneSaveRam()
|
||||
{
|
||||
var sramSize = _libDOSBox.get_sram_size();
|
||||
//Console.WriteLine("SRAM Size {0}", sramSize);
|
||||
|
||||
// Don't do anything if no writable hard disk was chosen
|
||||
if (_syncSettings.WriteableHardDisk == WriteableHardDiskOptions.None) return Array.Empty<byte>();
|
||||
|
||||
byte[] sramArray = new byte[sramSize];
|
||||
unsafe
|
||||
{
|
||||
fixed (byte* p = sramArray)
|
||||
{
|
||||
IntPtr ptr = (IntPtr) p;
|
||||
_libDOSBox.get_sram(ptr);
|
||||
}
|
||||
}
|
||||
|
||||
return sramArray;
|
||||
}
|
||||
|
||||
public override void StoreSaveRam(byte[] data)
|
||||
{
|
||||
if (data.Length != (int) _syncSettings.WriteableHardDisk)
|
||||
{
|
||||
Console.WriteLine("SRAM size {0} does not match that of the chosen writable hard disk {1}. Aborting SRAM loading.", data.Length, (int) _syncSettings.WriteableHardDisk);
|
||||
return;
|
||||
}
|
||||
|
||||
// Don't do anything if no writable hard disk was chosen
|
||||
if (_syncSettings.WriteableHardDisk == WriteableHardDiskOptions.None) return;
|
||||
|
||||
unsafe
|
||||
{
|
||||
fixed (byte* p = data)
|
||||
{
|
||||
IntPtr ptr = (IntPtr) p;
|
||||
_libDOSBox.set_sram(ptr);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
|
@ -63,19 +63,6 @@ namespace BizHawk.Emulation.Cores.Computers.DOS
|
|||
[BizImport(CC, Compatibility = true)]
|
||||
public abstract bool Init(bool joystick1Enabled, bool joystick2Enabled, bool mouseEnabled, ulong hardDiskDriveSize, ulong fpsNumerator, ulong fpsDenominator);
|
||||
|
||||
[BizImport(CC, Compatibility = true)]
|
||||
|
||||
public abstract bool sram_changed();
|
||||
|
||||
[BizImport(CC, Compatibility = true)]
|
||||
public abstract int get_sram_size();
|
||||
|
||||
[BizImport(CC, Compatibility = true)]
|
||||
public abstract void get_sram(IntPtr sramBuffer);
|
||||
|
||||
[BizImport(CC, Compatibility = true)]
|
||||
public abstract void set_sram(IntPtr sramBuffer);
|
||||
|
||||
[BizImport(CC, Compatibility = true)]
|
||||
public abstract bool getDriveActivityFlag();
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit e2b4045639cd51efea595513eaae1fcb6d680855
|
||||
Subproject commit 116c7bcf65fe640ac6efc9accc727553830a9f5a
|
Loading…
Reference in New Issue