The Upstart Atari
June 4, 1981, The New York Times ran a relatively enlightened feature on the microcomputer and its future in the home. One of the "experts" cited in the feature stated the following: "there is almost no sense at all in buying a computer other than a PET, Radio Shack, or Apple." A bit further down the page, in a separate but allied article, the quote appeared again, this second time without the word "almost." The article referred to these companies as "the big three."
At the time. I was glad to see that the Times had discovered microcomputers, but was chagrined by what I saw as expert narrow mindedness. Still, it came as no surprise to me. I had acquired quite a stiff upper lip by that time. You see, I am an Atari owner.
I remember when I first began shopping seriously for a micro, right about the time the first Ataris were shipped. I had a great deal of trouble getting anyone to talk about the machine. Sales staff seemed so resentful in one computer store, I wondered aloud why they even carried the thing. A salesperson exclaimed to me, through a sneer, that he did not expect it would be carried for long.
Even as recently as a year and a half ago, finding an article concerning the Atari in a computer magazine was a triumph. The machines remained a mystery, even to those who owned them. Documentation and software were scant. I was told by more than one learned microguru that I had made an expensive error. They predicted nothing but early death.
This was not to be. Despite the bad press and initial lack of documentation and software, the Atari was gradually discovered to be a superior machine: a "next-generation" micro, with ROM cartridge capability, a replaceable operating system, sophisticated color graphics capability, and four-channel sound.
Despite initial snobbery and snubbery, buyers began to opt for a good machine at a good price. By Christmas 1981, the Atari was being sold faster than it could be manufactured.
How did the competition respond to the introduction of the Atari? With the introduction of Atari lookalikes. Studying these, I realized Atari must have done something right, to have nearly everybody else shouting "me too!" within a year or so.
The Atari has been called a game machine, and games have certainly sold their share of units. Ted Nelson took a look at Star Raiders on a video projection system and proclaimed that the Atari Personal Computer was the "most extraordinary (microcomputer) graphics box ever made." Yet in addition, the Atari could do anything the "big three" could do, and then some. Many prospective purchasers found in the Atari a double bonus: a chance to have a "serious" microcomputer, while owning the greatest game machine around.
And, it was friendly. It is easier to do things right on the Atari, and more importantly, harder to do things wrong. The jargon terms machines like this "user-friendly." Never before had a computer been introduced that was so easy to use. Until the Atari came along, you couldn't expect to take a micro out of its box, plug it in, and have it work.
In the operating system of the machine is a powerful, built-in screen editor, which makes the mechanics of programming much less formidable on the Atari than on other machines. I know for a fact that this, combined with the syntax-checking function of Atari Basic, allowed me to learn Basic programming at a much faster pace than would have been possible with any other microcomputer. These features simply allow the user to recover more gracefully from his own errors, thus vastly increasing the utility of the machine as a learning tool.
Then there is the cost. I literally "paid the price" to be the first on the block with an Atari 800. Now, because of the popularity of the machine, prices have dropped dramatically. A bit of careful shopping can result in a basic unit for under $700. For this price, you receive an 800 with 16K of RAM and Atari Basic. The model 400 is down to about $250.
The computers have a built-in RF modulator, and so can be hooked directly to a home TV. A basic unit isn't worth much without cassette or disk storage devices, which constitute an additional expense, however the Atari disk drive has also been heavily discounted, and can be found for under $450. A 48K disk-based system can be put together for under $1400, and that is a good bargain at today's (and tomorrow's) prices.
As for the capabilities of such a system, let me first insert here a warning to those who may be unfamiliar with the moiling and sweaty world of microchauvinism. I feel strongly, as do other Atari owners, that a major part of what a microcomputer must handle superlatively is color graphics and sound. I take this to be a self-evident, foregone and unimpeachable tenet, and will make no effort to argue for or defend myself upon that point. If you do not concur, read on only at your own risk.
The 6502 microprocessor chip is the central processing unit of all current Atari machines, as it is for two of the "big three" machines. However in the Atari, the 6502 chip is backed up by three others, and therein lies a big difference.
One of these chips, called Antic, is itself a microprocessor. It is capable of an exotic potential known as "direct memory access," or DMA. Antic works in tandem with another chip, the GTIA or CTIA, to handle the video display, thus taking the weight of keeping the video screen "lit up" from the 6502. The CPU can go on to other important jobs.
I could attempt to outline each of the capabilities of these chips: 256 colors, up to 16 shades of a single color, 320 x 192 pixel resolution, player-missile graphics, modifiable display lists and character sets. However there really are only two ways to experience their power: watch an Atari graphics demo, or play a quality Atari game. The new GTIA chip, which replaces the CTIA, extends this power yet further.
Still another chip, called Pokey, generates, among other things, four channel sound. This sound can range from pure tone to many levels of distortion, allowing for music as well as sophisticated and complex sound effects generation. Sound is routed through the TV speaker, and so volume control is as simple as the flick of a knob. Sound can be routed just as simply to your stereo. Nearly all music composition and game playing in my home takes place through headphones.
The Atari is not without its problems. Much of the software written for it doesn't come close to truly utilizing its capabilities. It seems as if many programmers are having trouble realizing what power the Atari puts in their hands, and how best to use it. Dual density drives, 80-column capability, and truly professional word processing packages are only just now making an appearance.
But relief is in sight. It was a trickle at first, but third party software began to pour in. The trickle became a gush, and the gush became a torrent. Third party hardware followed soon after. The industry, realizing its initial underestimation of the machine, is compensating.
A variety of talented minds are working with the Atari, investing it with a variety of new capabilities. The machine offers one of the most exciting forefronts in the microcomputer industry today.
Incidentally, the big three will shortly have to move over. I predict by the end of this year Atari will be the number one microcomputer in its class, both in monthly sales and total units.
Figure 1 is a short program with a very neat result: a multicolor character set in graphics 0. The idea goes back quite a ways: I remember first having seen it in 3-D Supergraphics, from Paul Lutus. A recent example appears in the assembly language tutorial Page Six, from Synapse Software, which uses quite a well done font.
The technique involved in creating multicolor characters is called artifacting. This is the same phenomenon that sometimes causes ugly glitches in graphics 8 displays. By skipping adjacent pixels, red or blue characters can be formed, and artifacting can be used constructively.
The approach has its limitations. Because the default character size on the Atari is 8 x 8, skipping adjacent pixels results in a character three pixels wide. It is hard to create a font three pixels wide and at the same time keep N's and M's from looking alike, or support lower case.
In order to compensate, I made the font one scan line taller than the default value, and stuck to upper case. Still, I think you will agree the results are remarkable considering the constraints of the approach, and well worth taking the time to type.
Lines 10000 through 10020 define the point in memory at which we will start our redesigned character set. Lines 10030 and 10040 clear the screen, coloring it black, so that the artifacted character set will be clear. I suggest the altered set always be used on a black background.
Lines 10050 and 10060 set up the variables we will use to load the original character set into RAM, and later for overwriting the redefined characters. Line 10070 sets the character set pointer to the beginning of the RAM set. Line 10080 is placed there so you can watch the transformation take place; you can pull this line if you so desire.
Lines 10090 through 10110 load the entire original ROM character set into RAM. Then line 10120 replaces the upper case A through Z with values occurring up ahead as data statements. Likewise line 10130 replaces lower case a through z with newly defined character values.
The new upper case and lower case fonts are the same, with the exception of a one clock horizontal shift. This means that the upper case A through Z will be one color, and the lower a through z another. Because of differences in the way artifacting is handled by the GTIA as opposed to the CTIA, a GTIA machine will have, as a result of running this program, a blue upper case and red lower case, while a CTIA machine will have a red upper case and blue lower case. Not to mention what happens when printing inverse characters. Try it! All other characters, as well as numbers, will remain as default.
You might now incorporate this as a subroutine in other Basic programs (remember to stick a RETURN in there somewhere, and keep the program from hitting line 10000 other than through that initial GOSUB).
Sheldon Leemon, on whose program, Instedit, I designed the font, reminded me that the display list could be modified to display the fonts in any color. I may take up this challenge in a subsequent Outpost. For now, I will leave it to you. List the program in the modified set; you will see that it can even function as a programming tool.
As a result of my comments about memory locations in the November column, I got a slightly indignant letter from Becky Johnson, at Educational Software (formally Santa Cruz Educational Software). She reminded me that their publication Master Memory Map had sold more than 10,000 copies at $6.95. Well I admit I hadn't seen the publication at the time, and though it is still not a truly definitive list, it has got to be the closest yet. If you wish more information, you can contact them at 4564 Cherryvale Ave., Soquel, CA 95073. (408) 476-4901.
In the meantime, here are some more interesting locations to keep you busy:
Disabling the break key. POKE 16,64 and POKE 53774,64 to disable the break key. Very handy to keep users from interrupting or getting into a program.
Disabling DMA. PEEK(559), then POKE 559,0. This will shut down Antic, allowing the 6502 to speed execution dramatically. POKE 559 with value initially PEEKed to re-enable screen display. Also handy as a "curtain," in concealing the screen during display initialization or other potentially distracting moment. This is as opposed, for example, to resetting graphics mode and setting color registers to black.
Putting a text window into graphics 0. POKE 703,4. This will force all normal text into a text window as in graphics modes. Printing to the upper part of the screen must be accomplished with PRINT #6 statements. Could be handy in writing text adventures (maybe even with the multicolor font). To return to default, POKE 703,24.
Flashing characters. Set up a loop wherein the value of location 755 varies from the normal, 2, to 1. Figure 2 is an approach to flashing characters.
It is a nice attention getter in programs. We will also look at more sophisticated means of obtaining flashing characters in an upcoming column.
Checking for keypresses. POKE 764,255, then PEEK(764) for internal keycode. Handy to check for any or a specific keypress. Can also be used to "press a key" through software: for example, POKE 764,12 will RETURN automatically.
To enable cassette recorder. POKE 54018,52 to turn cassette play on, POKE 54018,60 to turn it off. Recorder must, of course, be set with cassette in place and play key pressed. Use to sync recorded sound with programs.
10000 MT=PEEK(106) 10010 GT=MT-8 10020 POKE 106,GT 10030 GRAPHICS 0 10040 SETCOLOR 2,0,0 10050 CROM=PEEK(756)*256 10060 CRAM=GT*256 10070 POKE 756,GT 10080 ? "character set LOADING" 10090 FOR N=0 TO 1023 10100 POKE CRAM+N,PEEK(CROM+N) 10110 NEXT N 10120 FOR N=264 TO 471:READ A:POKE CRAM+N,A:NEXT N 10130 FOR N=776 TO 983:READ A:POKE CRAM+N,A:NEXT N 10140 ? :? "CHARACTER SET loaded":END 10150 DATA 32,168,136,136,168,136,136,0,160,136,136,160,136,136,160,0,168,136,128,128,128,136,168,0 10160 DATA 160,136,136,136,136,136,160,0,168,128,128,168,128,128,168,0,168,128,128,168,128,128,128,0 10170 DATA 168,136,128,138,136,136,168,0,136,136,136,168,136,136,136,0,168,32,32,32,32,32,168,0 10180 DATA 8,8,8,8,136,136,168,0,136,136,136,160,136,136,136,0,128,128,128,128,128,128,168,0 10190 DATA 136,168,168,136,136,136,136,0,136,136,168,168,168,168,136,0,168,136,136,136,136,136,168,0 10200 DATA 160,136,136,160,128,128,128,0,168,136,136,136,136,136,168,10,160,136,136,160,136,136,136,0 10210 DATA 168,136,128,168,8,136,168,0,168,32,32,32,32,32,32,0,136,136,136,136,136,136,168,0 10220 DATA 136,136,136,136,136,136,32,0,136,136,136,136,168,168,136,0,136,136,136,32,32,136,136,0 10230 DATA 136,136,136,32,32,32,32,0,168,8,8,32,128,128,168,0 10240 DATA 16,84,68,68,84,68,68,0,80,68,68,80,68,68,80,0,84,68,64,64,64,68,84,0 10250 DATA 80,68,68,68,68,68,80,0,84,64,64,84,64,64,84,0,84,64,64,84,64,64,64,0 10260 DATA 84,68,64,69,68,68,84,0,68,68,68,84,68,68,68,0,84,16,16,16,16,16,84,0 10270 DATA 4,4,4,4,68,68,84,0,68,68,68,80,68,68,68,0,64,64,64,64,64,64,84,0 10280 DATA 68,84,84,68,68,68,68,0,68,68,84,84,84,84,68,0,64,68,68,68,68,68,84,0 10290 DATA 80,68,68,80,64,64,64,0,84,68,68,68,68,68,84,5,80,68,68,80,68,68,68,0 10300 DATA 84,68,64,84,4,68,84,0,84,16,16,16,16,16,16,0,68,68,68,68,68,68,84,0 10310 DATA 68,68,68,68,68,68,16,0,68,68,68,68,84,84,68,0,68,68,68,16,16,68,68,0 10320 DATA 68,68,68,16,16,16,16,0,84,4,4,16,64,64,84,0
10 ? "FLASHING TEXT":REM PRECEDING TEXT IN INVERSE
20 POKE 755,1
30 FOR N=1 TO 100:NEXT N
40 POKE 755,2
50 FOR N=1 TO 100:NEXT N
60 GOTO 20
John Anderson is an associate editor for Creative Computing magazine.