cpu = manager:machine().devices[":maincpu"];mem = cpu.spaces["program"] function calc(line) return line % 8 * 1024 + math.floor(line / 64) * 40 + math.floor((line%64) / 8) * 128 +8192 end function writechar(c,x,y) for i=0,7 do mem:write_u8(calc(y+i)+x,mem:read_u8(0x7900+i+8*(string.byte(c)-32))) end end for c=32,127 do writechar(string.char(c),c % 40 ,math.floor(c/40)*8) end mystr = "ABCDEFGHJKLMNOPQRSTUVWXYZ[]ab"..string.char(126)..string.char(127) ; for j = 1,string.len(mystr) do writechar(string.sub(mystr,j,j),j,16*8) end mystr = "STELLA! STELLA! "..string.char(126)..string.char(127) ; for j = 1,string.len(mystr) do writechar(string.sub(mystr,j,j),j,17*8) end
No comments:
Post a Comment