Classic Computer Magazine Archive ANTIC VOL. 7, NO. 9 / JANUARY 1989

Tech Tips

HI-RES GRAPHICS 8

This graphics demonstration is by Clay Halliwell, a computer science major at Southwest Missouri State University

According to the official manuals, Graphics 8 is a bit-mapped mode with a resolution of 320 x 192 – and only two colors. Of course, most programmers know this isn't quite true. In this mode, the pixels plotted in even columns are blue, odd-column pixels are green, and two or more adiacent pixels produce white. This often-discussed effect is commonly known as "artifacting"

Actually the following strange technique has been around for years. You see, Graphics 8 is backwards! An average Graphics 8 screen might have the background set at luminance 0 (dark) and the drawing color at luminance 10 (bright).

Let's take the drawing color and fill in every point on the screen. An entirely filled screen is very white and painful to look at. But you can swap the colors by changing the full-screen drawing color (which is now effectively the background) to a darker luminance 0. Then change the background color to a brighter luminance 10.

The screen is again black, except you now turn bits on instead of off to draw (or just use COLOR 0). We have entered Graphics 8 Plus. As shown in the demonstration program below, Graphics 8+ differs from regular Graphics 8 in the following ways. Pixels are sharper brighter and less prone to bleeding. Artifact colors are much more solid-looking and don't have the vertical "hum-lines" present on some TV sets. On monochrome displays all pixels present a uniform luminance. Also, all of the above applies to Graphics 0 as well.

LISTING   HIRESGR8.BAS Download

DOSINI HOUDINI

Running a machine language routine on [RESET) is tricky. While nothing happens to your Atari's built-in RESET routine itself (location 61723), DOSINI (memory locations 12 and 13) is affected. The RESET routine jumps to the operating system's warm-start routine WARMSV (58484, $E474). But DOSINI is executed during warm-start, so we can use DOSINI to trap [RESET].

To do this, you must store the low byte of your routine's starting address into location 12, and the high byte in location 13. However, DOSINI MUST be executed. The first instruction in your routine MUST be a JSR to the original DOSINI starting location.

Now when you press [RESET], the operating system jumps to what it thinks is DOSINI but is actually your program. Then your program will JSR to the real DOSINI, and when it returns, the operating system will continue on its merry way, running the rest of your machine language program.

Greg Vozzo is from Brightwaters, New York. This is his first appearance in Antic.

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.