From e6f42135647755e2d239684faeb822d17acd2864 Mon Sep 17 00:00:00 2001 From: zeromus Date: Tue, 12 Nov 2013 20:35:59 +0000 Subject: [PATCH] fix some snes breakpoint bugs --- BizHawk.Emulation/Consoles/Nintendo/SNES/LibsnesApi.cs | 1 + BizHawk.Emulation/Consoles/Nintendo/SNES/LibsnesCore.cs | 9 ++++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/BizHawk.Emulation/Consoles/Nintendo/SNES/LibsnesApi.cs b/BizHawk.Emulation/Consoles/Nintendo/SNES/LibsnesApi.cs index 4c99d66f5e..a48a0726f7 100644 --- a/BizHawk.Emulation/Consoles/Nintendo/SNES/LibsnesApi.cs +++ b/BizHawk.Emulation/Consoles/Nintendo/SNES/LibsnesApi.cs @@ -965,6 +965,7 @@ namespace BizHawk.Emulation.Consoles.Nintendo.SNES case eMessage.eMessage_snes_cb_hook_exec: { var addr = brPipe.ReadInt32(); + ExecHook((uint)addr); break; } case eMessage.eMessage_snes_cb_hook_read: diff --git a/BizHawk.Emulation/Consoles/Nintendo/SNES/LibsnesCore.cs b/BizHawk.Emulation/Consoles/Nintendo/SNES/LibsnesCore.cs index 71e2e4f549..1dba6f056c 100644 --- a/BizHawk.Emulation/Consoles/Nintendo/SNES/LibsnesCore.cs +++ b/BizHawk.Emulation/Consoles/Nintendo/SNES/LibsnesCore.cs @@ -195,19 +195,22 @@ namespace BizHawk.Emulation.Consoles.Nintendo.SNES { CoreComm.MemoryCallbackSystem.CallRead(addr); //we RefreshMemoryCallbacks() after the trigger in case the trigger turns itself off at that point - RefreshMemoryCallbacks(); + //EDIT: for now, theres some IPC re-entrancy problem + //RefreshMemoryCallbacks(); } void ExecHook(uint addr) { CoreComm.MemoryCallbackSystem.CallExecute(addr); //we RefreshMemoryCallbacks() after the trigger in case the trigger turns itself off at that point - RefreshMemoryCallbacks(); + //EDIT: for now, theres some IPC re-entrancy problem + //RefreshMemoryCallbacks(); } void WriteHook(uint addr, byte val) { CoreComm.MemoryCallbackSystem.CallWrite(addr); //we RefreshMemoryCallbacks() after the trigger in case the trigger turns itself off at that point - RefreshMemoryCallbacks(); + //EDIT: for now, theres some IPC re-entrancy problem + //RefreshMemoryCallbacks(); } LibsnesApi.snes_scanlineStart_t scanlineStart_cb;