Design Philosophy and GTIA Demos


This last year marks a period of incredible growth for the Atari computer. The Atari Program Exchange got going and is now shipping a large volume of Atari software. This exchange provides low-cost but relatively high quality software written by outside users.

Last year at this time there was no Jawbreakers, Asteroids, or Missile Command; now these programs are being surpassed (Have you seen Mouskattack yet? The cover art alone is worth the purchase price.)

Last year we had the Basic and Assembler cartridges, neither of which was designed for speed or for large programs. Now we have Microsoft Basic, the awesome new Editor/Macro Assembler, Pilot, Forth, Lisp, and according to a letter I just received, Algol.

The tools to develop high quality software are now available; and it is a safe bet that more good software will be appearing on the market.

Outside manufacturers are also producing a wide variety of hardware for the Atari. There are several modems available, one of which I will review shortly (the direct-connect Microconnection).

There is also a good deal of hobbyist-oriented equipment, such as EPROM burners, I/O port connectors, and whatnot, and a light pen is now available from non-Atari sources.

Percom Corp. in Texas is now marketing an entire line of Atari-compatible single, double and quad density disk drives, and other companies have introduced Winchester drives. Atari has even published a list of outside vendors of software and hardware for their machine.

And did I mention the news that Atari has surpassed Apple in sales? And rumors of new Atari machines are currently flying (something may be announced in June, I am told). This machine is here to stay, and will continue to grow for quite some time.

What Is an Atari?

If you own an Atari, you may be curious to learn what you have bought. I searched long and hard for a definition of what Atari has produced; "home computer" is too vague. After all, it does have a specific and limited place in the market. For example Atari dropped the 815 double density dual disk drive when it did not conform to their definition of a "home computer."

The definition I finally found, is a "home computing appliance." Chew on those words for a while; they contain the essence of the design and marketing strategy of the Atari. This is a second-generation consumer-oriented machine, carefully designed and oriented towards the home market from the ground up.

Atari is not in the business market. They have no intention of competing with Tandy, Apple, and IBM, who are currently beating their respective heads together trying to capture that field. Atari stands with Texas Instruments in the home computer marketplace with a strategy of aiming at the home user.

Products designed for home use--principally games, home finance, and education/development--are released and pushed hard. Pilot offers a good example of the educational potential of this machine, and the games available for the Atari are becoming the standard for the home computer industry.

Bear in mind also that this is a consumer machine. It is not designed for a hardware or computer professional. It is designed for an average person who wants a "home computing appliance."

It is not as hardware oriented as the Apple. It doesn't have a collection of open "slots" on the various busses available. What housewife seeking help with her checkbook honestly cares whether or not she can access the interrupt request line with a plug-in card?

The layout is for a consumer. The machine is attractively styled, and goof-proof. Memory and the Operating System are packaged in cartridges located under the front cover, and joysticks plug in easily under the front keyboard.

Many of the programs available can be used by a consumer with little knowledge of computers; they plug in on ROM cartridges (most four-year old kids I know can master this trick), and the system Reset key is protected against accidental press, and so on.

I remember being told that "The Atari isn't a serious machine because it doesn't offer PASCAL." I have heard this sort of complaint many times, always directed at something the Atari lacked, be it Cobol, Fortran-1933, or whatever. The people who voice these objections (in most cases, computing professionals) don't understand that the Atari home computer is Atari's very serious attempt to make a computer that a home user can get along with-not necessarily a programmer, just a home user. It may not have the current languages that are in vogue today (and possibly gone tomorrow). But this is by design and not by default.

So, while the Atari may not at first glance look like a powerful computing machine, with lots of lights, integrated circuits, and cables all over the place, it is. It has just been designed for a home computer user according to Atari's idea of who the home computer user is.

Oh, and yes, Pascal is now available for the Atari.

GTIA Demonstration Programs

As of January 1982, Atari began shipping all Atari 800 units with GTIA graphics chips. The GTIA chip replaces the CTIA graphics chip and allows three more graphics modes. Don't worry, the operating system ROM and the Basic cartridge were written with GTIA in mind. GTIA is a superset of the CTIA functions.

Several short demonstration programs for the GTIA exist. I don't know where they were written, but I would assume somewhere at Atari by someone with a preliminary GTIA chip.

Below are several listings of sample GTIA programs. Users with CTIA graphics chips can try these programs, but don't expect spectacular results. Users with GTIA chips will be in for a pleasant surprise, indeed.

Feel free, as always, to modify them, and if you come up with a really neat effect, I'd appreciate a listing or a disk/tape (I'll return your disk/tape, of course.) The address appears at the beginning of the column.

By the way, if the author of these programs would care to step forward, I will certainly give him credit. I would like to know who wrote them.

Be sure to include the following two lines at the end of LOGO, HYPNO, ESCAPE, MELONS, SAS, and WHIRL.

31000 DATA 104,162,0,172,193,2,189,194,2,157,193,2,232,224,8,144,245,140,200
31010 DATA 2,96,65,65,65,65,65,65

LOGO

1 TRAP 80
2 DIM A$(30),SINE(450)
3 GOSUB 30000
4 DEG
10 GRAPHICS 10
15 FOR I=1 TO 8:READ A:POKE 704+I,I*16+6:NEXT I
20 COLR=1:Y=1
30 FOR X=10 TO 69
40 COLOR COLR
50 PLOT X,141-Y:DRAWTO X,191-Y
52 PLOT 79-X,141-Y:DRAWTO 79-X,191-Y
54 FOR Q=36 TO 43
55 PLOT Q,191-Y:DRAWTO Q,141-Y
56 NEXT Q
60 Y=Y*1.23
65 COLR=COLR+1:IF COLR>8 THEN COLR=1
70 NEXT X
80 X=USR(ADR(A$))
90 FOR J=1 TO 12:NEXT J
100 GOTO 80
1000 DATA 2,4,6,8,6,4,2,2
30000 REM *** SET UP ASSY PROGRAM
30010 RESTORE 31000
30020 FOR Z=1 TO 27
30030 READ X:A$(Z)=CHR$(X)
30040 NEXT Z
30050 RESTORE
30060 RETURN
31000 DATA 104,162,0,172,193,2,189,194,2,157,193,2,232,224,8,144,245,140,200
31010 DATA 2,96,65,65,65,65,65,65

MELONS

2 DIM A$(30),SINE(450)
3 GOSUB 30000
4 DEG
9 FOR I=0 TO 90:? I:A=SIN(I):SINE(I)=A:SINE(180-I)=A:SINE(180+I)=-A:SINE(360-I)=-A:SINE(360+I)=A:NEXT I
10 GRAPHICS 10
15 RESTORE :FOR I=1 TO 8:READ A:POKE 704+I,A:NEXT I
18 FOR P=1 TO 2
20 Q=1
25 A=30
30 FOR ANG=180 TO 270 STEP 8
40 X=20*SINE(ANG+90)+25
50 Y=A*SINE(ANG)
55 Z=X:IF P=2 THEN Z=79-X
60 COLOR Q
65 IF ANG=180 THEN OLDX=Z:OLDY=Y
70 PLOT OLDX,96+OLDY
75 DRAWTO Z,96+Y
77 OLDX=Z:OLDY=Y
80 REM
90 NEXT ANG
95 Q=Q+1:IF Q>7 THEN Q=1
100 A=A-1
110 IF A>-30 THEN 30
200 FOR ANG=0 TO 180 STEP 10
210 COLOR 8
220 X=4*SINE(ANG+90)+25
225 Z=X:IF P=2 THEN Z=79-X
230 Y=30*SINE(ANG)
240 PLOT Z,96+Y
250 DRAWTO Z,96-Y
260 NEXT ANG
300 FOR I=1 TO 25
310 X=RND(0)*6+23
315 Z=X:IF P=2 THEN Z=79-X
320 Y=RND(0)*50+71
330 COLOR 0
340 PLOT Z,Y
350 NEXT I
400 NEXT P
900 REM X=USR(ADR(A$))
910 FOR J=1 TO 10:NEXT J
920 GOTO 900
1000 DATA 226,223,230,232,230,228,226,70
30000 REM *** SET UP ASSI PROGRAM
30010 RESTORE 31000
30020 FOR Z=1 TO 27
30030 READ X:A$(Z)=CHR$(X)
30040 NEXT Z
30050 RESTORE
30060 RETURN
31000 DATA 104,162,0,172,193,2,189,194,2,157,193,2,232,224,8,144,245,140,200
31010 DATA 2,96,65,65,65,65,65,65

HYPNO

2 DIM A$(30)
3 GOSUB 30000
10 GRAPHICS 10
15 FOR I=1 TO 8:POKE 704+I,(I-1)*32+22:NEXT I
20 Q=1
30 FOR Y=0 TO 191
40 COLOR Q
50 PLOT 0,Y
60 DRAWTO 79,191-Y
70 Q=Q+0.416666666:IF Q>8 THEN Q=1
75 REM FOR T=1 TO 100:NEXT T
80 NEXT Y
120 Q=1
130 FOR X=79 TO 0 STEP -1
140 COLOR Q
150 PLOT X,0
160 DRAWTO 79-X,191
170 Q=Q+1:IF Q>8 THEN Q=1
180 NEXT X
190 REM COLOR 0:PLOT 0,0:DRAWTO 79,191:PLOT 79,0:DRAWTO 0,191
200 X=USR(ADR(A$))
210 FOR J=1 TO 4:NEXT J
220 GOTO 200
30000 REM *** SET UP ASSY PROGRAM
30010 RESTORE 31000
30020 FOR Z=1 TO 27
30030 READ X:A$(Z)=CHR$(X)
30040 NEXT Z
30050 RESTORE
30060 RETURN
31000 DATA 104,162,0,172,193,2,189,194,2,157,193,2,232,224,8,144,245,140,200
31010 DATA 2,96,65,65,65,65,54,65

ESCAPE

2 DIM A$(30)
3 GOSUB 30000
10 GRAPHICS 10
15 FOR I=1 TO 8:READ A:POKE 704+I,A+224:NEXT I
17 Q=1
20 FOR I=0 TO 38
40 COLOR Q
42 X=1
45 Y=I*2
50 PLOT X,Y
60 DRAWTO 79-X,Y:PLOT X,Y+1:DRAWTO 79-X,Y+1
62 DRAWTO 79-X,190-Y
64 DRAWTO X,190-Y:PLOT 79-X,190-Y+1:DRAWTO X,190-Y+1
66 DRAWTO X,Y
70 Q=Q+1:IF Q>8 THEN Q=1
80 NEXT I
100 X=USR(ADR(A$))
110 FOR J=1 TO 24:NEXT J
120 GOTO 100
1000 DATA 2,4,6,8,6,4,2,2
30000 REM *** SET UP ASSI PROGRAM
30010 RESTORE 31000
30020 FOR Z=1 TO 27
30030 READ X:A$(Z)=CHR$(X)
30040 NEXT Z
30050 RESTORE
30060 RETURN
31000 DATA 104,162,0,172,193,2,189,194,2,157,193,2,232,224,8,144,245,140,200
31010 DATA 2,96,65,65,65,65,65,65

SAS

2 DIM A$(30),SINE(450)
3 GOSUB 30000
4 DEG
8 ? "STAND BY"
9 FOR I=0 TO 90:? I:A=SIN(I):SINE(I)=A:SINE(180-I)=A:SINE(I+180)=-A:SINE(360-I)=-A:SINE(I+360)=A:NEXT I
10 GRAPHICS 10
15 RESTORE :FOR I=1 TO 8:READ A:POKE 704+I,A+224:NEXT I
19 C=1
20 FOR ANG=0 TO 359
30 X=40+30*SINE(ANG+90)
40 Y=96+80*SINE(ANG)
50 COLOR INT(C)
60 PLOT 65,96
70 DRAWTO X,Y
75 PLOT 65,95
77 DRAWTO X,Y-1
78 PLOT 65,94
79 DRAWTO X,Y-2
80 Q=USR(ADR(A$))
85 C=C+0.5:IF C>=9 THEN C=1
90 NEXT ANG
900 Q=USR(ADR(A$))
910 FOR I=1 TO 14:NEXT I
920 GOTO 900
1000 DATA 2,4,6,8,6,4,2,2
30000 REM *** SET UP ASSY PROGRAM
30010 RESTORE 31000
30020 FOR Z=1 TO 27
30030 READ X:A$(Z)=CHR$(X)
30040 NEXT Z
30050 RESTORE
30060 RETURN
31000 DATA 104,162,0,172,193,2,189,194,2,157,193,2,232,224,8,144,245,140,200
31010 DATA 2,96,65,65,65,65,65,65

BRASS

10 GRAPHICS 9
15 SETCOLOR 4,15,0
20 FOR Y=55 TO 0 STEP -10
30 FOR X=0 TO 24
40 C=X:IF X>11 THEN C=24-X
45 C=C+3
50 Z=Y+(X)
55 D=INT(SQR(144-(X-12)*(X-12)))/2
57 COLOR 15-C
58 PLOT Z,Y+7-D
60 DRAWTO Z,Y+7+D
70 COLOR C
80 DRAWTO Z,180-Y+D
180 NEXT X
190 NEXT Y
200 GOTO 200

WHIRL

2 DIM A$(30),SINE(450)
3 GOSUB 30000
4 DEG
8 ? "STAND BY"
9 FOR I=0 TO 90:? I:A=SIN(I):SINE(I)=A:SINE(180-I)=A:SINE(I+180)=-A:SINE(360-I)=-A:SINE(I+360)=A:NEXT I
10 GRAPHICS 10
15 RESTORE :FOR I=1 TO 8:READ A:POKE 704+I,A+224:NEXT I
17 GOSUB 2000
20 FOR ANG=0 TO 359 STEP 2
25 Q=8
30 X=20*SINE(ANG+90)+40
40 Y=20*SINE(ANG)+96
42 COLOR 0:PLOT X,Y:IF ANG<180 THEN 90
43 AS=0
45 FOR W=1 TO 45
50 LOCATE X,Y+W,QW:IF QW=0 THEN AS=1
55 IF AS=1 THEN 80
57 COLOR Q
60 PLOT X,Y+W
70 Q=Q-1:IF Q<1 THEN Q=8
80 NEXT W
90 NEXT ANG
95 Z=20:U=20
175 Q=Q+1:IF Q>8 THEN Q=1
900 X=USR(ADR(A$))
910 FOR I=1 TO 8:NEXT I
920 GOTO 900
1000 DATA 2,4,6,8,6,4,2,2
2000 REM THIS IS THE HEART OF DIZZY
2020 Q=1
2030 FOR Y=0 TO 191
2040 COLOR Q
2050 PLOT 0,Y
2060 DRAWTO 79,191-Y
2070 Q=Q+0.416666666:IF Q>8 THEN Q=1
2080 NEXT Y
2130 FOR X=79 TO 0 STEP -1
2140 COLOR Q
2150 PLOT X,0
2160 DRAWTO 79-X,191
2170 Q=Q+1:IF Q>8 THEN Q=1
2180 NEXT X
2230 RETURN
30000 REM *** SET UP ASSY PROGRAM
30010 RESTORE 31000
30020 FOR Z=1 TO 27
30030 READ X:A$(Z)=CHR$(X)
30040 NEXT Z
30050 RESTORE
30060 RETURN
31000 DATA 104,162,0,172,193,2,189,194,2,157,193,2,232,224,8,144,245,140,200
31010 DATA 2,96,65,65,65,65,65,65

RAINBOW

100 REM GTIA TEST
115 GRAPHICS 10:FOR Z=704 TO 712:READ R:POKE Z,R:NEXT Z
116 DATA 0,26,42,58,74,90,106,122,138,154
130 FOR X=1 TO 8:COLOR X:POKE 765,X
140 PLOT X*4+5,0:DRAWTO X*4+5,159:PLOT X*4+1,159:POSITION X*4+1,0:XIO 18,#6,0,0,"S:"
150 NEXT X
230 FOR X=8 TO 15:COLOR 16-X:POKE 765,16-X
240 PLOT X*4+5,0:DRAWTO X*4+5,159:PLOT X*4+1,159:POSITION X*4+1,0:XIO 18,#6,0,0,"S:"
250 NEXT X
300 COLOR 0:PLOT 65,159:DRAWTO 0,159
400 FOR X=1 TO 8:Z=PEEK(704+X):Z=Z+16:IF Z>255 THEN Z=26
420 POKE 704+X,Z:NEXT X:FOR Y=1 TO 5:NEXT Y:GOTO 400

ROLL

5 DEG
10 GRAPHICS 10
15 FOR I=0 TO 7:POKE 705+I,128+2:NEXT I
17 POKE 705,136
20 FOR ANG=180 TO 360+180 STEP 6
30 X=8+8*COS(ANG)
40 Y=16+8*SIN(ANG)
50 COLOR (ANG-180)/45+1:PLOT X,Y
60 DRAWTO X,50+Y
70 COLOR 0:PLOT X,Y
90 NEXT ANG
120 FOR ANG=180 TO 360+180 STEP 6
130 X=26+8*COS(ANG)
140 Y=16+8*SIN(ANG)
150 COLOR 9-(ANG-180)/45:PLOT X,Y
160 DRAWTO X,50+Y
170 COLOR 0:PLOT X,Y
190 NEXT ANG
220 FOR ANG=180 TO 360+180 STEP 6
230 X=44+8*COS(ANG)
240 Y=16+8*SIN(ANG)
250 COLOR (ANG-180)/45+1:PLOT X,Y
260 DRAWTO X,50+Y
270 COLOR 0:PLOT X,Y
290 NEXT ANG
320 FOR ANG=180 TO 360+180 STEP 6
330 X=62+8*COS(ANG)
340 Y=16+8*SIN(ANG)
350 COLOR 9-(ANG-180)/45:PLOT X,Y
360 DRAWTO X,50+Y
370 COLOR 0:PLOT X,Y
390 NEXT ANG
410 GOTO 500
420 FOR ANG=180 TO 360+180 STEP 6
430 X=50+8*COS(ANG)
440 Y=16+8*SIN(ANG)
450 COLOR (ANG-180)/45+1:PLOT X,Y
460 DRAWTO X,50+Y
470 COLOR 0:PLOT X,Y
490 NEXT ANG
500 A=PEEK(705)
510 FOR I=705 TO 711
520 POKE I,PEEK(I+1)
530 NEXT I
540 POKE 712,A
550 GOTO 500

RING

100 REM GTIA TEST
110 DIM C(22,2)
115 GRAPHICS 10:FOR Z=704 TO 712:READ R:POKE Z,R:NEXT Z
116 DATA 0,26,42,58,74,90,106,122,138,54
118 LIM=22:T2=3.14159*2/LIM
120 GOSUB 2500:FOR V=1 TO LIM:T=T+T2:GOSUB 2500:NEXT V
200 GOTO 1000
400 FOR X=1 TO 8:Z=PEEK(704+X):Z=Z+16:IF Z>255 THEN Z=26
420 POKE 704+X,Z:NEXT X:POKE 77,0:GOTO 400
1000 REM
1010 FOR R=1 TO 8:T6=R
1020 GOSUB 1520:NEXT R
1110 FOR R=9 TO 15:T6=16-R
1120 GOSUB 1520:NEXT R
1210 FOR R=16 TO 23:T6=R-15
1220 GOSUB 1520:NEXT R
1310 FOR R=24 TO 30:T6=31-R
1320 GOSUB 1520:NEXT R
1400 IF T3=1 THEN GOTO 400
1410 T3=1:GOTO 1010
1520 COLOR T6:V=0:GOSUB 2000:PLOT X,Y:FOR V=1 TO LIM:T=T+T2:GOSUB 2000:GOSUB 3000:DRAWTO X,Y:NEXT V:RETURN
2000 X=(30-R)*C(V,1)+40:Y=(60-R)*C(V,2)+80:RETURN
2500 C(V,1)=SIN(T):C(V,2)=COS(T):RETURN
3000 IF T3=1 THEN IF (R=1 AND V>11) OR R>1 THEN POSITION X,Y:POKE 765,T6:XIO 18,#6,0,0,"S:"
3010 RETURN

BALL

100 REM GTIA TEST
115 DIM C(8):GRAPHICS 10:FOR Z=704 TO 712:READ R:R=R*16+8:C(Z-704)=R:POKE Z,R:NEXT Z
116 DATA -.5,1,3,4,5,7,3,12,13
118 LIM=22:T2=3.14159*2/LIM:COL=3:E1=1:DIM D(LIM,2)
120 GOSUB 1500:FOR V=1 TO LIM:T=T+T2:GOSUB 1500:NEXT V
400 GOTO 1000
490 REG=705
500 FOR X=1 TO 8:POKE REG,C(X):REG=REG+1:IF REG>712 THEN REG=705
510 NEXT X:REG=REG+1:IF REG>712 THEN REG=705
520 POKE 77,0:GOTO 500
1000 REM
1005 FOR E=1 TO 10:E2=INT(E/2-0.5)
1010 FOR R=E1 TO E1+E2:CR=8-COL:IF CR=0 THEN CR=8
1015 V=0:COLOR CR:GOSUB 2000:PLOT X,Y
1020 FOR V=1 TO LIM:T=T+T2:GOSUB 2000:DRAWTO X,Y:IF V>=LIM/2 THEN COLOR COL
1025 NEXT V:NEXT R:COL=COL+1:IF COL=9 THEN COL=1
1030 E1=E1+INT(E/2+0.5):NEXT E
1200 GOTO 490
1500 D(V,1)=SIN(T):D(V,2)=COS(T):RETURN
2000 X=(30-R)*0.6*D(V,1)+40:Y=60*D(V,2)+80:RETURN

Table of Contents
Previous Section: Character Sets
Next Section: Graphics Seven Plus