parent
d970ccf544
commit
7b26a6b573
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue