So why not get the tablet to do some turtlegraphics?

[Linked Image from i.imgur.com] [Linked Image from i.imgur.com]

Code
function hgrclr() for i=16384,16384+8192-1 do manager:machine().devices[":maincpu"].spaces["program"]:write_u8(i,0) end end

function pu() manager:machine():ioport().ports[":sl2:agraphtablet:joystick_3_buttons"].fields["P5 Button 2"].live.value = 0x0 end
function pd() manager:machine():ioport().ports[":sl2:agraphtablet:joystick_3_buttons"].fields["P5 Button 2"].live.value = 0x20 end

function setxy(x,y) manager:machine():ioport().ports[":sl2:agraphtablet:joystick_3_x"].fields["P3 Joystick X"].live:set_analog_value(math.floor((x)*1024),math.floor((x)*1024),0) manager:machine():ioport().ports[":sl2:agraphtablet:joystick_3_y"].fields["P3 Joystick Y"].live:set_analog_value(math.floor((y)*1024),math.floor((y)*1024),0) end

function fd(dist) turtlex = turtlex + math.cos(turtledir/360.0*2*math.pi)*dist turtley=turtley-math.sin(turtledir/360.0*2*math.pi)*dist setxy(turtlex,turtley) fr() end

function fd(dist) pieces=10 dist=dist/pieces for i=0,9 do turtlex = turtlex + math.cos(turtledir/360.0*2*math.pi)*dist turtley=turtley-math.sin(turtledir/360.0*2*math.pi)*dist setxy(turtlex,turtley) fr() end end

function bk(dist) fd(-dist) end
function rt(tang) turtledir = (turtledir - tang) % 360.0 end
function lt(tang) rt(-tang) end
function fr(f) f = f or 1 emu.wait(f/60+.001) end
function home() hgrclr() turtlex=0 turtley=0 turtledir=0 pu() fr() setxy(turtlex,turtley) fr() end

function docircle() home() pd() for j=0,35 do rt(10) fr() print(j,turtledir) for i=0,35 do fd(8) fr() rt(10) end  end end

function doco(f,...) co1=coroutine.create(f) ok,err = coroutine.resume(co1,...) print("coroutine.resume -> ",ok,err) end

-- doco = do coroutine
--doco(docircle)

manager:machine():options().entries["snapsize"]:value("560x384")

function drawsquiral() home() for i=0,63 do pu() fr(8) pd() fr(8) fd(i/.7+3) fr(8) rt(88) end print("DONE") end 
-- much smoother if you keep the pen down
function drawsquiral() home() pd() for i=0,63 do fr(8) fd(i/.7+3) fr(8) rt(88) end print("DONE") pu() fr() end  

doco(drawsquiral)

-- function clickat(x,y) pu() fr(3) setxy(x-128,y-128) fr(3) pd() fr(3) end

-- applesoft can't keep up with "quick" pendowns and penups, so give it plenty of time to react

function clickat(x,y) pu() fr(3) setxy(x-128,y-128) print("click at ",x,y) fr(15) pd() fr(20) pu() fr(25) setxy(0,0) fr(2) end

function clickb(x,y,size) buttonsize=size/22 clickat(x*buttonsize+buttonsize/2+13,4) end


doco(clickb,9,4,194) -- click on pencolor button
doco(clickb,0,4,194) -- click on reset button


And I can click on the tablet menu overlays manually: doco(clickb,15,4,194) will click on the "CATALOG" button.