diff --git a/BizHawk.Emulation/Interfaces/CoreComms.cs b/BizHawk.Emulation/Interfaces/CoreComms.cs index 2bbde2a4aa..3faaeece7b 100644 --- a/BizHawk.Emulation/Interfaces/CoreComms.cs +++ b/BizHawk.Emulation/Interfaces/CoreComms.cs @@ -99,8 +99,8 @@ namespace BizHawk public class MemoryCallbackSystem { public int? ReadAddr = null; - private System.Action ReadCallback = null; - public void SetReadCallback(System.Action func) + private System.Action ReadCallback = null; + public void SetReadCallback(System.Action func) { ReadCallback = func; } @@ -121,19 +121,19 @@ namespace BizHawk { if (ReadAddr == addr) { - ReadCallback(); + ReadCallback((uint)addr); } } else { - ReadCallback(); + ReadCallback((uint)addr); } } } public int? WriteAddr = null; - private System.Action WriteCallback = null; - public void SetWriteCallback(System.Action func) + private System.Action WriteCallback = null; + public void SetWriteCallback(System.Action func) { WriteCallback = func; } @@ -154,12 +154,12 @@ namespace BizHawk { if (WriteAddr == addr) { - WriteCallback(); + WriteCallback((uint)addr); } } else { - WriteCallback(); + WriteCallback((uint)addr); } } } diff --git a/BizHawk.MultiClient/LuaImplementation.cs b/BizHawk.MultiClient/LuaImplementation.cs index d4d8265ffc..a6e58549a6 100644 --- a/BizHawk.MultiClient/LuaImplementation.cs +++ b/BizHawk.MultiClient/LuaImplementation.cs @@ -2698,11 +2698,11 @@ namespace BizHawk.MultiClient } Global.Emulator.CoreInputComm.MemoryCallbackSystem.ReadAddr = _addr; - Global.Emulator.CoreInputComm.MemoryCallbackSystem.SetReadCallback(delegate() + Global.Emulator.CoreInputComm.MemoryCallbackSystem.SetReadCallback(delegate(uint addr) { try { - luaf.Call(); + luaf.Call(addr); } catch (SystemException e) { @@ -2736,11 +2736,11 @@ namespace BizHawk.MultiClient } Global.Emulator.CoreInputComm.MemoryCallbackSystem.WriteAddr = _addr; - Global.Emulator.CoreInputComm.MemoryCallbackSystem.SetWriteCallback(delegate() + Global.Emulator.CoreInputComm.MemoryCallbackSystem.SetWriteCallback(delegate(uint addr) { try { - luaf.Call(); + luaf.Call(addr); } catch (SystemException e) {