Skip to content

Instantly share code, notes, and snippets.

@shattered
Created February 24, 2017 22:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shattered/9126fd97681ffb0fdd28cf24d674e41f to your computer and use it in GitHub Desktop.
Save shattered/9126fd97681ffb0fdd28cf24d674e41f to your computer and use it in GitHub Desktop.
co = coroutine.create(function(scr)
local w = 0.25
local lf = 10
local cr = 13
function u(ch, t) emu.keypost(ch) emu.wait(t) end
function k(str, t) for c in str:gmatch"." do emu.keypost(c) emu.wait(t) end end
function d(t) emu.wait(t) end
-- wait for POST
d(13)
-- start test utility
k('test10', w)
u(utf8.char(cr), 1)
-- show system config
u('8', w)
u(utf8.char(cr), 1)
scr:snapshot("regtest/tosh1000/t01-1.png")
u(utf8.char(cr), 1)
-- run memory tests
u('1', w)
u(utf8.char(cr), w)
u('n', w)
u(utf8.char(cr), w)
u('n', w)
u(utf8.char(cr), 18)
u(utf8.char(cr), 1)
scr:snapshot("regtest/tosh1000/t01-2.png")
print ("")
manager:machine():exit()
end)
coroutine.resume(co, manager:machine().screens[":isa1:cga:screen"])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment