Remove the obsolete MemoryDomain.FromIntPtrSwap16() method

This commit is contained in:
adelikat 2017-04-24 13:52:52 -05:00
parent 54ebe75d2b
commit 1cb6289e13
3 changed files with 10 additions and 22 deletions

View File

@ -35,17 +35,6 @@ namespace BizHawk.Emulation.Common
return new MemoryDomainByteArray(name, endian, data, writable, wordSize); return new MemoryDomainByteArray(name, endian, data, writable, wordSize);
} }
/// <summary>
/// create a memorydomain that references an unmanaged memory block with 16 bit swaps
/// </summary>
/// <param name="data">must remain valid as long as the MemoryDomain exists!</param>
/// <param name="writable">if false, writes will be ignored</param>
[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() public override string ToString()
{ {
return Name; return Name;

View File

@ -42,11 +42,10 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.gpgx
} }
else else
{ {
// TODO: are the Z80 domains really Swap16 in the core? Check this // TODO: are the Z80 domains really Swap16 in the core? Check this
//var byteSize = name.Contains("Z80") ? 1 : 2; //var byteSize = name.Contains("Z80") ? 1 : 2;
mm.Add(MemoryDomain.FromIntPtrSwap16(name, size, mm.Add(new MemoryDomainIntPtrSwap16(name, MemoryDomain.Endian.Big, area, size, name != "MD CART" && name != "CD BOOT ROM"));
MemoryDomain.Endian.Big, area, name != "MD CART" && name != "CD BOOT ROM"));
} }
} }
var m68Bus = new MemoryDomainDelegate("M68K BUS", 0x1000000, MemoryDomain.Endian.Big, var m68Bus = new MemoryDomainDelegate("M68K BUS", 0x1000000, MemoryDomain.Endian.Big,

View File

@ -44,19 +44,19 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.gpgx64
else else
{ {
// TODO: are the Z80 domains really Swap16 in the core? Check this // TODO: are the Z80 domains really Swap16 in the core? Check this
mm.Add(MemoryDomain.FromIntPtrSwap16(name, size, mm.Add(new MemoryDomainIntPtrSwap16(name, MemoryDomain.Endian.Big, area, size, true));
MemoryDomain.Endian.Big, area, name != "MD CART" && name != "CD BOOT ROM"));
} }
} }
var m68Bus = new MemoryDomainDelegate("M68K BUS", 0x1000000, MemoryDomain.Endian.Big, var m68Bus = new MemoryDomainDelegate("M68K BUS", 0x1000000, MemoryDomain.Endian.Big,
delegate (long addr) delegate(long addr)
{ {
var a = (uint)addr; var a = (uint)addr;
if (a >= 0x1000000) if (a >= 0x1000000)
throw new ArgumentOutOfRangeException(); throw new ArgumentOutOfRangeException();
return Core.gpgx_peek_m68k_bus(a); return Core.gpgx_peek_m68k_bus(a);
}, },
delegate (long addr, byte val) delegate(long addr, byte val)
{ {
var a = (uint)addr; var a = (uint)addr;
if (a >= 0x1000000) if (a >= 0x1000000)
@ -67,14 +67,14 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.gpgx64
mm.Add(m68Bus); mm.Add(m68Bus);
var s68Bus = new MemoryDomainDelegate("S68K BUS", 0x1000000, MemoryDomain.Endian.Big, var s68Bus = new MemoryDomainDelegate("S68K BUS", 0x1000000, MemoryDomain.Endian.Big,
delegate (long addr) delegate(long addr)
{ {
var a = (uint)addr; var a = (uint)addr;
if (a >= 0x1000000) if (a >= 0x1000000)
throw new ArgumentOutOfRangeException(); throw new ArgumentOutOfRangeException();
return Core.gpgx_peek_s68k_bus(a); return Core.gpgx_peek_s68k_bus(a);
}, },
delegate (long addr, byte val) delegate(long addr, byte val)
{ {
var a = (uint)addr; var a = (uint)addr;
if (a >= 0x1000000) if (a >= 0x1000000)