Classic Computer Magazine Archive ANTIC VOL. 6, NO. 4 / AUGUST 1987

Tech Tips

by Bill Marquardt, Antic Technical Assistant


MINI-GRAPHICS CHALLENGE

Atari graphics demonstrations have been a longtime favorite of Antic readers. Now here is a Tech Tips challenge: Write the best short original graphics demo for the Atari 8-bit or ST computers in standard Atari BASIC. Machine language loaders are okay. Keep your program as short as possible, with an absolute maximum of 10 lines.

Send your listing on disk before September 1, 1987 to: Tech Tips Challenge, Antic Magazine, 544 Second Street, San Francisco, CA 94107. The top demos will be featured on a future Tech Tips Page and the first-place winner will receive a software title from The Catalog. All entries become property of Antic Publishing and cannot be returned.


SQUARE SIZZLER

This impressive graphics demo creates flashy effects by simultaneously moving a lot of simple shapes in opposing directions. We saw it in the San Leandro Computer Club newsletter, credited to the Queensland (Australia) Atari Computer Enthusiasts.

20 TRAP 20:GRAPHICS 42:POKE 559,0:C=2:DATA 0,2,4,6,8,10,12,14
30 RESTORE 1:FOR X=705 TO 712:READ A:POKE X,(C*16)+A:NEXT X
35 POKE 559,34:IF R=0 THEN FOR X=1536 TO 1562:READ A:POKE X,A:NEXT X:GOTO 80
40 GOTO 90:DATA 104,162,0,172,193,2,189,194,2,157,193,2,232,224,8
50 DATA 144,245,140,200,2,96,65,65,65,65,65,65
80 FOR Z=1 TO 10:FOR X=1 TO 8:COLOR X:PLOT 0+L,0+L:DRAWTO 79-L,0+L:DRAWTO 79-L, 191-L:DRAWTO 0+L,191-L
85 DRAWTO 0+L,0+L:L=L+I:NEXT X:NEXT Z
90 FOR E=1 TO 31:X=USR(1536):FOR T=1 TO 32:NEXT T:NEXT E:C=C+1:R=1:GOTO 30


SMALL MIRACLE

When I see the latest issue of Current Notes, the magazine of the Washington Area Atari Computer Enthusiasts, the first thing I turn to is Mark Brown's Atari Small Miracles column. Following are two examples of his fine work.

VBI MUSIC

The following routine will install a VBI music player in Page Six. The music will continue to play while your program continues on undisturbed. Start the music with something like this:

JUNK = USR(1536,ADR(Ml$),ADR(M2$),ADR(M3$),ADR(M4$)) The four strings are strings you have created earlier. Use only as many ADR() parameters in the call as you want voices. The strings should consist of character value pairs with the first being the note and the second being the length in 60ths of a second. For example, CHR$(121) and CHR$(15) would play a C note for 1/4 of a second. Terminate each string with two CHR$(0)'s.

10 C=0:FOR A=1536 TO 1685:READ B:C=C+A*B:POKE A,B:NEXT A:IF C<>25310305 THEN PRINT "DATA ERROR!":STOP
20 DATA 104,240,254,201,5,176,254,141,149,6,141,148,6,162,0,104,157,144,6,104,157,140,6,169,0,157,136,6,232
30 DATA 236,148,6,208,237,169,6,162,6,160,43,76,92,228,173,149,6,240,85,169,3,141,15,210,169,0,141,8,210,141
40 DATA 149,6,170,189,136,6,208,52,168,189,144,6,133,1 ,189,140,6,133,0,177,0,72,138,10,168,104,153,0,210,169
50 DATA 164,153,1,210,160,1,177,0,157,136,6,136,17,0,240,22 ,189,140,6,24,105,2,157,140,6,144,3,254,144,6,169
60 DATA 127,238,149,6,222,136,6,232,236,148,6,208,185 ,76,95,228,1,2,3,4,5,6,7,7,6,5,4,3,2,1
70 PRINT 'ALL DATA CORRECT, VBI MUSIC INSTALLED!":END

Here is a short one-voice sample. Add these lines to the program and type GOTO 80 from the immediate mode after RUNning the program.

80 DIM M1$(18):FOR I=1 TO 18
90 READ D:M1$(I,I)=CHR$(D):NEXT I
100 X=USR(1536,ADR(M1$))
110 DATA 121,20,108,20,96,20,91,20,81
120 DATA 20,72,20,64,20,60,20,0,0


If you have a Tech Tip that you would like to share with other readers, send it along to Antic Tech Tips, 544 Second Street, San Francisco, CA 94107. You might get your name in print. We always welcome very short programs that demonstrate the Atari's powers, simple hardware modifications, or useful macros for popular software.