diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/dump.lua | 31 |
1 files changed, 14 insertions, 17 deletions
diff --git a/lib/dump.lua b/lib/dump.lua index fb40a8f8..b13e1a5a 100644 --- a/lib/dump.lua +++ b/lib/dump.lua | |||
@@ -266,24 +266,21 @@ local function formatk(tr, idx) | |||
266 | end | 266 | end |
267 | 267 | ||
268 | local function printsnap(tr, snap) | 268 | local function printsnap(tr, snap) |
269 | for i=1,#snap do | 269 | local n = 2 |
270 | local ref = snap[i] | 270 | for s=0,snap[1] do |
271 | if not ref then | 271 | local sn = snap[n] |
272 | out:write("---- ") | 272 | if shr(sn, 24) == s then |
273 | elseif ref < 0 then | 273 | n = n + 1 |
274 | out:write(formatk(tr, ref), " ") | 274 | local ref = band(sn, 0xffff) - 0x8000 -- REF_BIAS |
275 | else | 275 | if ref < 0 then |
276 | local m, ot, op1, op2 = traceir(tr, ref) | 276 | out:write(formatk(tr, ref)) |
277 | local t = band(ot, 15) | 277 | else |
278 | local sep = " " | 278 | local m, ot, op1, op2 = traceir(tr, ref) |
279 | if t == 8 then | 279 | out:write(colorize(format("%04d", ref), band(ot, 15))) |
280 | local oidx = 6*shr(ot, 8) | ||
281 | local op = sub(vmdef.irnames, oidx+1, oidx+6) | ||
282 | if op == "FRAME " then | ||
283 | sep = "|" | ||
284 | end | ||
285 | end | 280 | end |
286 | out:write(colorize(format("%04d", ref), t), sep) | 281 | out:write(band(sn, 0x10000) == 0 and " " or "|") -- SNAP_FRAME |
282 | else | ||
283 | out:write("---- ") | ||
287 | end | 284 | end |
288 | end | 285 | end |
289 | out:write("]\n") | 286 | out:write("]\n") |