Tech TipsBY BILL MARQUARDT, ANTIC TECHNICAL ASSISTANT
DOWN UNDER IN NJ
One of the great things about public domain software is the way that good programs spread like wildfire- especially good short programs such as we now reprint in Tech Tips each month. Antic credits the source where we find each Tech Tip printed here. If we see the same tip in multiple sources, such as several users group newsletters, we credit the source with the earliest publication date we know of.
However, by the very nature of public domain software, it can be difficult for Antic to figure out who is the true author of a routine.
In the January Tech Tips column we published a RAMdisk routine credited to Larry Nocelia of the New South Wales (Australia) Atari Computer Enthusiasts. As it turns out, Nocella hails from Woodbury Heights, New Jersey and Is an active member of JACS, the Jersey Atari Computer Society-which originally published his program in Oct. 1985, 13 months before we started running Tech Tips as a regular full-page feature in the November 1986 issue. However, Larry kindly sent along three more of his fine routines from Between Bytes, the JACS newsletter.
MARCH '87 DISK
The March 1987 Antic Disk had an error on the label. The disk should have been labelled Volume 5, Number 11.
Nocella's Listing 1 is called Joystick Reader. It can return 18 possible values instead of the usual nine. This machine language routine would most likely be used for games. It uses the format X = USR(ADDR,STKNUM). ADDR is the address of the routine and STKNUM is the joystick port to be read. Variable X retums the normal joystick directional value that you would expect when the joystick button is not pressed, but it adds 128 to the value if the button is pressed.
10 DIM A$(32):STICKNUM=0
20 FOR I=1 TO 32:READ X:A$(I)=CHR$(X):NEXT I
30 X=USR(ADR(A$),STKNUM):? X:GOTO 30
50 DATA 104,104,l04,l70,l89,120,2,l88,132,2,208,5,l60,
60 DATA 213,133,212,96
Listing 2 is a quick and easy way to generate the famous Atari Rainbow effect. RUN the progam and the rainbow starts. Exit by pressing the [START] key. Call this routine with Z = USR(ADDR,X). ADDR is the address again, and x is the number of the color register affected. Subtract 704 from the color register location to find the value of X. This will work for Player/Missile graphics as well!
10 CT=0:X=8:REM BACKGROUND
20 CT=CT+l:READ Q:IF Q=-l THEN 40
30 POKE 1663 +CT,Q:GOTO 20
60 DATA 104,104,104,168,232,142,10,2l2,l38,l53,l8,208
Listing 3 is a software driver for the Hardware Key project which appeared in the August 1986 Tech Tip on page 102. (Antic used to publish Tech Tips as occasional fillers prior to November 1986, when they became a monthly page.) Call the routine with X = USR(ADDR), where ADDR is the address of the routine. The routine will loop until the correct hardware key is inserted. Because of the differences between keys, change the DATA statement in line 40 to your correct PADDLE 2 and PADDLE 3 values shown by PEEK(626) and PEEK(627). Consider this routine a starting point because many improvements come to mind, such as disabling the [RESET] key.
10 GRAPHICS 0:POKE 752,l:POKE 710,144:POKE 712,148:POKE 709,12
20 DIM H$(18):FOR I=1 TO 18:READ X:HS(I)=CHR$(X):NEXT I
30 DATA 104,24,216,173,114,2,201,0,208,249,173,115,2,201,0,208 242 96
40 READ PDL2,PDL3:H$(8) = CHRS(PDL2):H$(15)= CHR$(PDL3):DATA 3,5
50 POSITION 6,3:? "PUT HARDWARE KEY IN PORT 2!"
60 DUMMY= USR(ADR(H$))
70 POSITION 15,5:? "THANK YOU!":POKE 752,0:END
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.