Merge pull request #1754 from warmCabin/all-memory-execute
All Memory Execute
This commit is contained in:
commit
b080d6d09e
|
@ -183,9 +183,9 @@ namespace BizHawk.Client.Common
|
||||||
return nlf.Guid.ToString();
|
return nlf.Guid.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
[LuaMethodExample("local steveonm = event.onmemoryexecute(\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\" );")]
|
[LuaMethodExample("local steveonm = event.onmemoryexecute(\r\n\tfunction()\r\n\t\tconsole.log( \"Fires after the given address is executed by the core. If is explicitly nil, it will attach to every memory read\" );\r\n\tend\r\n\t, 0x200, \"Frame name\", \"System Bus\" );")]
|
||||||
[LuaMethod("onmemoryexecute", "Fires after the given address is executed by the core")]
|
[LuaMethod("onmemoryexecute", "Fires after the given address is executed by the core. If the address is explicitly nil, it will attach to every memory read")]
|
||||||
public string OnMemoryExecute(LuaFunction luaf, uint address, string name = null, string domain = null)
|
public string OnMemoryExecute(LuaFunction luaf, uint? address, string name = null, string domain = null)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
|
@ -295,11 +295,6 @@ namespace BizHawk.Emulation.Common
|
||||||
{
|
{
|
||||||
public MemoryCallback(string scope, MemoryCallbackType type, string name, MemoryCallbackDelegate callback, uint? address, uint? mask)
|
public MemoryCallback(string scope, MemoryCallbackType type, string name, MemoryCallbackDelegate callback, uint? address, uint? mask)
|
||||||
{
|
{
|
||||||
if (type == MemoryCallbackType.Execute && !address.HasValue)
|
|
||||||
{
|
|
||||||
throw new InvalidOperationException("When assigning an execute callback, an address must be specified");
|
|
||||||
}
|
|
||||||
|
|
||||||
Type = type;
|
Type = type;
|
||||||
Name = name;
|
Name = name;
|
||||||
Callback = callback;
|
Callback = callback;
|
||||||
|
|
Loading…
Reference in New Issue