I have been writing some more code for both the Pi Zero and the Atom. The Pi Zero has now routines to draw an ellipse, circle, triangle, block, line and parallelogram. Both as outline or filled with the actual foreground colour. For the Atom I have written a few additional basic statements for easy access to these features, like:
XCIRLCE O,X,Y,R -> draws an outline of a circle
XBLOCK F,XBOT,YBOT,XTOP,YTOP -> draws a filled rectangle
In a loop like this:
10 FOR X=8 TO 1280 STEP 8
20 XBLOCK O,X,X,1280-X,1024-X
30 NEXT X
40 END
I sometimes see errors in the drawing. It turned out to be a timing issue. If I power up the Atom and I enter this command line: DO P.?#BEE8;U.0 then I get only 64 as value, Atom running at 1 or 2 MHz. After I issue a single block command, like XBLOCK O,100,100,1180,923 and I re-run the peek then I mostly see 64 but sometimes a value 1 occurs. So reading the tube registers at 2 MHz is not accurate. I can understand this, but why occur the read errors only after the Atom has written some data to the Pi?