1
0
Fork 0
mirror of https://github.com/notwa/mm synced 2024-11-04 22:39:02 -08:00

monitor unknown section of MM save data

This commit is contained in:
Connor Olding 2015-05-07 15:29:21 -07:00
parent 41980657cd
commit 897b1a7b11

30
Lua/misc monitor.lua Normal file
View file

@ -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