This commit is contained in:
alyosha-tas 2018-11-22 10:12:15 -06:00
commit 6849e55931
1 changed files with 6 additions and 1 deletions

View File

@ -24,6 +24,11 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.gpgx
if (area == IntPtr.Zero || pname == IntPtr.Zero || size == 0)
continue;
string name = Marshal.PtrToStringAnsi(pname);
var endian = name == "Z80 RAM"
? MemoryDomain.Endian.Little
: MemoryDomain.Endian.Big;
if (name == "VRAM")
{
// vram pokes need to go through hook which invalidates cached tiles
@ -47,7 +52,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.gpgx
else
{
// TODO: are the Z80 domains really Swap16 in the core? Check this
mm.Add(new MemoryDomainIntPtrSwap16Monitor(name, MemoryDomain.Endian.Big, area, size, name != "MD CART" && name != "CD BOOT ROM", _elf));
mm.Add(new MemoryDomainIntPtrSwap16Monitor(name, endian, area, size, name != "MD CART" && name != "CD BOOT ROM", _elf));
}
}
var m68Bus = new MemoryDomainDelegate("M68K BUS", 0x1000000, MemoryDomain.Endian.Big,