2015-05-25 20:10:00 -07:00
|
|
|
local Monitor = require "classes.Monitor"
|
|
|
|
local ByteMonitor = Class(Monitor)
|
|
|
|
|
2015-05-26 00:40:12 -07:00
|
|
|
local printf = dprintf or printf
|
|
|
|
|
2015-05-25 20:10:00 -07:00
|
|
|
function ByteMonitor:mark(i, x, x1)
|
2015-05-26 00:40:12 -07:00
|
|
|
if self.ignore and self:ignore(i) then return end
|
2015-05-25 20:10:00 -07:00
|
|
|
local now = emu.framecount()
|
2015-05-26 00:40:12 -07:00
|
|
|
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
|
2015-05-25 20:10:00 -07:00
|
|
|
end
|
|
|
|
printf('%s @%i', str, now)
|
|
|
|
message(str, 180)
|
|
|
|
end
|
|
|
|
|
|
|
|
return ByteMonitor
|