From 897b1a7b114281b54fb57e49842d142d978f4a99 Mon Sep 17 00:00:00 2001 From: Connor Olding Date: Thu, 7 May 2015 15:29:21 -0700 Subject: [PATCH] monitor unknown section of MM save data --- Lua/misc monitor.lua | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 Lua/misc monitor.lua diff --git a/Lua/misc monitor.lua b/Lua/misc monitor.lua new file mode 100644 index 0000000..fabe852 --- /dev/null +++ b/Lua/misc monitor.lua @@ -0,0 +1,30 @@ +require "boilerplate" +require "addrs.init" +require "classes" +require "messages" + +ByteMonitor = Class(Monitor) + +function ByteMonitor:mark(i, x, x1) + local now = emu.framecount() + local str = ('%02i=%02X (%s)'):format(i, x, self.name) + if not self.modified[i] then + self.modified[i] = {} + end + if not self.modified[i][x] then + self.modified[i][x] = true + self.dirty = true + str = str..' (NEW!)' + end + printf('%s @%i', str, now) + message(str, 180) +end + +local unk = ByteMonitor('unk', AL(0xF6, 0x37A)) +unk:load('data/_unk.lua') +while mm do + unk:diff() + unk:save() + draw_messages() + emu.frameadvance() +end