Classic Computer Magazine Archive ANTIC VOL. 8, NO. 2 / JUNE 1989

Tech Tips



This short program shows you how to use those long, multi-colored GTIA pixels in other graphics modes.

There are many powerful uses for this technique, such as creating multi-colored redefined character sets for arcade games. The thickness of the GTIA pixels make letters and numbers almost illegible, but their variety of colors offer an easy way to add color to your characters.

In modes such as Graphics 8, each pixel is one bit wide. Thus, if a bit is set, its corresponding pixel is lit. In these graphics modes, the bit pattern shown in the left half of figure 1 will draw an "A" and uses 64 pixels.

GTIA pixels are four bits wide. In a GTIA mode, the bit pattern would draw a small multi-colored box eight scan lines tall and two pixels wide. The color of each pixel is determined by its bit pattern. The second scan line, for example, contains one pixel of COLOR 1 (or 0001 in binary) and one pixel of COLOR 8 (1000 in binary).

The right half of Figure 1 shows the color breakdown of the entire character.

Figure 1
0    --------    00000000    COLOR 0     COLOR 0
24   ---XX---    00011000    COLOR 1     COLOR 8
60   --XXXX--    00111100    COLOR 3     COLOR 12
102  -XX--XX-    01100110    COLOR 6     COLOR 6 
102  -XX--XX-    01100110    COLOR 6     COLOR 6  
126  -XXXXXX-    01111110    COLOR 7     COLOR 14 
102  -XX--XX-    01100110    COLOR 6     COLOR 6                 
0    --------    00000000    COLOR 0     COLOR 0

Learn these simple techniques and you'll have colorful GTIA characters dancing around your screen in no time.

The listing below is a short demo of using GTIA pixels in Graphics 0 and Graphics 8. When RUN, the program asks if you'd like to see mode 9 (16 shades of a single color), mode 10 (9 colors) or mode 11 (16 colors of a single shade). After you choose your mode, the program will draw a series of stripes in Graphics 8, print some text in the text window, then pop into your chosen GTIA mode and rotate the colors. When you're done, press any key to return to the main menu.

10 GRAPHICS 0:? "}":? " 1   MODE 9":? :? " 2    MODE 10":? :? " 3   MODE 11":? :? :? "SELECTION:";
20 CLOSE #1:OPEN #1,4,0,"K:"
30 TRAP 30:GET #1,K:K=K-48:IF K<1 OR K>3 THEN 30
40 G=K+8:GRAPHICS 8:POKE 87,G:FOR I=0 TO 8+(G=15)*7
50 COLOR I:FOR J=I*(10+(G=10)*5) TO I*(10+(G=10)*5)+(8+(G=10)*5)
60 PLOT 0,J:DRAWTO 79,J:NEXT J:NEXT I:? "THIS IS  TEXT  IN THIS MODE.";:POKE 623,96*(K=1)+128*(K=2)+192*(K=3)
70 IF K=1 THEN FOR I=0 TO 255:POKE 712,I:GOSUB 75:NEXT I:POKE 712,0:GOTO 80
71 IF K=2 THEN FOR I=704 TO 712:POKE I,PEEK(53770):NEXT I:GOTO 80
72 FOR I=0 TO 255:POKE 712,I:GOSUB 75:NEXT I:POKE 712,6:GOTO 80
80 TRAP 80:GET #1,K:RUN 


This short BASIC program turns on your Atari 410 or 1010 Cassette Recorder's motor; letting you play any audio tape through the TV or monitor speaker. It reactivates itself whenever [RESET] is pressed. To deactivate it, POKE 1791 with any number from 0-254. To re-enable it, POKE 1791 with a 255.

If you want to disable it without disabling the [RESET] reactivation process, simply POKE a 60 into location 54018. POKE 54018 with a 52 to reactivate the motor at any time.

This program is an extension of my DOSINI HOUDINI, a Tech Tip from January 1988, which explains how to trap [RESET] by modifying part of your Atari's warm-start cycle.

10 FOR I=1775 TO 1791:READ A:POKE I,A:NEXT I:DATA 32,0,0,173,255,6,201,255,208,5,169,52,141,2,211,96,255
20 POKE 1776,PEEK(12):POKE 1777,PEEK(13):POKE 12,239:POKE 13,6:? "CASSETTE MOTOR ENABLED":POKE 54018,52
Antic pays $25 for every original and exclusive Tech Tip submission that we publish. Send your 8-bit or ST disk and printout to: Antic Tech Tips, 544 Second Street, San Francisco, CA 94107. Tech Tips welcomes very short programs that demonstrate the Atari's powers, simple hardware modifications, or useful macros for popular software.