
New Rom for my Modular Newbrain supporting also the graphics screen up to 640×200. There are 16 colors which are indexed so they can easily changed. Currently this works on the emulator but it will work on the Hardware after i update the FPGA.
The command is OS GCOL <Fore>,<Back> i.e. OS GCOL 2,15 sets green dots and white background. Background on graphics are the pixels that are NOT painted after the plot wipe or open command. If you change the background color all background pixels change color immediatly. If you paint all pixels then there is no background.
The code for the MIRA image above is :
10 cc=0:os gcol 0,15
20 CLOSE#1:OPEN#0,0,"180":OPEN#1,11,"170"
30 PLOT RANGE(45,40)
40 CLOSE#6:OPEN#6,6
50 A = RND
60 IF A > .9999 THEN A = .9999
70 IF A < .0001 THEN A = .0001
80 IF A = .5 THEN A = .4999
90 B = .9998: P = 15000: C = 2 - 2 * A
100 X = 0: Y = 12.1
110 W = A * X + C * X * X / (1 + X * X)
150 FOR CN = 0 TO P
155 IF INT( cn/1000)=( cn/1000) THEN cc=cc+1:os gcol cc,15
157 IF cc=15 THEN cc=0:os gcol cc,15
160 IF CN > 100 THEN X1=X+20:Y1=Y+20:PLOT PLA (X1,Y1),MVE(X1,Y1)
170 Z = X: X = B * Y + W: U = X * X
180 W = A * X + C * U / (1 + U): Y = W - Z
190 GET#6,Z: IF Z = 27 END
200 NEXT CN
500 END
Demo Video