I can’t say it enough. The Atari 8-bit computers are amazing in so many ways. In this example, we are going to explore how the Atari can utilize dots on the screen which will eventually end with a message at the end of this tutorial.
First let’s get some information about Graphics 3. This mode does not allow any text on the screen unless you mix Graphics 1, Graphics 2 or both on the display. It is primarily used for drawing blocks (pixels) on the screen display
If you haven’t seen the first tutorial I made I suggest you to do it right away, so you can continue to progress your understanding of the Atari’s graphics. It is called Atari Graphics 1, accessible at the blue link.
Graphics mode 3 consists of pixels that range from 0-39 in the horizontal direction, and 0-19 in the vertical direction. Identical to Graphics 1 and Graphics 2, they can use from 0-4 colors, with 0 being the background (black) color.
Let’s get a simple pixel block on the screen. Type in the program below and be sure to RUN it afterward.
10 GRAPHICS 3
20 COLOR 1
30 PLOT 0,0
It’s time to review the program to understand it better. Line 10 allows the Atari to build a display list which is accessed with the GRAPHICS 3 command. Line 20 tells the Atari to turn on an orange dot to be used by any graphics command that proceed it. On line 30, the Atari has been instructed to create a raster pixel at the coordinates of 0, 0 (upper left screen).
Drawing a line with DRAWTO
As interesting as this is a dot is not doing us any justice for entertainment purposes. Let’s step this up a notch by creating a line that extends from our first dot. Type in the following program below to see this in action.
10 GRAPHICS 3
20 COLOR 1
30 PLOT 0,0
40 DRAWTO 10,0
Now to add further explanation for our new line. First we learned how to position a pixel on the screen by placing it at horizontal and vertical placment on the display.
Line 40 is a shortcut way for the Atari computer to draw from the PLOT statement to any other horizontal and vertical position. It stays on line 0 horizontally since the second parameter is zero, on the same line. Perhaps a study of Atari Redefined Characters may shed some light on this for you if you are still confused.
So the line began at PLOT 0,0. The DRAWTO comand fills in multiple horizontal pixels until it reaches the horizontal coordinate of the 10th space. For clarity, look at the longer program below, which accomplishes the same thing.
Also notice the : (semicolon). It is used to compact statements onto a single line, which saves a lot of time when searching through a large program listing.
10 GRAPHICS 3
20 COLOR 1
30 PLOT 0,0:PLOT 1,0:PLOT 2,0
40 PLOT 3,0:PLOT 4,0:PLOT 5,0
50 PLOT 6,0:PLOT 7,0:PLOT 8,0
60 PLOT 9,0:PLOT 10,0
So you can see the benefit of Atari adding the tokenized keyword DRAWTO to their ROM routines? It saves having to type in that many extra PLOT statements and on memory as well.
Adding Colors to Atari Graphics 3
So you can see the benefit of Atari adding the tokenized keyword DRAWTO to their ROM routines? It saves having to type in that many extra PLOT statements and on memory as well.
We are going to introduce the 3 new colors that the Atari computer is capable of displaying in Graphics 3. The colors are orange, green, and blue. Type in the new program below to see the colors drawn on the display.
10 GRAPHICS 3
20 COLOR 1
30 PLOT 0,0:DRAWTO 10,0
40 COLOR 2
50 PLOT 0,2:DRAWTO 10,2
60 COLOR 3
70 PLOT 0,4:DRAWTO 10,4
The above screenshot was a picture taken with my Cannon Rebel T6 camera aimed at my 1702 monitor. This is as close as I can show you what it looks like on a real Atari 65xe personal computer. The Atari Altirra emulator is great, but no emulator can bring back the experience of seeing the way it appeared on the original Atari home computer. That is nostalgic in its own right.
Lite Brite had similar pixels
Back in the early days when I was young, I used graph paper to learn how to place dots on the screen and connect them. In those days Lite Brite was still on the shelves so that is how I identified with these pixels. Of course with Lite Brite you used pegs that made led lights glow on the board when electrons were directed to them, but the circles helped me see the pixels. The colors with the glowing pegs on the board helped the idea of the Atari graphics screen to stand out in my mind more.
By seeing it on paper, I was eventually able to understand the coordinate system much better. Here is such an example I just made.
Drawing a design on Graph Paper
Since you have now learned to combine statements using the semicolon, you could also have merged all of the statements into one single line. This is important to learn now since many programs you will encounter later save space by compacting everything possible into single lines.
10 GRAPHICS 3:COLOR 1:PLOT 0,0:DRAWTO 10,0:COLOR 2:PLOT 0,2:DRAWTO 10,2:COLOR 3:PLOT 0,4:DRAWTO 10,4
The next program will place color dots in all four corners of the display for Graphics 3. COLOR 4 was not used here since it would not be seen. Much later you will learn to use this to erase a pixel when you are animating it on the screen.
10 GRAPHICS 3
20 COLOR 1:PLOT 0,0
30 COLOR 2:PLOT 39,0
40 COLOR 3:PLOT 0,19
50 COLOR 1:PLOT 39,19
Let’s finally get to drawing more advanced stuff on the screen. We are going to write the word ATARI on the screen display using the power of PLOT and DRAWTO and color it also. First though so you are not overwhelmed, we will just draw the first letter for now. Type in the program below to see it in action.
10 GRAPHICS 3
20 COLOR 2
30 REM DRAW THE LETTER “A”
40 PLOT 2,4:DRAWTO 2,14
50 COLOR 1
60 PLOT 3,4:DRAWTO 3,14
70 PLOT 4,4:DRAWTO 4,14
80 PLOT 5,4:DRAWTO 8,4
90 PLOT 8,4:DRAWTO 8,14
100 PLOT 5,9:DRAWTO 8,9
Another thing to mention is that once you have made a PLOT on the DRAWTO and followed it with a DRAWTO, if you want to extend from that point all you have to do is DRAWTO from the same position. You do not have to replace the PLOT at the last DRAWTO location, thanks to the wonders of this machine.
10 GRAPHICS 3
20 COLOR 2
30 REM DRAW THE LETTER “A”
40 PLOT 2,4:DRAWTO 2,14
50 COLOR 1
60 PLOT 3,4:DRAWTO 3,14
70 PLOT 4,4:DRAWTO 4,14
80 PLOT 5,4:DRAWTO 8,4
90 PLOT 8,4:DRAWTO 8,14
100 PLOT 5,9:DRAWTO 8,9
110 REM DRAW THE LETTER “T”
120 PLOT 11,4:DRAWTO 16,4
130 COLOR 2
140 PLOT 13,5:DRAWTO 13,14
150 COLOR 1
160 PLOT 14,4:DRAWTO 14,14
170 REM DRAW THE LETTER “A”
180 COLOR 2
190 PLOT 18,4:DRAWTO 18,14
200 COLOR 1
210 PLOT 19,4:DRAWTO 19,14
220 PLOT 20,4:DRAWTO 20,14
230 PLOT 21,4:DRAWTO 24,4
240 PLOT 24,4:DRAWTO 24,14
250 PLOT 21,9:DRAWTO 24,9
260 REM DRAW THE LETTER “R”
270 COLOR 2
280 PLOT 26,4:DRAWTO 26,14
290 COLOR 1
300 PLOT 27,4:DRAWTO 27,14
310 PLOT 28,4:DRAWTO 32,4
320 PLOT 32,4:DRAWTO 32,9
330 DRAWTO 27,9
340 DRAWTO 32,14
350 PLOT 32,4:DRAWTO 32,14
360 COLOR 1
370 PLOT 37,14:DRAWTO 37,14
As an extra bonus, to see what you learned, try to cross the I in the word Atari. This will be great practice as we continue to move forward in learning about Atari graphics.
Atari's other Graphic modes
The Atari personal computer can access up to 14 other graphic modes. You can actually use the same program to see this. Just change line 10 to the appropriate graphics mode. For example, to see this in one of Atari’s more popular modes, change line 10 like this. You will notice that the dots are now much smaller and the screen seems to accommode more space. This mode is using more memory and has more pixels on the display. The pixels range from 159 horizontally to 79 vertically. As we explore newer programs later you will see more examples that utilize Graphics 7 and beyond.
10 GRAPHICS 7