Merge pull request #1754 from warmCabin/all-memory-execute

All Memory Execute
This commit is contained in:
adelikat 2019-12-13 07:40:41 -06:00 committed by GitHub
commit b080d6d09e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 8 deletions

View File

@ -183,9 +183,9 @@ namespace BizHawk.Client.Common
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\" );")]
[LuaMethod("onmemoryexecute", "Fires after the given address is executed by the core")]
public string OnMemoryExecute(LuaFunction luaf, uint address, string name = null, string domain = null)
[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. 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)
{
try
{

View File

@ -295,11 +295,6 @@ namespace BizHawk.Emulation.Common
{
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;
Name = name;
Callback = callback;