mirror of
https://github.com/notwa/mm
synced 2024-11-05 05:59:04 -08:00
Connor Olding
1acbaba58c
theres still a lot of work to do\nsince most scripts just set globals explicitly\nthis is still better than implied globals though
30 lines
813 B
Lua
30 lines
813 B
Lua
local Monitor = require "classes.Monitor"
|
|
local ByteMonitor = Class(Monitor)
|
|
|
|
local printf = rawget(_G, 'dprintf') or printf
|
|
|
|
function ByteMonitor:mark(i, x, x1)
|
|
if self.ignore and self:ignore(i) then return end
|
|
local now = emu.framecount()
|
|
local str = ('%04X=%02X (%s)'):format(i, x, self.name)
|
|
if self.byvalue then
|
|
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
|
|
else
|
|
if not self.modified[i] then
|
|
self.modified[i] = true
|
|
self.dirty = true
|
|
str = str..' (NEW!)'
|
|
end
|
|
end
|
|
printf('%s @%i', str, now)
|
|
message(str, 180)
|
|
end
|
|
|
|
return ByteMonitor
|