summaryrefslogtreecommitdiffstatshomepage
path: root/plugins
diff options
context:
space:
mode:
author cracyc <cracyc@users.noreply.github.com>2016-06-20 21:55:15 -0500
committer cracyc <cracyc@users.noreply.github.com>2016-06-20 21:55:15 -0500
commit671f8e3bb2db1f7d3179721ad93231aac221f255 (patch)
tree4cf731ffb8be91aea3658c3319127707607ea133 /plugins
parent80b842fb02eaee8beae91b8607634e99b1107a38 (diff)
luaengine: share accessors (nw)
cheatfind: search share regions (nw)
Diffstat (limited to 'plugins')
-rw-r--r--plugins/cheatfind/init.lua13
1 files changed, 13 insertions, 0 deletions
diff --git a/plugins/cheatfind/init.lua b/plugins/cheatfind/init.lua
index 55ef7beb00e..a7e850f5385 100644
--- a/plugins/cheatfind/init.lua
+++ b/plugins/cheatfind/init.lua
@@ -40,6 +40,15 @@ function cheatfind.startplugin()
return ram
end
+ -- return table of share regions
+ function cheat.getshares()
+ local shares = {}
+ for tag, share in pairs(manager:machine():memory().shares) do
+ shares[tag] = share
+ end
+ return shares
+ end
+
-- save data block
function cheat.save(space, start, size)
local data = { block = "", start = start, size = size, space = space }
@@ -274,6 +283,10 @@ function cheatfind.startplugin()
for tag, ram in pairs(space_table) do
devtable[#devtable + 1] = { tag = tag, space = ram.dev, ram = {{ offset = 0, size = ram.size }} }
end
+ space_table = cheat.getshares()
+ for tag, share in pairs(space_table) do
+ devtable[#devtable + 1] = { tag = tag, space = share, ram = {{ offset = 0, size = share.size }} }
+ end
end
emu.register_start(start)