viewtopic.php?f=18&t=3055&p=32750#p32750JSZeddy emulator which print to ASCII does neither support printning in Lambda 8300 mode.
Have fun.

viewtopic.php?f=18&t=3055&p=32750#p32750JSZeddy emulator which print to ASCII does neither support printning in Lambda 8300 mode.
Code: Select all
f = assert(io.open(arg[2], "rb"))
linelen = 0
dfile = 0
pointer = 16393
version = 0
zxChar = { " ", "â–˜", "â–", "â–€", "â––", "â–Œ", "â–ž", "â–›",
"▤", "◤", "◥", '"', "£", "$", ":", "?",
"(", ")", ">", "<", "=", "+", "-", "*",
"/", ";", ",", ".", "0", "1", "2", "3",
"4", "5", "6", "7", "8", "9", "A", "B",
"C", "D", "E", "F", "G", "H", "I", "J",
"K", "L", "M", "N", "O", "P", "Q", "R",
"S", "T", "U", "V", "W", "X", "Y", "Z",
"RND", "INKEY$", "PI", "[43]",
"[44]", "[45]", "[46]", "[47]",
"[48]", "[49]", "[4A]", "[4B]",
"[4C]", "[4D]", "[4E]", "[4F]",
"[50]", "[51]", "[52]", "[53]",
"[54]", "[55]", "[56]", "[57]",
"[58]", "[59]", "[5A]", "[5B]",
"[5C]", "[5D]", "[5E]", "[5F]",
"[60]", "[61]", "[62]", "[63]",
"[64]", "[65]", "[66]", "[67]",
"[68]", "[69]", "[6A]", "[6B]",
"[6C]", "[6D]", "[6E]", "[6F]",
"↑", "↓", "â†", "→",
"GRAPHICS", "EDIT", "âŽ", "⌫",
"[KL]", "FUNCTION", "[7A]", "[7B]",
"[7C]", "[7D]", "[7E]", "CURSOR",
"â–ˆ", "â–Ÿ", "â–™", "â–„",
"â–œ", "â–", "â–š", "â–›",
"â–¥", "â—¢", "â—£", '["]',
"[£]", "[$]", "[:]", "[?]",
"[(]", "[)]", "[>]", "[<]",
"[=]", "[+]", "[-]", "[*]",
"[/]", "[;]", "[,]", "[.]",
"[0]", "[1]", "[2]", "[3]",
"[4]", "[5]", "[6]", "[7]",
"[8]", "[9]", "[A]", "[B]",
"[C]", "[D]", "[E]", "[F]",
"[G]", "[H]", "[I]", "[J]",
"[K]", "[L]", "[M]", "[N]",
"[O]", "[P]", "[Q]", "[R]",
"[S]", "[T]", "[U]", "[V]",
"[W]", "[X]", "[Y]", "[Z]",
'""', "AT", "TAB", "[C3]",
"CODE", "VAL", "LEN", "SIN",
"COS", "TAN", "ASN", "ACS",
"ATN", "LN", "EXP", "INT",
"SQR", "SGN", "ABS", "PEEK",
"USR", "STR$", "CHR$", "NOT",
"**", "OR", "AND", "<=",
">=", "<>", "THEN", "TO",
"STEP", "LPRINT ", "LLIST ", "STOP ",
"SLOW ", "FAST ", "NEW ", "SCROLL ",
"CONT ", "DIM ", "REM ", "FOR ",
"GOTO ", "GOSUB ", "INPUT ", "LOAD ",
"LIST ", "LET ", "PAUSE ", "NEXT ",
"POKE ", "PRINT ", "PLOT ", "RUN ",
"SAVE ", "RAND ", "IF ", "CLS ",
"UNPLOT ", "CLEAR ", "RETURN ", "COPY " }
lambdaChar = { " ", "â–˜", "â–", "â–€", "â––", "â–Œ", "â–ž", "â–›",
"⧱", "◤", "◥", '"', "⨳", "$", "⋈", "∩",
"(", ")", ">", "<", "=", "+", "-", "*",
"/", ";", ",", ".", "0", "1", "2", "3",
"4", "5", "6", "7", "8", "9", "A", "B",
"C", "D", "E", "F", "G", "H", "I", "J",
"K", "L", "M", "N", "O", "P", "Q", "R",
"S", "T", "U", "V", "W", "X", "Y", "Z",
"THEN", "TO", "STEP", "RND",
"INKEY$", "PI", "[46]", "[47]",
"[48]", "[49]", "[4A]", "[4B]",
"[4C]", "[4D]", "[4E]", "[4F]",
"[50]", "[51]", "[52]", "[53]",
"[54]", "[55]", "[56]", "[57]",
"[58]", "[59]", "[5A]", "[5B]",
"[5C]", "[5D]", "[5E]", "[5F]",
"[60]", "[61]", "[62]", "[63]",
"[64]", "[65]", "[66]", "[67]",
"[68]", "[69]", "[6A]", "[6B]",
"[6C]", "[6D]", "[6E]", "[6F]",
"↑", "↓", "â†", "→",
"GRAPHICS", "EDIT", "âŽ", "⌫",
"[KL]", "FUNCTION", "[7A]", "[7B]",
"[7C]", "[7D]", "[7E]", "CURSOR",
"â–ˆ", "â–Ÿ", "â–™", "â–„",
"â–œ", "â–", "â–š", "â–›",
"â–¥", "â—¢", "â—£", '["]',
"[⨳]", "[$]", "[⋈]", "[∩]",
"[(]", "[)]", "[>]", "[<]",
"[=]", "[+]", "[-]", "[*]",
"[/]", "[;]", "[,]", "[.]",
"[0]", "[1]", "[2]", "[3]",
"[4]", "[5]", "[6]", "[7]",
"[8]", "[9]", "[A]", "[B]",
"[C]", "[D]", "[E]", "[F]",
"[G]", "[H]", "[I]", "[J]",
"[K]", "[L]", "[M]", "[N]",
"[O]", "[P]", "[Q]", "[R]",
"[S]", "[T]", "[U]", "[V]",
"[W]", "[X]", "[Y]", "[Z]",
"CODE", "VAL", "LEN", "SIN",
"COS", "TAN", "ASN", "ACS",
"ATN", "LOG", "EXP", "INT",
"SQR", "SGN", "ABS", "PEEK",
"USR", "STR$", "CHR$", "NOT",
"AT", "TAB",
"**", "OR", "AND", "<=",
">=", "<>", "TEMPO ", "MUSIC ",
"SOUND ", "BEEP ", "NOBEEP ",
"LPRINT ", "LLIST ", "STOP ",
"SLOW ", "FAST ", "NEW ", "SCROLL ",
"CONT ", "DIM ", "REM ", "FOR ",
"GOTO ", "GOSUB ", "INPUT ", "LOAD ",
"LIST ", "LET ", "PAUSE ", "NEXT ",
"POKE ", "PRINT ", "PLOT ", "RUN ",
"SAVE ", "RAND ", "IF ", "CLS ",
"UNPLOT ", "CLEAR ", "RETURN ", "COPY " }
function love.draw()
love.graphics.print("Hello World", 400, 300)
end
function nextByte(name, bytes)
pointer = pointer + string.len(bytes)
number = string.byte(bytes, 1, -1)
io.write(string.format("%-6s %5u %02X", name, number, number))
if name == "VERSN" then
version = number
if number == 0 then
io.write(" ZX81 file format")
else
io.write(" Lambda 8300 file format")
end
end
io.write("\n");
end
function nextWord(name, bytes)
pointer = pointer + string.len(bytes)
local number = string.byte(bytes, 1)
+ string.byte(bytes, 2) * 256
io.write(string.format("%-6s %5u %04X\n", name, number, number))
if name == "D-FILE" then dfile = number end
end
function nextLine(bytes)
pointer = pointer + string.len(bytes)
linelen = string.byte(bytes, 3) + string.byte(bytes, 4) * 256
io.write(string.format("%5u %04X %04X ",
string.byte(bytes, 1) * 256 + string.byte(bytes, 2),
string.byte(bytes, 1) * 256 + string.byte(bytes, 2),
linelen));
end
function nextLineContent(bytes)
pointer = pointer + string.len(bytes)
zx2asc(bytes)
io.write("\n ")
for _, b in pairs{string.byte(bytes, 1, -1)} do
io.write(string.format("%02X ", b))
end
end
function nextHex(name, bytes)
pointer = pointer + string.len(bytes)
local only2 = ""
local only2num = 0
if (string.len(bytes) == 2) then
only2 = " "
only2num = 1
end
io.write(string.format("%-9s%s", name, only2))
for _, b in pairs{string.byte(bytes, 1, -1)} do
io.write(string.format("%02X ", b))
end
io.write(string.rep(" ", 16 - only2num - string.len(bytes)))
io.write(" ")
zx2asc(bytes)
io.write("\n")
end
function zx2asc(bytes)
for _, b in pairs{string.byte(bytes, 1, -1)} do
if version == 0
then io.write(zxChar[b+1])
else io.write(lambdaChar[b+1]) end
end
end
function love.load()
local block = 16
local bytes = f:read(1)
nextByte("VERSN", bytes)
bytes = f:read(2)
if version == 0
then nextWord("E-PPC", bytes)
else nextWord("NXTLIN", bytes) end
bytes = f:read(2)
if version == 0
then nextWord("D-FILE", bytes)
else nextWord("PROGRM", bytes) end
bytes = f:read(2)
nextWord("DF-CC", bytes)
bytes = f:read(2)
nextWord("VARS", bytes)
bytes = f:read(2)
nextWord("DEST", bytes)
bytes = f:read(2)
nextWord("E-LINE", bytes)
bytes = f:read(2)
nextWord("CH-ADD", bytes)
bytes = f:read(2)
nextWord("X-PTR", bytes)
bytes = f:read(2)
nextWord("STKBOT", bytes)
bytes = f:read(2)
nextWord("STKEND", bytes)
bytes = f:read(1)
if version == 0
then nextByte("BERG", bytes)
else nextByte("FLAGS", bytes) end
bytes = f:read(2)
nextWord("MEM", bytes)
bytes = f:read(1)
if version == 0
then nextByte("-", bytes)
else nextByte("MUNIT", bytes) end
bytes = f:read(1)
nextByte("DF-SZ", bytes)
bytes = f:read(2)
nextWord("S-TOP", bytes)
bytes = f:read(3)
nextHex("LAST-K", bytes)
bytes = f:read(1)
nextByte("MARGIN", bytes)
bytes = f:read(2)
if version == 0
then nextWord("NXTLIN", bytes)
else nextWord("E-PPC", bytes) end
bytes = f:read(2)
nextWord("OLDPPC", bytes)
bytes = f:read(1)
nextByte("FLAGX", bytes)
bytes = f:read(2)
nextWord("STRLEN", bytes)
bytes = f:read(2)
nextWord("T-ADDR", bytes)
bytes = f:read(2)
nextWord("SEED", bytes)
bytes = f:read(2)
nextWord("FRAMES", bytes)
bytes = f:read(2)
if version == 0
then nextHex("COORDS", bytes)
else nextWord("PPC", bytes) end
bytes = f:read(1)
nextByte("PR-CC", bytes)
bytes = f:read(2)
nextHex("S-POSN", bytes)
bytes = f:read(1)
nextByte("CDFLAG", bytes)
bytes = f:read(16)
nextHex("PRBUFF", bytes)
bytes = f:read(16)
nextHex("", bytes)
bytes = f:read(1)
nextHex("", bytes)
bytes = f:read(16)
nextHex("MEMBOT", bytes)
bytes = f:read(14)
nextHex("", bytes)
bytes = f:read(2)
if version == 0
then nextHex("-", bytes)
else nextByte("BLINK", bytes) end
while true do
if not bytes then break end
if pointer >= dfile then
-- io.write(
-- string.format("pointer:%u,dfile:%u\n",pointer,dfile))
break
end
bytes = f:read(4)
nextLine(bytes)
while linelen > 0 do
if linelen > 16 then
bytes = f:read(16)
linelen = linelen - 16
nextLineContent(bytes)
io.write("\n ")
else
bytes = f:read(linelen)
nextLineContent(bytes)
io.write("\n");
linelen = 0
end
end
end
bytes = f:read(1)
nextHex("D-FILE", bytes)
for i=1,24,1 do
bytes = f:read(16)
nextHex("", bytes)
bytes = f:read(16)
nextHex("", bytes)
bytes = f:read(1)
nextHex("", bytes)
end
if version == 255 then
while true do
if not bytes then break end
bytes = f:read(4)
nextLine(bytes)
while linelen > 0 do
if linelen > 16 then
bytes = f:read(16)
linelen = linelen - 16
nextLineContent(bytes)
io.write("\n ")
else
bytes = f:read(linelen)
nextLineContent(bytes)
io.write("\n");
linelen = 0
end
end
end
end
while true do
if not bytes then break end
local bytes = f:read(block)
if not bytes then break end
for _, b in pairs{string.byte(bytes, 1, -1)} do
io.write(string.format("%02X ", b))
end
io.write(string.rep(" ", block - string.len(bytes)))
io.write(" ", string.gsub(bytes, "%c", "."), "\n")
end
love.event.quit()
end
I have changed the SNAlist (SPECTRUM) to convert a 'p' file to a text file, with my Text2P converter compatibility...
Code: Select all
INPUT DIFFICULTY (1-5)
Code: Select all
[ROUND]
1
🕷️
👻---👻
👻---👻
👻---👻
👻---👻
👻---👻
👻---👻
👻---👻
Code: Select all
[SCORE]
190
[NEW GAME, PRESS "ENTER"]
The version of Drive.p that XavSnap uploaded is fine. I just made a post to show the translation.Power 3000 wrote: ↑Thu Dec 27, 2018 1:56 pm Hi Martin, do you want me to try and record Drive again, or is the one you have okay?