By LARRY NOCELLA
BASIC Boink is a colorful new slant on the popular Boink graphics demo programs. Previous Tech Tips from stalwart JACS (Jersey Atari Computer Society) programmer Larry Nocella have appeared in the January 1987 and April, 1987 issues of Antic. BASIC Boink works on any Atari 8-bit computer with 16K, disk or cassette.
You've seen those Boink programs-bouncing balls, or Atari symbols (Fujis), etc. Like many other Atari programmers, I enjoy these flashy demonstrations of graphics power. So I decided to throw in my own two cents worth-a Boink variation in Atari BASIC that looks good despite the comparative slowness of the language.
Type in BOINK.BAS, check it with TYPO II and SAVE a copy before you RUN it. The program is written in BASIC, but the main work is done by a machine language routine. A DLI (Display List Interrupt) between the six Fujis changes their directions, colors and X-coordinates. This gives the effect of several individual objects.
ABOUT THE PROGRAM
The DLI routine occupies the first half of Page 6 (memory locations 1536-1663) and the rest of Page 6 tracks individual Fuji status.
When you look closely at the display, you'll notice that six Fujis stay on the right side of the screen and six stay on the left. They are kept there by the BASIC part of the program. I could've checked the limits in the DLI, but then the the Fujis would remain in the same pattern the whole time. And since BASIC is slower to the punch, it takes longer to change a Fuji's direction. So the bouncing Fujis change their pattern instead, making the demo more interesting.
Try pressing [BREAK] to end the demo. That way, the Fujis aren't restrained and will go across the screen endlessly. You can type and list the program, but since the main program is in a DLI, the Fujis will keep going until you press [RESET] to return things to normal.
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.
Listing: BOINK.BAS Download