Cartridge Slot and Cartridge Formats

Year
1979
Type
Interface
Category
Technical reference — cartridge port, memory windows and banking schemes
Manufacturer
Atari, Inc.
The two cartridge slots of an Atari 800 with an Atari BASIC cartridge in the left slot and a Monkey Wrench II cartridge in the right

Overview

Every 8-bit Atari has a cartridge slot, and much of Atari's own early software — Star Raiders, Atari BASIC, the Assembler Editor — came on cartridge. The slot is a 30-contact edge connector (two rows of 15, 0.1-inch pitch) that gives a cartridge direct access to the address and data buses in three fixed windows. Only the Atari 800 has two slots, labelled LEFT CARTRIDGE (A) and RIGHT CARTRIDGE (B); the 400, every XL and XE model and the XE Game System have just the one, equivalent to the 800's left slot.

Window Address range Selected by
Left cartridge (A) $A000–$BFFF (8 KiB) /S5
Right cartridge (B), or lower half of a 16K cart $8000–$9FFF (8 KiB) /S4
Cartridge control (CCTL) $D500–$D5FF (256 bytes) /CCTL

A cartridge also drives RD4 and RD5, which tell the computer to switch off its own RAM in the matching 8 KiB window; on an XL/XE an 8K cartridge in the slot also replaces the built-in BASIC ROM at $A000. A 16K cartridge simply occupies both $8000 and $BFFF windows from the left slot. Because the left slot can see all three regions while the 800's right slot sees only $8000 and $D5xx, right-slot cartridges were rare: the commercial list includes the ACE-80 and Austin 80 support software for 80-column boards, Eastern House's KISS and Monkey Wrench, Magic Dump, the Block backup device, ICD's R-Time 8 clock (which works in either slot) and a Corvus boot cartridge.

Pinout (left slot)

Pin Signal Pin Signal
1 /S4 select $8000–$9FFF A RD4 (not connected on the 400)
2–5 A3, A2, A1, A0 B Ground
6–11 D4, D5, D2, D1, D0, D6 C–K A4–A9, A12
12 /S5 select $A000–$BFFF L, M D3, D7
13 +5 V N, P A11, A10
14 RD5 (not connected on the 400) R R/W (R/W Early on 400/800/1200XL)
15 /CCTL ($D5xx) S Φ2 clock (RAS timing on 400/800)

The right slot carries the same buses but with Φ2, R/W Late and /S4/RD4 in place of the left-slot selects. There is no reset line on the slot, so a cartridge cannot see the SYSTEM RESET key.

The cartridge header

The OS recognises a cartridge by six bytes at the top of its window ($BFFA–$BFFF for the left slot, $9FFA–$9FFF for the right):

Address Contents
$BFFA–$BFFB Start address (where the OS jumps to run the program)
$BFFC $00 — "cartridge present" (must not be writable RAM)
$BFFD Option byte: bit 0 = boot the disk first; bit 2 = run the cartridge after initialisation; bit 7 = diagnostic cartridge
$BFFE–$BFFF Init address (called with JSR at every power-up and reset; at minimum it should point to an RTS)

A diagnostic cartridge (bit 7 set) takes control before the OS initialises anything. Bit 0 is how a language cartridge such as BASIC lets DOS boot underneath it.

Bank-switched formats

8 KiB windows soon proved too small, so publishers used the $D5xx control area to switch banks of ROM. Each scheme is different, which is why emulators and flash carts need to be told the cartridge type (the .CAR image format stores it in a 16-byte header). Common types:

Type Size How it works
Standard 8K / 16K 8 / 16 KiB No banking
OSS "Super Cartridge" (034M and M091 variants) 16 KiB Used by OSS's Action! and BASIC XL. A fixed 4 KiB bank at $B000; one of three 4 KiB banks at $A000, chosen by accessing $D500–$D50F; one setting switches the whole cartridge off
XEGS / "XE" (Atari) 32, 64, 128 KiB 8 KiB banks; the last bank is fixed at $A000, the bank at $8000 is chosen by writing to $D5xx
"8×8K D50x", Express, Diamond, SpartaDOS X 64 KiB Eight 8 KiB banks at $A000; the bank is selected by accessing a set of $D5xx addresses ($D500, $D570, $D5D0, $D5E0 families respectively); a higher address in the group disables the cartridge
Atrax 128 KiB Sixteen 8 KiB banks; writing a value with bit 7 set disables it
Bounty Bob Strikes Back 40 KiB Unique: two 4 KiB windows at $8000 and $9000 switched by accessing addresses at the top of each window

The OSS design packs 16 KiB of ROM into 8 KiB of address space: the program keeps its core in the fixed bank and swaps the others in as needed, leaving the user more RAM than a plain 16K cartridge would.

Using it today / Known issues & tips

  • Never hot-swap on an XL/XE. The 400 and 800 cut power when the cartridge door is opened; the XL/XE have no door and no interlock. Switch off before inserting or removing.
  • XL cartridge sense. On XL/XE machines RD5 is wired to GTIA's TRIG3 input, and the OS checks it every vertical blank; if a cartridge disappears (or a program overwrites the OS shadow of that value at $3FA), the machine locks up. This is one reason some 400/800 games fail on XLs.
  • False reads switch banks. Indexed instructions such as LDA $D5FF,X and stray display-list DMA can read a $D5xx address by accident and change a bank.
  • Power-up state. Banked cartridges without reset circuitry can start in any bank, so well-made ones put start-up code in every bank.
  • No 5200 cartridges. The 5200 uses a different connector and memory map; its cartridges do not fit or run on the computers.
  • Emulation. Altirra and Atari800 support all the formats above; raw .ROM/.BIN dumps need the type chosen by hand, .CAR files carry it.

Credits