diff --git a/badapple-tape.py b/badapple-tape.py index 94958f1..dbc55d0 100644 --- a/badapple-tape.py +++ b/badapple-tape.py @@ -21,8 +21,8 @@ with open(argv[1], "wb") as fp: for ox, bi in enumerate(l): if img.getpixel((x * 2 + ox, y * 3 + oy)): val |= bi - if img.getpixel((x * 2 + 1, y * 3 + 2)): - val ^= 0x9f + # if img.getpixel((x * 2 + 1, y * 3 + 2)): + # val ^= 0x9f line.append(val) fp.write(line) print(f"wrote {i + 1} / {len(argv) - 2}") diff --git a/badapple.bin b/badapple.bin index 09910c8..9b78410 100644 Binary files a/badapple.bin and b/badapple.bin differ diff --git a/videotape.lua b/videotape.lua index 71007ea..be9a649 100644 --- a/videotape.lua +++ b/videotape.lua @@ -6,16 +6,20 @@ mon.setTextScale(1) local w, h = string.byte(tape.read(2), 1, 2) +local b = "" +for _ = 1, w do b = b .. "0" end +local f = b + repeat for y = 1, h do mon.setCursorPos(1, y) local buf = { string.byte(tape.read(w), 1, -1) } - local s, f, b = "", "", "" + local s = "" -- , f, b = "", "", "" for x = 1, w do 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") + -- local inv = bit32.band(0x80, buf[x]) + -- f = f .. (inv and "f" or "0") + -- b = b .. (inv and "0" or "f") end mon.blit(s, f, b) end