diff --git a/src/BizHawk.Emulation.Cores/Computers/DOS/DOSBox.ISaveRam.cs b/src/BizHawk.Emulation.Cores/Computers/DOS/DOSBox.ISaveRam.cs deleted file mode 100644 index 43e002fb3d..0000000000 --- a/src/BizHawk.Emulation.Cores/Computers/DOS/DOSBox.ISaveRam.cs +++ /dev/null @@ -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[] 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); - } - } - - } - } -} diff --git a/src/BizHawk.Emulation.Cores/Computers/DOS/LibDOSBox.cs b/src/BizHawk.Emulation.Cores/Computers/DOS/LibDOSBox.cs index 2299d9c4b2..140610169c 100644 --- a/src/BizHawk.Emulation.Cores/Computers/DOS/LibDOSBox.cs +++ b/src/BizHawk.Emulation.Cores/Computers/DOS/LibDOSBox.cs @@ -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(); diff --git a/waterbox/dosbox/dosbox-x b/waterbox/dosbox/dosbox-x index e2b4045639..116c7bcf65 160000 --- a/waterbox/dosbox/dosbox-x +++ b/waterbox/dosbox/dosbox-x @@ -1 +1 @@ -Subproject commit e2b4045639cd51efea595513eaae1fcb6d680855 +Subproject commit 116c7bcf65fe640ac6efc9accc727553830a9f5a