diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesApi.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesApi.cs index 4f61f1c23d..0af74a5e41 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesApi.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesApi.cs @@ -215,6 +215,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.SNES public uint aa, rd; [FieldOffset(28)] public byte sp, dp, db, mdr; + [FieldOffset(32)] + public ushort v, h; } [StructLayout(LayoutKind.Sequential)] @@ -300,17 +302,14 @@ namespace BizHawk.Emulation.Cores.Nintendo.SNES [FieldOffset(176)] public CPURegs cpuregs; - [FieldOffset(208)] + [FieldOffset(212)] public LayerEnables layerEnables; - [FieldOffset(220)] + [FieldOffset(224)] //static configuration-type information which can be grabbed off the core at any time without even needing a QUERY command public SNES_REGION region; - [FieldOffset(224)] - public SNES_MAPPER mapper; - [FieldOffset(228)] - public int unused; + public SNES_MAPPER mapper; //utilities //TODO: make internal, wrap on the API instead of the comm diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesCore.IDebuggable.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesCore.IDebuggable.cs index 37ad308671..7736c32b70 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesCore.IDebuggable.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesCore.IDebuggable.cs @@ -46,6 +46,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.SNES ["Flag I"] = fi, ["Flag Z"] = fz, ["Flag C"] = fc, + ["V"] = regs.v, + ["H"] = regs.h }; } diff --git a/output/dll/libsnes.wbx.gz b/output/dll/libsnes.wbx.gz index 67a8e75a6a..c644208284 100644 Binary files a/output/dll/libsnes.wbx.gz and b/output/dll/libsnes.wbx.gz differ diff --git a/waterbox/libsnes/bsnes/snes/cpu/core/disassembler/disassembler.cpp b/waterbox/libsnes/bsnes/snes/cpu/core/disassembler/disassembler.cpp index 638e8d202c..0bca14ea6e 100644 --- a/waterbox/libsnes/bsnes/snes/cpu/core/disassembler/disassembler.cpp +++ b/waterbox/libsnes/bsnes/snes/cpu/core/disassembler/disassembler.cpp @@ -441,7 +441,7 @@ void CPUcore::disassemble_opcode(char *output, uint32 addr) { strcat(s, t); strcat(s, " "); - sprintf(t, "V:%3d H:%4d", cpu.vcounter(), cpu.hcounter()); + sprintf(t, "V:%3d H:%4d", cpu.vcounter(), cpu.hdot()); strcat(s, t); } diff --git a/waterbox/libsnes/bsnes/target-libsnes/libsnes_pwrap.cpp b/waterbox/libsnes/bsnes/target-libsnes/libsnes_pwrap.cpp index 55d01886f0..b8ea3d64fc 100644 --- a/waterbox/libsnes/bsnes/target-libsnes/libsnes_pwrap.cpp +++ b/waterbox/libsnes/bsnes/target-libsnes/libsnes_pwrap.cpp @@ -113,6 +113,7 @@ struct CPURegsComm { u8 p, nothing; u32 aa, rd; u8 sp, dp, db, mdr; + u16 v, h; } #ifndef _MSC_VER __attribute__((__packed__)) @@ -174,8 +175,6 @@ struct CommStruct uint32 region; uint32 mapper; - int32 padding4; - //=========================================================== //private stuff @@ -537,6 +536,8 @@ void QUERY_peek_cpu_regs() { comm.cpuregs.vector = SNES::cpu.regs.vector; comm.cpuregs.p = SNES::cpu.regs.p; comm.cpuregs.nothing = 0; + comm.cpuregs.v = SNES::cpu.vcounter(); + comm.cpuregs.h = SNES::cpu.hdot(); } void QUERY_peek_set_cdl() { for (int i = 0; i