diff --git a/videotape.lua b/videotape.lua index 6283a01..707231a 100644 --- a/videotape.lua +++ b/videotape.lua @@ -1,7 +1,7 @@ local tape = peripheral.find("tape_drive") local mon = peripheral.find("monitor") -tape.seek(0) +tape.seek(-tape.getSize()) mon.setTextScale(1) local w, h = string.byte(tape.read(2), 1, 2) @@ -12,7 +12,7 @@ repeat local buf = string.byte(tape.read(w), 1, -1) local s, f, b = "", "", "" for x = 1, w do - s = s .. string.char(bit32.band(0x7F, buf[x])) + s = s .. string.char(0x80 + bit32.band(0x7F, buf[x])) local inv = bit32.band(0x80, buf[x]) f = f .. (inv and "f" or "0") b = b .. (inv and "0" or "f")