diff --git a/Assets/dll/gpgx.wbx.zst b/Assets/dll/gpgx.wbx.zst index 1d798866c04..517ad744954 100644 Binary files a/Assets/dll/gpgx.wbx.zst and b/Assets/dll/gpgx.wbx.zst differ diff --git a/src/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/GPGX.ITraceable.cs b/src/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/GPGX.ITraceable.cs index 1ee47f63b27..0c2a5691aeb 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/GPGX.ITraceable.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/GPGX.ITraceable.cs @@ -15,13 +15,13 @@ public class GPGXTraceBuffer( IDisassemblable disassembler) : CallbackBasedTraceBuffer(debuggableCore, memoryDomains, disassembler, TRACE_HEADER) { - private const string TRACE_HEADER = "M68K: PC, machine code, mnemonic, operands, registers (D0-D7, A0-A7, SR, USP), flags (XNZVC)"; + private const string TRACE_HEADER = "M68K: PC, machine code, mnemonic, operands, registers (A0-A7, D0-D7, SR, USP), flags (XNZVC)"; protected override void TraceFromCallback(uint addr, uint value, uint flags) { var regs = DebuggableCore.GetCpuFlagsAndRegisters(); - var pc = (uint)regs["M68K PC"].Value; - var disasm = Disassembler.Disassemble(MemoryDomains.SystemBus, pc & 0xFFFFFF, out _); + var pc = (uint)regs["M68K PC"].Value & 0xFFFFFF; + var disasm = Disassembler.Disassemble(MemoryDomains.SystemBus, pc, out _); var sb = new StringBuilder(); diff --git a/waterbox/gpgx/cinterface/cinterface.c b/waterbox/gpgx/cinterface/cinterface.c index 1efc4474bbf..2fae99f0a68 100644 --- a/waterbox/gpgx/cinterface/cinterface.c +++ b/waterbox/gpgx/cinterface/cinterface.c @@ -1100,14 +1100,6 @@ GPGX_EX int gpgx_getregs(gpregister_t *regs) if ((system_hw & SYSTEM_PBC) == SYSTEM_MD) { #define MAKEREG(x) regs->name = "M68K " #x; regs->value = m68k_get_reg(M68K_REG_##x); regs++; ret++; - MAKEREG(D0); - MAKEREG(D1); - MAKEREG(D2); - MAKEREG(D3); - MAKEREG(D4); - MAKEREG(D5); - MAKEREG(D6); - MAKEREG(D7); MAKEREG(A0); MAKEREG(A1); MAKEREG(A2); @@ -1116,6 +1108,14 @@ GPGX_EX int gpgx_getregs(gpregister_t *regs) MAKEREG(A5); MAKEREG(A6); MAKEREG(A7); + MAKEREG(D0); + MAKEREG(D1); + MAKEREG(D2); + MAKEREG(D3); + MAKEREG(D4); + MAKEREG(D5); + MAKEREG(D6); + MAKEREG(D7); MAKEREG(PC); MAKEREG(SR); MAKEREG(SP); @@ -1146,14 +1146,6 @@ GPGX_EX int gpgx_getregs(gpregister_t *regs) if (system_hw == SYSTEM_MCD) { #define MAKEREG(x) regs->name = "S68K " #x; regs->value = s68k_get_reg(M68K_REG_##x); regs++; ret++; - MAKEREG(D0); - MAKEREG(D1); - MAKEREG(D2); - MAKEREG(D3); - MAKEREG(D4); - MAKEREG(D5); - MAKEREG(D6); - MAKEREG(D7); MAKEREG(A0); MAKEREG(A1); MAKEREG(A2); @@ -1162,6 +1154,14 @@ GPGX_EX int gpgx_getregs(gpregister_t *regs) MAKEREG(A5); MAKEREG(A6); MAKEREG(A7); + MAKEREG(D0); + MAKEREG(D1); + MAKEREG(D2); + MAKEREG(D3); + MAKEREG(D4); + MAKEREG(D5); + MAKEREG(D6); + MAKEREG(D7); MAKEREG(PC); MAKEREG(SR); MAKEREG(SP);