diff --git a/BizHawk.Emulation.Cores/Consoles/Sega/gpgx32/GPGX.IDisassembler.cs b/BizHawk.Emulation.Cores/Consoles/Sega/gpgx32/GPGX.IDisassembler.cs index 3b47510b5a..473d033574 100644 --- a/BizHawk.Emulation.Cores/Consoles/Sega/gpgx32/GPGX.IDisassembler.cs +++ b/BizHawk.Emulation.Cores/Consoles/Sega/gpgx32/GPGX.IDisassembler.cs @@ -29,9 +29,9 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.gpgx32 public string Disassemble(MemoryDomain m, uint addr, out int length) { - _disassemblerInstance.ReadWord = (a) => (short)m.PeekWord(a, m.EndianType == MemoryDomain.Endian.Big); + _disassemblerInstance.ReadWord = (a) => (short)m.PeekUshort(a, m.EndianType == MemoryDomain.Endian.Big); _disassemblerInstance.ReadByte = (a) => (sbyte)m.PeekByte(a); - _disassemblerInstance.ReadLong = (a) => (int)m.PeekDWord(a, m.EndianType == MemoryDomain.Endian.Big); + _disassemblerInstance.ReadLong = (a) => (int)m.PeekUint(a, m.EndianType == MemoryDomain.Endian.Big); var info = _disassemblerInstance.Disassemble((int)addr); length = info.Length; diff --git a/BizHawk.Emulation.Cores/Consoles/Sega/gpgx32/GPGX.IMemoryDomains.cs b/BizHawk.Emulation.Cores/Consoles/Sega/gpgx32/GPGX.IMemoryDomains.cs index 8794274b04..219d91abf1 100644 --- a/BizHawk.Emulation.Cores/Consoles/Sega/gpgx32/GPGX.IMemoryDomains.cs +++ b/BizHawk.Emulation.Cores/Consoles/Sega/gpgx32/GPGX.IMemoryDomains.cs @@ -25,7 +25,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.gpgx32 { // vram pokes need to go through hook which invalidates cached tiles byte* p = (byte*)area; - mm.Add(new MemoryDomain(name, size, MemoryDomain.Endian.Unknown, + mm.Add(new MemoryDomainDelegate(name, size, MemoryDomain.Endian.Unknown, delegate (long addr) { if (addr < 0 || addr >= 65536) @@ -38,16 +38,18 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.gpgx32 throw new ArgumentOutOfRangeException(); LibGPGX.gpgx_poke_vram(((int)addr) ^ 1, val); }, - byteSize: 2)); + wordSize: 2)); } else { - var byteSize = name.Contains("Z80") ? 1 : 2; - mm.Add(MemoryDomain.FromIntPtrSwap16(name, size, MemoryDomain.Endian.Big, area, writable: true, byteSize: byteSize)); + // 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")); } } - var m68Bus = new MemoryDomain("M68K BUS", 0x1000000, MemoryDomain.Endian.Big, + var m68Bus = new MemoryDomainDelegate("M68K BUS", 0x1000000, MemoryDomain.Endian.Big, delegate (long addr) { var a = (uint)addr; @@ -65,7 +67,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.gpgx32 mm.Add(m68Bus); - var s68Bus = new MemoryDomain("S68K BUS", 0x1000000, MemoryDomain.Endian.Big, + var s68Bus = new MemoryDomainDelegate("S68K BUS", 0x1000000, MemoryDomain.Endian.Big, delegate (long addr) { var a = (uint)addr; diff --git a/output/dll/libgenplusgx.dll b/output/dll/libgenplusgx.dll index 1dcce9a51b..c5551edff9 100644 Binary files a/output/dll/libgenplusgx.dll and b/output/dll/libgenplusgx.dll differ