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:
parent
41980657cd
commit
897b1a7b11
1 changed files with 30 additions and 0 deletions
30
Lua/misc monitor.lua
Normal file
30
Lua/misc monitor.lua
Normal 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
|
Loading…
Reference in a new issue