Skip to content

Commit 6b4f335

Browse files
committed
Correct mem callbacks docs (resolves #3522)
1 parent 565a0b9 commit 6b4f335

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/BizHawk.Client.Common/lua/LuaHelperLibs/EventsLuaLibrary.cs

+6-6
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public string OnLoadState(LuaFunction luaf, string name = null)
9898
.Guid.ToString();
9999

100100
[LuaDeprecatedMethod]
101-
[LuaMethod("onmemoryexecute", "Fires after the given address is executed by the core")]
101+
[LuaMethod("onmemoryexecute", "Fires immediately before the given address is executed by the core")]
102102
public string OnMemoryExecute(
103103
LuaFunction luaf,
104104
uint address,
@@ -109,8 +109,8 @@ public string OnMemoryExecute(
109109
return OnBusExec(luaf, address, name: name, scope: scope);
110110
}
111111

112-
[LuaMethodExample("local exec_cb_id = event.on_bus_exec(\r\n\tfunction()\r\n\t\tconsole.log( \"Fires after the given address is executed by the core\" );\r\n\tend\r\n\t, 0x200, \"Frame name\", \"System Bus\" );")]
113-
[LuaMethod("on_bus_exec", "Fires after the given address is executed by the core")]
112+
[LuaMethodExample("local exec_cb_id = event.on_bus_exec(\r\n\tfunction()\r\n\t\tconsole.log( \"Fires immediately before the given address is executed by the core\" );\r\n\tend\r\n\t, 0x200, \"Frame name\", \"System Bus\" );")]
113+
[LuaMethod("on_bus_exec", "Fires immediately before the given address is executed by the core")]
114114
public string OnBusExec(
115115
LuaFunction luaf,
116116
uint address,
@@ -145,7 +145,7 @@ public string OnBusExec(
145145
}
146146

147147
[LuaDeprecatedMethod]
148-
[LuaMethod("onmemoryexecuteany", "Fires after any address is executed by the core (CPU-intensive)")]
148+
[LuaMethod("onmemoryexecuteany", "Fires immediately before any address is executed by the core (CPU-intensive)")]
149149
public string OnMemoryExecuteAny(
150150
LuaFunction luaf,
151151
string name = null,
@@ -155,8 +155,8 @@ public string OnMemoryExecuteAny(
155155
return OnBusExecAny(luaf, name: name, scope: scope);
156156
}
157157

158-
[LuaMethodExample("local exec_cb_id = event.on_bus_exec_any(\r\n\tfunction()\r\n\t\tconsole.log( \"Fires after any address is executed by the core (CPU-intensive)\" );\r\n\tend\r\n\t, \"Frame name\", \"System Bus\" );")]
159-
[LuaMethod("on_bus_exec_any", "Fires after any address is executed by the core (CPU-intensive)")]
158+
[LuaMethodExample("local exec_cb_id = event.on_bus_exec_any(\r\n\tfunction()\r\n\t\tconsole.log( \"Fires immediately before every instruction executed (in the specified scope) by the core (CPU-intensive)\" );\r\n\tend\r\n\t, \"Frame name\", \"System Bus\" );")]
159+
[LuaMethod("on_bus_exec_any", "Fires immediately before every instruction executed (in the specified scope) by the core (CPU-intensive)")]
160160
public string OnBusExecAny(
161161
LuaFunction luaf,
162162
string name = null,

src/BizHawk.Emulation.Common/Interfaces/IMemoryCallbackSystem.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public interface IMemoryCallbackSystem : IEnumerable<IMemoryCallback>
6868
/// Executes all matching callbacks for the given address and domain
6969
/// </summary>
7070
/// <param name="addr">The address to check for callbacks</param>
71-
/// <param name="value">The value contained (or written to) addr</param>
71+
/// <param name="value">For reads/execs, the value read/executed; for writes, the value to be written. Cores may pass the default <c>0</c> if write/exec is partially implemented.</param>
7272
/// <param name="flags">The callback flags relevant to this access</param>
7373
/// <param name="scope">The scope that the address pertains to. Must be a value in <see cref="AvailableScopes"/></param>
7474
void CallMemoryCallbacks(uint addr, uint value, uint flags, string scope);

0 commit comments

Comments
 (0)