diff --git a/mgba b/mgba index fc7b04b5f0..2876df5580 160000 --- a/mgba +++ b/mgba @@ -1 +1 @@ -Subproject commit fc7b04b5f081945099f83ad8fe51539ada4adfe9 +Subproject commit 2876df558067b85877cb4bb0241db947a92b7cae diff --git a/output/dll/mgba.dll b/output/dll/mgba.dll index 94d9ccf264..3907db16bc 100644 Binary files a/output/dll/mgba.dll and b/output/dll/mgba.dll differ diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/LibmGBA.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/LibmGBA.cs index e3f5df517d..e32c533484 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/LibmGBA.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/LibmGBA.cs @@ -183,18 +183,18 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBA [UnmanagedFunctionPointer(cc)] public delegate void TraceCallback(string msg); - // [BizImport(cc, Compatibility = true)] - // public abstract void BizSetTraceCallback(TraceCallback cb); + [BizImport(cc, Compatibility = true)] + public abstract void BizSetTraceCallback(IntPtr ctx, TraceCallback cb); [UnmanagedFunctionPointer(cc)] public delegate void MemCallback(uint addr, mWatchpointType type, uint oldValue, uint newValue); - // [BizImport(cc, Compatibility = true)] - // public abstract void BizSetMemCallback(MemCallback cb); + [BizImport(cc, Compatibility = true)] + public abstract void BizSetMemCallback(IntPtr ctx, MemCallback cb); [UnmanagedFunctionPointer(cc)] public delegate void ExecCallback(uint pc); - // [BizImport(cc, Compatibility = true)] - // public abstract void BizSetExecCallback(ExecCallback cb); + [BizImport(cc, Compatibility = true)] + public abstract void BizSetExecCallback(IntPtr ctx, ExecCallback cb); [BizImport(cc, Compatibility = true)] public abstract int BizSetWatchpoint(IntPtr ctx, uint addr, mWatchpointType type); diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/MGBAHawk.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/MGBAHawk.cs index 569f64cd14..a655ce0cca 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/MGBAHawk.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/MGBAHawk.cs @@ -125,7 +125,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBA WireMemoryDomainPointers(); } - // LibmGBA.BizSetTraceCallback(Tracer.Enabled ? _tracecb : null); + LibmGBA.BizSetTraceCallback(Core, Tracer.Enabled ? _tracecb : null); IsLagFrame = LibmGBA.BizAdvance( Core, diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/MGBAMemoryCallbackSystem.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/MGBAMemoryCallbackSystem.cs index 178e1dd36c..482a480ae2 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/MGBAMemoryCallbackSystem.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/MGBAMemoryCallbackSystem.cs @@ -56,11 +56,11 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBA { _executeCallback = RunExecCallback; _execPcs[callback.Address.Value] = callback; - // MGBAHawk.ZZHacky.BizSetExecCallback(_executeCallback); + MGBAHawk.ZZHacky.BizSetExecCallback(_mgba.Core, _executeCallback); } else { - // MGBAHawk.ZZHacky.BizSetMemCallback(container.CallDelegate); + MGBAHawk.ZZHacky.BizSetMemCallback(_mgba.Core, container.CallDelegate); container.ID = MGBAHawk.ZZHacky.BizSetWatchpoint(_mgba.Core, callback.Address.Value, container.WatchPointType); } @@ -79,7 +79,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBA if (_callbacks.All(cb => cb.Callback.Type != MemoryCallbackType.Execute)) { _executeCallback = null; - // MGBAHawk.ZZHacky.BizSetExecCallback(null); + MGBAHawk.ZZHacky.BizSetExecCallback(_mgba.Core, null); } } else if (MGBAHawk.ZZHacky.BizClearWatchpoint(_mgba.Core, cbToRemove.ID))