DIY XL/XE Memory Expansion (256K to 1MB via PORTB)
- Year
- 1985
- Type
- DIY project
- Category
- Internal banked memory upgrade
- Manufacturer
- Homebrew designs (Claus Buchholz; Guy Ferrante 'Atari8man' and others)
Overview
The 130XE fixed the standard for extra memory on Atari's later machines: 16 KB banks that appear in the window $4000–$7FFF, chosen by bits of the PIA's PORTB register at $D301 (54017). Every do-it-yourself upgrade beyond 64 KB, and most commercial ones, follows that model and simply borrows more PORTB bits to select more banks. Understanding which bits a given upgrade takes is the key to understanding its compatibility.
How PORTB banking works
On XL/XE machines PORTB isn't a joystick port. It controls the memory map:
| PORTB bit | Stock function |
|---|---|
| 0 | OS ROM on/off (RAM under the OS) |
| 1 | BASIC on/off |
| 2–3 | 130XE: select one of four 16K banks |
| 4 | 130XE: CPU sees extended bank (0) or main RAM (1) |
| 5 | 130XE: ANTIC sees extended bank (0) or main RAM (1) |
| 7 | Self-test ROM on/off |
On the 1200XL these lines drove LEDs and other functions. The 800XL left five of them unused, and the 130XE put four to work. Because the CPU (bit 4) and ANTIC (bit 5) can be switched separately, the 130XE has "true ANTIC banking": the display can come from one bank while the program works in another.
Bigger upgrades need more select bits. A 256K machine needs 16 banks, so four select bits. Typical designs take bit 5 away from ANTIC, which makes ANTIC follow the CPU. Beyond that, the extra bits come from bit 6, then bit 7 (losing self-test), bit 1 (losing built-in BASIC) or even bit 0 (losing RAM under the OS). Antic's November 1988 memory survey summed up the cost for 130XE upgrades to 320K, 576K and 1088K: with 576K "you lose the self-test routine (no big deal)", and further bits cost you BASIC.
Landmark DIY designs
- "The Quarter-Meg Atari 800XL" by Claus Buchholz (BYTE, September 1985). Designed before the 130XE appeared, it used eight 32 KB banks at
$0000–$7FFF, selected by PORTB bits 4–6. Later XL upgrades such as ICD's RAMBO XL instead adopted the 130XE-style 16K window, setting the RAM up as a 64K main bank plus twelve 16K extended banks. - Public-domain 320K/576K/1088K XE upgrades, sold commercially as well by Magna Systems in the late 1980s.
- "The 512K XL upgrade that works", rev. 2.b, by Guy Ferrante ("Atari8man"), November 2002, with help from Jeff Worley (Technoid Mutant) and Shannon Robbinson (Doctor Death). It starts from a working 256K RAMBO-style or Buchholz XL.
Building the 512K XL (outline)
Parts: eight more 256K DRAMs (150 ns or better), one 74LS139, one 33 Ω resistor, and wire-wrap wire.
- Test the new DRAMs in the existing sockets first. Then bend out and clip pin 15 on eight of them and piggy-back them onto the original eight, soldering all the other pins together. Daisy-chain the bent pin-15s with hook-up wire, so each stacked pair shares every signal except pin 15, which the new decoder drives separately.
- Prepare the 74LS139 dead-bug style: bend out all pins except 8 and 16, jumper 15 to 8 and 3 to 10, and fit the 33 Ω resistor to pin 7.
- On the PIA (U23, C014795), bend up pin 17. Lift the inner end of R108, the 33 Ω resistor feeding pin 15 of the lower RAM bank (check with a meter).
- Power the '139 from any 16-pin chip (U28 works), then wire it as described: pin 1 to the R108 pad, pin 5 to the lifted R108 lead, pin 7 (through the resistor) to the top-row pin-15 chain, pin 11 to the MMU (U3, C061618) pin 6, pin 13 to PIA pin 17, and pins 14 and 2 to pins 14 and 2 of the RAMBO 74LS153.
- Test, then hot-glue the wires down.
Result: 512 KB with a 448 KB RAM disk, and Ferrante says it is more 130XE-compatible than a stock RAMBO. As a bonus, the RAMBO's notorious need to wait about ten seconds between power-off and power-on is gone. In MyDOS 4.5, choose option O, answer "Ramdisk present? Y", type X (XE), and accept the default 448K configuration. SpartaDOS 3.x and MyDOS use it all. SpartaDOS X recognised 320K at the time. The extended banks are the PORTB values $EF $EB $E7 $E3 $CF … $23 (bits 2–7 used). Don't build it on a Wiztronics 256K board: it works, but adds a lot of RF interference on screen.
Tips for any banked upgrade
- Use the best DRAMs you can find. Antic's 1988 survey reported memory dropouts with some public-domain designs because of weak refresh circuits.
- Know which PORTB bits you've given up. A program that writes PORTB without masking can crash an upgraded machine or switch off BASIC unexpectedly.
- For everyday use, software that expects a 130XE (BASIC XE, The Newsroom, RAM disks) wants the 130XE bit layout. Upgrades that keep separate ANTIC banking are the most compatible.
- If you'd rather not solder, modern boards such as the Ultimate 1MB do the same job with far fewer wires.
Credits
- Picture: An Atari 800XL motherboard, the usual base for 256K-1MB upgrades. — Multicherry, Wikimedia Commons (CC BY-SA 4.0)
- comp.sys.atari.8bit FAQ, sections 1.14 and 6.12 (Michael Current, Feb 2026) — Michael Current (comp.sys.atari.8bit FAQ), 2026
- Lee Brilliant — Dr. Brilliant's Incredible Atari Brain Transplants, Antic v7n7 (Nov 1988) — AtariMagazines.com (Kevin Savetz), 1988
