diff --git a/BizHawk.Emulation.Common/Base Implementations/MemoryDomain.cs b/BizHawk.Emulation.Common/Base Implementations/MemoryDomain.cs index a75ad4ffbe..3db494bc03 100644 --- a/BizHawk.Emulation.Common/Base Implementations/MemoryDomain.cs +++ b/BizHawk.Emulation.Common/Base Implementations/MemoryDomain.cs @@ -35,17 +35,6 @@ namespace BizHawk.Emulation.Common return new MemoryDomainByteArray(name, endian, data, writable, wordSize); } - /// - /// create a memorydomain that references an unmanaged memory block with 16 bit swaps - /// - /// must remain valid as long as the MemoryDomain exists! - /// if false, writes will be ignored - [Obsolete] - public static unsafe MemoryDomain FromIntPtrSwap16(string name, long size, Endian endian, IntPtr data, bool writable = true) - { - return new MemoryDomainIntPtrSwap16(name, endian, data, size, writable); - } - public override string ToString() { return Name; diff --git a/BizHawk.Emulation.Cores/Consoles/Sega/gpgx/GPGX.IMemoryDomains.cs b/BizHawk.Emulation.Cores/Consoles/Sega/gpgx/GPGX.IMemoryDomains.cs index 7bb4b11188..25a7791484 100644 --- a/BizHawk.Emulation.Cores/Consoles/Sega/gpgx/GPGX.IMemoryDomains.cs +++ b/BizHawk.Emulation.Cores/Consoles/Sega/gpgx/GPGX.IMemoryDomains.cs @@ -42,11 +42,10 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.gpgx } else - { - // TODO: are the Z80 domains really Swap16 in the core? Check this - //var byteSize = name.Contains("Z80") ? 1 : 2; - mm.Add(MemoryDomain.FromIntPtrSwap16(name, size, - MemoryDomain.Endian.Big, area, name != "MD CART" && name != "CD BOOT ROM")); + { + // TODO: are the Z80 domains really Swap16 in the core? Check this + //var byteSize = name.Contains("Z80") ? 1 : 2; + mm.Add(new MemoryDomainIntPtrSwap16(name, MemoryDomain.Endian.Big, area, size, name != "MD CART" && name != "CD BOOT ROM")); } } var m68Bus = new MemoryDomainDelegate("M68K BUS", 0x1000000, MemoryDomain.Endian.Big, diff --git a/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/GPGX.IMemoryDomains.cs b/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/GPGX.IMemoryDomains.cs index c6b3ce55ee..dad131593d 100644 --- a/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/GPGX.IMemoryDomains.cs +++ b/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/GPGX.IMemoryDomains.cs @@ -44,19 +44,19 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.gpgx64 else { // TODO: are the Z80 domains really Swap16 in the core? Check this - mm.Add(MemoryDomain.FromIntPtrSwap16(name, size, - MemoryDomain.Endian.Big, area, name != "MD CART" && name != "CD BOOT ROM")); + mm.Add(new MemoryDomainIntPtrSwap16(name, MemoryDomain.Endian.Big, area, size, true)); } } + var m68Bus = new MemoryDomainDelegate("M68K BUS", 0x1000000, MemoryDomain.Endian.Big, - delegate (long addr) + delegate(long addr) { var a = (uint)addr; if (a >= 0x1000000) throw new ArgumentOutOfRangeException(); return Core.gpgx_peek_m68k_bus(a); }, - delegate (long addr, byte val) + delegate(long addr, byte val) { var a = (uint)addr; if (a >= 0x1000000) @@ -67,14 +67,14 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.gpgx64 mm.Add(m68Bus); var s68Bus = new MemoryDomainDelegate("S68K BUS", 0x1000000, MemoryDomain.Endian.Big, - delegate (long addr) + delegate(long addr) { var a = (uint)addr; if (a >= 0x1000000) throw new ArgumentOutOfRangeException(); return Core.gpgx_peek_s68k_bus(a); }, - delegate (long addr, byte val) + delegate(long addr, byte val) { var a = (uint)addr; if (a >= 0x1000000)