Classic Computer Magazine Archive ATARI CLASSICS Volume 2, Issue 2 / April 1993 / PAGE 21

moonlight workMOONliGhT WORkSHOp
JEff McWilliAMS, AC STAff COlUMNiST

THE XL/XE GUidE TO EXpANdEd MEMORy


Most Popular Upgrade?
    What do you suppose are the two most popular upgrades we 8-bit users purchase these days? Most likely a higher capacity floppy or hard drive is one, and a memory upgrade is the other. That shouldn't surprise anyone; trends in our community often follow trends in the PC world, and everybody knows that for PC users the more RAM and storage space you have, the better. While 8-bit power users can look to 256 or 512K memory upgrades, and 20 megabyte hard drives, PC users are looking at 416 megabytes of memory and hundreds of megs of hard drive space.
    Back when I purchased by first 800XL, the 64K of RAM that it contained was more than enough for me. At that time there weren't more than a few programs that used more than 64K on an upgraded 800. People happily used programs like AtariWriter and Visicalc with 90K or 180K floppy drives and seldom complained. But as time passed, people's needs and wants have changed. We saw the sophisticated new software coming onto the PC market and wanted similar features in programs for our trusty 8-bits. I don't think we ever expect to run AutoCAD or Word for Windows; programs like that require massive amounts amounts of memory and CPU horsepower. What we did want were programs like Paperclip: a word processor supporting expanded memory, memory resident spell checker, indexes, tables of contents, and lots of other bells and whistles.
    At the same time we were lusting after a new generation of applications, RAM chips became really affordable. Even tightfisted 8-bitters could afford the price of 256K DRAMS. It was a natural course of evolution for memory upgrades to become popular so that more sophisticated programs could be written to use all that RAM.

RAM Limit: A Sticky Wicket
    There's a small technical problem however. While the Intel microprocessor in a PC accesses upwards of 640K of RAM, the 6502 microprocessor in our Ataris can only access 64K. This isn't due to faulty engineering at Atari. In 1979 when the 800 came out, the 6502 gave the most bang for the buck. The Intel based PC came out later and used a newer CPU that supported more RAM and could be expanded as the need arose. Meanwhile, 8-bit Atari computers were already operating with the maximum memory a 6502 could handle. It would be easier to squeeze water from a stone than get a 6502 to access more than 64K of RAM. What was to be done? How would the hardware people meet the user community's insatiable desire for MORE RAM?
    If you've been an 8-bit user for any length of time, you know us die-hards never say never. I like to think that nothing is impossible on an 8-bit, it's just more challenging. Such was the case with breaking the 64K memory barrier. Once they put their mind to it, entrepreneurial hardware hackers solved the memory problem and started churning out 256K RAM upgrades left and right. By about 1986 or so, everyone and their brother seemed to be either buying their own memory upgrade or installing one for somebody else. I remember reading how one guy took his 800XL to a computer show and had 256K installed while he waited. Now that's what I call service! Then Atari Corp. wised up and put out an expanded RAM machine, the 130XE with 128K. Its method of expanded RAM set the standard of compatibility for all the homebrew upgrades on the market.

More RAM Than Ever
    So here we are today, with RAM upgrades as popular as ever. Not as many companies sell them, though- a reflection of the shrinking 8-bit community, and not a decreasing need for more memory. If we ever hope to make further progress, to write 24-pin printer versions of Daisy Dot III or high resolution Schematic and generic CAD applications, we'll need nice big memory upgrades for them to be useable. This translates to a continued demand for RAM upgrades. Despite the 8-bit glory days having passed into the sunset, there are more programs than ever that utilize expanded RAM in some way.
    Although RAM upgrades are an old idea, I still get bombarded with questions from people seeking information about them. Not all Atari users are seasoned veterans. Our community is still acquiring new users, people picking up used equipment at garage sales or inheriting it from other family members. This is a good time to thoroughly explore memory upgrades, how they're done, and what software is out there to use the RAM once you've got it. So read on! This is an enormous topic, and it might take me several installments to cover the salient points. I hope to start a regularly updated database of various expanded RAM applications to provide information I may miss the first time around. I'll need your help on that, so if you know of a program or utility that uses expanded RAM, please write to me c/o AC.!

Understanding Banked RAM
    Visualize memory in your mind's eye as a long vertical strip of paper with one piece of data being written per line on the strip. The paper has a finite width and length. Each line on the strip is numbered. If the first line is numbered 0 and the last is numbered 65535, then you can store 65536 numbers on the paper (or 64K in computerese). What happens if you want to store more than 64K? You can't make the strip of paper longer because you're limited by the design of the microprocessor.
64K RAM    Now suppose you make a horizontal strip of paper you can pass through one section of the vertical strip. By sliding the horizontal strip of paper left or right, a certain portion of the horizontal strip will become part of the vertical one. (See diagram below.) In this way, you would get more surface area of paper to store numbers on. Or in our case, more accessible memory. In essence, this is how memory upgrades for the Atari 8-bit work. There's a memory location called Port B located at 54017 (or $D301 in hexadecimal notation.) By writing a number to this port, a chip inside the computer will set some of its pins to high or low voltage levels. When these pins are wired up to additional circuitry, specifically a RAM upgrade, they control the "sliding" left or right of the horizontal strip of paper.
    The horizontal strip slices through the vertical one starting at location 16384 and ending at 32767. Thus the horizontal strip is 16K bytes tall. As you slide the horizontal strip left or right, 16K of data from the horizontal strip appears as part of the vertical strip and represents the memory "seen" by the microprocessor. The 16K area the horizontal strip moves through is sometimes called a window. Each time you slide the horizontal strip of paper left or right a new piece of the horizontal strip, 16K large, appears in the window. These 16K pieces are called banks. This is why this memory upgrade method is called banked RAM.
    On the 130XE, there are five programmable settings at the $D301 location. These settings correspond to which bank of RAM appears in that 16K window. You can have one of four external banks appear, or no bank appear. No bank would mean the original piece of the vertical strip resides in the 16K window. The 64K from the vertical strip plus the four 16K expanded banks equals 128K of RAM.

Homebrews: With or Without ANTIC
    The first major memory upgrade for the XL/XE machines was "The Quarter Meg 800XL" by Claus Bucholz. It appeared in the September 1985 issue of BYTE magazine, and it gave XL owners 256K of RAM. Claus had actually completed the design in December of 1984. His original design differed from the 130XE; it used 32K banks instead of 16K banks. Once the 130XE was released in early 1985, Claus promptly modified his design for compatibility with Atari's expanded memory design. Under this final standardized design, you divide up the 256K total RAM into 192K of external RAM (twelve 16K banks on the horizontal strip) plus the original 64K of RAM on the vertical strip in our paper strip model.
Banked RAM    Claus' revised 256K upgrade works pretty much like the 130XE, but there's still one slight difference between the two. Like many other commercial and public domain memory upgrades created since then, the Bucholz upgrade doesn't fully support ANTIC banking. Oh gosh, what's that? ANTIC banking is a special mode that determines whether or not the video processor (ANTIC chip) also sees the expanded memory. ANTIC banking to date is used in only a few programs. Trying to explain ANTIC banking will make things needlessly complicated for you beginners. It's an issue that can be ignored in 95% of the situations where expanded memory is used. I'll come around to the concept of ANTIC banking again in a future installment, but for now I'm content to leave you with an awareness of its existence.

RAM To The Max
    Just how big an upgrade can you put in the computer? At present, the main limitation is the number of free bits in the Port B register at $D301. For x number of bits you have free in that register, you can get 2^x number of banks. There's an upgrade kit from Newell Industries that manages to take advantage of 6 of the bits in Port B. That yields 1024K of expanded memory; this is the upgrade I have in my 800XL. That's enough to satisfy even a hardcore power user like me! (Well, at least for a little while.) I'd like to experiment with adding a 4096K SIMM module to my 1200XL <grin!>, which for all practical purposes is the outer limit of expanded RAM in our machines. Even 1024K is pushing the limits of the Port B register. With the Newell 1-meg upgrade installed, you lose software control of the internal BASIC ROM chip plus a few other things you have to watch out for. Right now I just want you to get a good grasp of the fundamentals of how expanded RAM works so we can begin surveying applications that will use all that delicious extra memory.
    If you can go through the information above and come out with a good idea of what's going on inside an expanded computer, you've got what it takes to move on. This is all the average user needs to know about HOW the memory upgrades work. The most important thing to remember is that the extra RAM is limited to appearing in 16K banks starting at $4000. This is important because it can affect how the expanded memory is used by various software applications. We'll explore this next time and start our expanded memory software survey beginning with word processors. Until then, if you still have difficulty understanding banked RAM, make your own vertical strip/horizontal strip model like the one in the diagram. (If someone asks, say it's a craft project for your child!) See yah next time!