Atari Operating System ROM (400/800 OS and XL OS)
- Year
- 1979
- Type
- Component
- Category
- System firmware (ROM)
- Manufacturer
- Atari, Inc. / Atari Corp.
- Tags
- atari-inc, atari-corp, rom, operating-system, xl-os, cio, fpp, revisions
- Related
- Altirra, XL/XE Self Test
Overview
Every 8-bit Atari carries its operating system in ROM, available the instant the machine is switched on. The OS is not a disk operating system — DOS is loaded separately — but a resident layer that sets up memory, boots cartridges, cassettes and disks, handles interrupts, and provides a device-independent input/output system through which BASIC and most programs talk to the screen (E:, S:), keyboard (K:), printer (P:), cassette (C:) and disk (D:). Its main parts, as described in De Re Atari:
- Monitor — cold- and warm-start code that initialises memory and I/O, sets up vectors and boots from cassette or disk.
- Interrupt handlers — IRQ and NMI processing for keyboard, BREAK, serial I/O, timers and vertical blank.
- System vectors — documented entry points so programs can call or replace OS routines.
- I/O subsystem (CIO and SIO) — layered device handlers, extensible by programs; a full cassette handler but only a rudimentary disk handler.
- Real-time timers, the ROM character set (ATASCII), and the Floating Point Package (FPP) — BCD maths written by Shepardson Microsystems for Atari BASIC but placed in the OS ROM so every program could use it.
Versions
| Family | ROM size | Revisions (shipped) | Machines |
|---|---|---|---|
| 400/800 OS | 10 KiB at $D800–$FFFF (incl. 2K FPP) | "OS 255" (1979 pre-production, very rare); Rev. A NTSC/PAL (June 1979); Rev. B NTSC (Sept 1981) | 400, 800 (via CX801 Personality Module) |
| XL OS | 16 KiB ($C000–$CFFF, $D800–$FFFF, plus 2K Self Test mapped at $5000) | Rev. A ("10", Oct 1982) and Rev. B ("11", Dec 1982) — 1200XL; Rev. 1 (Mar 1983) and Rev. 2 (May 1983) — 600XL/800XL/most XE; Rev. 3 (Mar 1985) — late 65XE/130XE, 800XE; Rev. 4 (May 1987) — XEGS; Rev. 3B (1987–88) — Arabic 65XE Najm | 1200XL, 600XL, 800XL, 65XE, 130XE, 800XE, XEGS |
The 400/800 OS was written by David Crane, Alan Miller and Larry Kaplan, with Harry Stewart documenting and contributing design, Gary Palmer on I/O, Ian Shepard on disk functions and Scott Scheiman on ATASCII; Rev. B fixes came from Michael Mahar and Scheiman. The XL OS built on it: Rev. A added the 1200XL features (relocating handler loader, international character set, Self Test, fine-scrolling text), Rev. 1 added Parallel Bus Interface and built-in BASIC support, Rev. 3 updated Self Test for the XE line, and Rev. 4 added the XEGS detachable keyboard and built-in game. Antic's 1983 preview listed new XL features such as a redefinable keyboard, adjustable key-repeat, OS support for ANTIC modes 4, 5, 12 and 14 as extra GRAPHICS modes, and printer device numbers for up to eight printers.
Identifying your OS
In Atari BASIC:
10 IF PEEK(64728)=76 THEN PRINT "XL OS REV.";PEEK(65527):END
20 PRINT "400/800 OS: ";PEEK(65528);" ";PEEK(65529)
PEEK(64728) returns 76 on an XL OS and 162 on a 400/800 OS. For the 400/800 OS, the byte pair at 65528/65529 is 221/87 for Rev. A NTSC, 214/87 for Rev. A PAL and 243/230 for Rev. B NTSC. On XL OSes, location 65527 gives the revision (10, 11, 1, 2, 3, 4, or 59 for Rev. 3B).
Compatibility issues
The XL OS was designed to be backward compatible, but programs that ignored the documented vectors broke. The common causes were: a shortened page-3 printer buffer whose freed bytes now hold XL variables (including the cartridge-sense shadow at $3FA, which hangs the OS if overwritten), writes to $3F8 that re-enable BASIC on reset, PIA initialisation that switches off the OS ROM, and direct jumps into old ROM addresses. Atari's answer was the Translator disk (NTSC version with Rev. B, PAL with Rev. A), which copies the 400/800 OS into the RAM under the XL ROM. Conversely, XL-only software may use the RAM under the ROMs, PORTB banking, XL-only vectors or the international character set.
Using it today / tips
- Swapping OSes. On an 800 the OS lives on a plug-in board, and third-party personality boards could hold two OS sets. On XL/XE machines the ROM chip is on the motherboard; many replacement and multi-OS ROM products exist (see the third-party entries).
- Source code. Atari published 400/800 OS source listings (Rev. A in 1981, Rev. B in 1982). Tomasz Krasuski later published reconstructed source for all known shipped and prototype revisions.
- Emulators need OS ROM images; Altirra also includes its own replacement OS (AltirraOS) for when you have no ROM dump.
Credits
- Picture: The Atari 800's 10K ROM personality module, which holds the 400/800 OS. — Evan-Amos, via Wikimedia Commons (Public domain)
- comp.sys.atari.8bit FAQ (Michael Current) — sections 1.4, 1.14, 6.13, 7.1.1, 7.1.7, 7.1.9 — Michael Current (comp.sys.atari.8bit FAQ)
- Antic Vol. 1 No. 6 (Feb 1983) — Inside Atari: Atari 1200XL (new OS features) — AtariMagazines.com (Kevin Savetz), 1983
- Altirra emulator home page and change log (AltirraOS) — Screenshot from Avery Lee's Altirra page, virtualdub.org
