Atari 8-bit Home Computers - Operating System sources

Published: 2015-08-15
Contact: kr0tki@poczta.onet.pl

Atari is a registered trademark of Atari, Inc.

  1. Introduction
  2. History of the Atari OS
    1. 400/800 OS
      1. Operating System 255 (1979-04)
      2. Rev. A (1979-06)
      3. Rev. B (1981-09)
    2. XL OS
      1. AA000000 Rev. 10 (1982-10-26)
      2. AA000001 Rev. 11 (1982-12-23)
      3. BB000000 Rev. 1 (1983-03-11)
      4. BB000001 Rev. 2 (1983-05-10)
      5. BB000002 Rev. 3 (1984-03-23)
      6. BB000002 Rev. 3 (1984-02-22)
      7. BB000002 Rev. 3 (1984-06-08)
      8. BB000002 Rev. 3 (1984-06-21)
      9. Rev. 4 (unknown signature) (1984-07-16)
      10. CC000001 Rev. 4 (1984-09-06)
      11. BB000001 Rev. 3 (1985-03-01)
      12. BB000001 Rev. 4 (1987-05-07)
      13. BB000001 Rev. 59 (1987-07-21)
      14. BB000001 Rev. 59 - enhanced (1987-07-21)
  3. Contents of this archive
    1. orig-src/
    2. ca65-src/
  4. To do
  5. References

Introduction

The purpose of this archive is to:

  1. provide source code for all known (official) versions of the Operating System ROM of the Atari 8-bit home computers,
  2. use the original source listings published by Atari back in the day in the process.

The source files contained in this archive are a result of disassembling ROM images of various revisions of the operating system, combined with the known published source listings. As a result, the sources contain as much of the original comments and structure as possible.

The sources are adapted for the ca65 assembler and can be made into binaries that are identical to the ones found in the Atari computers. Get ca65 at http://www.cc65.org/.

History of the Atari OS

History of the Atari operating system starts together with the Atari 8-bit computers themselves. Designed as both a successor to the Atari VCS console and a worthwhile competitor in the emerging home computer market, the Atari 400/800 computers needed an adequate operating system that would act as an interface between the user and the sophisticated hardware. The OS to fulfill that role was (probably) developed in the period of 1978/79, by the following people:[CURRNT][WLKNSN]

The OS itself initially fitted in 8 KB of ROM space, but it was decided by Atari that it should also include 2 KB Floating Point Package (FPP), originally part of Atari BASIC designed by Shepardson Microsystems. The Atari BASIC was specified as having the size of 10 KB,[WLKNSN] but a cartridge of this size could not be built - the system architecture allows the cartridge size to be either 8 or 16 KB. So the excessive 2 KB of code was designed to be built in the computers along with the OS. The FPP became part of the OS ever since. It was developed by:

The OS evolved together with the computers, receiving a number of new features and fixes through the years. New revisions of the system were built in the successive Atari computer models.

Below is the chronology of all known Atari OS revisions.

400/800 OS

Operating System 255 (1979-04)

This OS revision was produced in only a few thousand pieces. Its differences against the later Rev. A are described in detail in an Atari internal essay titled "All About Cassette Tapes". In there, the revision is dated April 1979.[TAPES]

All differences between this version and the later Rev. A lie in the timings of the tape routines. Specifically:

This revision was not destined for general release, but it apparently reached the market in small numbers, built in the earliest NTSC 400/800 demo units and/or production machines. The aforementioned differences required the user to position the tape in a special way before loading or saving. The instructions on how to do so were described in the "410 Insert" supplement for the Atari 410 Program Recorder,[410INS] and in an article in the December 1981 issue of SoftSide.[ZETT]

Curiously, comments in the sources of the XL revisions of the OS do not mention this revision at all.

This revision's ROM hasn't been dumped - no machine with OS 255 has surfaced yet. Presence of this OS revision can be tested, by entering in BASIC:

PRINT PEEK(65528)

If the result is 255, then you have OS 255 built in.

If you have a unit with Operating System 255, please share your find on the AtariAge forums.

Rev. A (1979-06)

This version was included in Atari 400 and 800 machines produced before November 1981.

Small parts of the source listing of this revision (the OS equates) were included in "Atari Home Computer System Operating System User's Manual", published by Atari, Inc. in 1980.[OSMAN] The full source code was published in "Operating System Source Listing" by Atari, Inc. in August 1981.[OSSRCA] In both texts, as well as in [TAPES], the source is dated as being from June 1979.

Compared to the earlier OS 255 it had revised timings of the tape routines - from now on, they were left unchanged in all later revisions:

The changes are dated 1979-05-30/31 in the sources.

It existed in two variants, one for NTSC computers and one for PAL systems. The difference was in timing coefficients used in tape and keyboard auto-repeat routines.

The OS ROM consists of three ROM chips:

Rev. B (1981-09)

This version was included in Atari 400 and 800 machines manufactured since November 1981; it was also available as an upgrade for machines produced before that date. Developed by Michael P. Mahar and Robert Scott Scheiman,[OSREV4] it "provide[s] a higher level of system performance by improving the operating system peripheral I/O control routines. OS version B eliminates annoying pauses in disk and printer operations that sometimes occurred with OS version A." [MOORE]

Source listing of this revision (without the character set and the floating point package) was published in "Operating System Source Listing" by Atari, Inc. in 1982,[OSSRCB] both separately and as part of "Atari Home Computer System Technical Reference Notes".[REFNOT] In the text, the source is dated as being from September (presumably 1981).

Although the source contains conditional code to assemble different versions of the OS for NTSC and PAL, no unit containing a PAL rev. B OS has surfaced yet. It is suspected that PAL rev. B was never shipped - this assumption is based on the following facts:

However, PAL Rev. B is referenced in Section 6.0 of the "Atari XL Addendum" supplement, where a procedure for detection of OS revision (including PAL Rev. B) is described.[XLADD] Therefore it is possible that this revision was in fact produced in prototype form.

The OS ROM consists of three ROM chips:

XL OS

After Rev. B the OS underwent a major redesign as part of the Sweet 16 project. The new computer and its OS was "designed for ease, simplicity and friendliness of setup and use, while offering both the power and sophistication of a home computer."[S16OS] The OS expanded into 16 KB of ROM space including the FPP. A certain area in the ROM was reserved to store OS ROM signature: Part number, Revision number, and Revision date.

AA000000 Rev. 10 (1982-10-26)

This version was included in the first Atari 1200XL computers. It was developed by:[OSREV4]

Compared to the previous version, it contained many enhancements and new features, such as:

and more. The changes are described in detail in the Atari XL Addendum for the Technical Reference Notes.[XLADD]

Gone were the separate versions for NTSC and PAL - there was now a single universal binary that detected the TV system at runtime and adjusted the keyboard delays and tape timings accordingly.

The Self Test contains an easter egg - when running All Tests, during the Keyboard test the screen keyboard types out the developer's name: "Michael Colburn".

Due to the multitude of differences, the new XL OS was not 100% compatible with the earlier versions. Software that made illegal calls to OS procedures ceased to function. To make that software work again, Atari later released The Translator disk (DX5063 NTSC version and FK100807 PAL version), which switched the built-in OS off and replaced it with a (slightly modified) 400/800 rev. B system.

The OS ROM consists of two ROM chips:

This revision is called "rev. A" in the "Atari 1200XL Field Service Manual" [1200FS] (see Tech Tip 18A) and in the Best Electronics catalogue.

AA000001 Rev. 11 (1982-12-23)

A later version for the Atari 1200XL computers, it was developed by Robert Scott Scheiman.[OSREV4] It fixed several problems of the previous revision, and improved compatibility with programs designed for the 400/800. The most noticeable difference is in the power-up display - in rev. 11 an ® mark was added to the Atari logo.

The OS ROM consists of two ROM chips:

This revision is called "rev. B" in the "Atari 1200XL Field Service Manual" [1200FS] (see Tech Tip 18A) and in the Best Electronics catalogue. In the Ape Warp+ OS 32-in-1 upgrade, it is mislabelled as "1200XL (REV 5)".[AAGE1][AAGE2]

As indicated by Tech Tip 18A of the Atari 1200XL Field Service Manual, this OS revision was installed in some 1200XLs while being repaired in authorised service centres. However it is not known whether it was also mounted in new 1200XL units. In any case, rev. 11 is quite rare - so far only two examples of a 1200XL with this OS version have been reported.[AAGE1][AAGE2

BB000000 Rev. 1 (1983-03-11)

This version was included in all Atari 600XL and early 800XL machines. It was developed by Robert Scott Scheiman, Richard K. Nordin and Y. M. (Amy) Chen.[OSREV4] It removed the Atari logo screen, support for the J1 jumper and added support for PBI and on-board BASIC, and some minor fixes.

The OS ROM consists of one ROM chip:

BB000001 Rev. 2 (1983-05-10)

This version was included in most of the Atari 800XL units, including all of the European 800XLF machines, and also in most 65XE/130XE computers. Developed by Robert Scott Scheiman,[OSREV4] it contained several bugfixes; also, the source code was reedited - mainly by adding comments - by Richard K. Nordin to "bring it closer to the coding standard".[OSREV4]

Compared to rev. 1, the most visible differences are:

This version is by far the most popular, as it was built not only in most of the 800XLs, but also in most of the XE units. This seems strange as the later version BB000001 Rev. 3, dedicated for the 130XE, was ready before the 130XE was shipped (indicated by the timestamp in the OS signature). It is however possible that the Tramiels decided to initially mount rev. 2 OS in the XEs in order to liquidate the remaning backstock of parts inherited from Atari, Inc. (which was a company known for greatly overstocking their components), and started installing rev. 3 only after the rev. 2 backstock has drained.

Source listing of this revision was published by Atari, Inc. in 1984, as part of the XL Addendum.[XLADD]

The OS ROM consists of one ROM chip:

BB000002 Rev. 3 (1984-03-23)

Dated 1984-03-27 in the source comments.[OSREV4]

This version was developed for the 600XL/800XL/1450XLD computers, but it never reached the market. It was found in a surviving 1450XLD machine. It can be found on the Internet under the filename 1540OS3.v0 or 1450R3V0.ROM.

It was developed by Richard K. Nordin and contained several bugfixes:

"Fix MAXDEV, problems resulting from CRASS65 version,
initial address for RAM sizing, "Boot Error" message,
initial address for cartridge equivalence checksum,
mishandling of SIO NAK, initializing of CHKSUM, and
initialization of PORTB."[OSREV4]

The most visible differences between this and rev. 2 are:

BB000002 Rev. 3 (1984-02-22)

Called "Revision 3, Version 2" in the source comments; the date given there is, quite mysteriously, earlier than that of the original Rev. 3.[OSREV4]

This was a further enhancement for the 600XL/800XL/1450XLD computers, which also never reached the market. It was developed by Olivia Ying-Tzu Jang and Vincent H. Wu, and mainly included enhancements for the PBI routines, probably to support the 1450XLD's built-in modem, voice synthesis and disk drive:

"Dedicate PDVI ($D1FF) to external parallel device IRQ status
Dedicate IPDVI ($D1CF) to internal parallel device IRQ status
Using PDIMSK ($0249) for external parallel device IRQ selection mask
Using IPDIMK ($0254) for internal parallel device IRQ selection mask
After masking (PDVI, PDIMSK) & (IPDVI, IPDIMK), OR the result
together, piror to processing parallel device IRQ

On cold start, initialize PDVI = 0, to avoid potential
checksum error."[OSREV4]

No machine with this OS version has been found yet.

BB000002 Rev. 3 (1984-06-08)

Called "Revision 3, Version 3" in the source comments.[OSREV4]

This is another OS enhancement for the 600XL/800XL/1450XLD, which was never marketed. Developed by Mike Barall, it included the following changes:

"Dedicate the 11 bytes at ACMVAR ($3ED-$3F7) for use as
a RESET routine area. On warmstart, the OS will JSR
to ACMVAR immediately after initializing hardware." [OSREV4]

No machine with this OS version has been found yet.

BB000002 Rev. 3 (1984-06-21)

Called "Revision 3, Version 4" in the source comments.[OSREV4]

This is yet another revision for the 600XL/800XL/1450XLD that didn't reach the market. It was found in a surviving 1450XLD machine, and can be found on the Internet under the filename 1450R3VX.ROM.

It was developed by Mike Barall and contained the following update:
"Make CIO accept device number 0 (like Rev B did)." [OSREV4]

Rev. 4 (unknown signature) (1984-07-16)

Called "Revision 4, Version 0" in the source comments.[OSREV4]

Another revision for the 600XL/800XL/1450XLD that did not go to production. Development of this one continued even after Jack Tramiel bought the Consumer division of Atari, Inc. from Warner. It was developed by Mike Barall and contained the following changes:

"Add support for SIO fast mode (38400 baud).
Add resident Help Text Viewer.
Remove Peripheral Handler Loading Facility."[OSREV4]

No machine with this OS version has been found yet.

CC000001 Rev. 4 (1984-09-06)

Called "Revision 5, Version 0" and dated 1984-09-04 in the source comments.[OSREV4]

The last known version of the OS before the Tramiels shut the development down and reverted the OS back to rev. 2, it was designed for the 800XL/800XLF/900XLF/900XLFK models. It was developed by Mike Barall and Vincent H. Wu, and contained the following changes:

"Revert to Rev. B device handlers (E:, C:, P:, S:, K:),
(with bug fixes) to eliminate need for Translator.
Remove parallel I/O support.
Fix keyboard display in self-test."[OSREV4]

Although the device handlers were reverted to 400/800 rev. B, the new XL features (such as graphics modes 12-15 and adjustable key repeat rates) are patched in so they are still available.

Compared to the previous revision, the most visible differences are:

No machine with this OS version has been found yet, but its source listing surfaced in 2005.[OSREV4]

BB000001 Rev. 3 (1985-03-01)

Soon after the Tramiel buyout, development of the new OS versions was halted. The changes introduced in the prototype revisions starting from BB000002 Rev. 3 were discarded, and the next OS version, designed for the 130XE, was instead based on BB000001 Rev. 2.

This version was included in the later 65XE and 130XE computers, and also in (probably) all 800XE units. As stated previously, it reached the market quite late, probably even after the XEGS shipped (which had rev. 4 built in).

Compared to rev. 2, this OS version contains a bugfix in CHKSUM initialisation (previously fixed in the prototype BB000002 Rev. 3 (1984-03-23)), and the following changes in Self Test:

The OS ROM consists of one ROM chip:

BB000001 Rev. 4 (1987-05-07)

This version was built in all Atari XE Game System units. It was based on BB000001 Rev. 3 and contains the following changes:

The OS ROM consists of one ROM chip, which also contains Atari BASIC rev. C and the Missile Command game (slightly modified from the cartridge version):

BB000001 Rev. 59 (1987-07-21)

This version was included in most Arabic 65XE units, sold under the brand "Najm" in Egypt and possibly other Arabic contries. It was based on BB000001 Rev. 3 and contains the following changes:

It is sometimes called rev. 3B (59 dec = 3B hex).

The OS ROM consists of one ROM chip:

BB000001 Rev. 59 - enhanced (1987-07-21)

This version is more rare - it was found in two Arabic 65XE so far. One is a production machine,[AAGE3] the other was bought by Kevin Savetz in 1999.[ARABIC] The latter unit is believed to be prototype, since it is an NTSC model (rather than PAL like all Arabic 65XE sold in Egypt).

Compared to the original Arabic Rev. 59, it contains more enhancements in the screen editor, including switching between character sets with Shift+Help and moving the screen contents between left-to-right and right-to-left layouts with Control+Caps.

(The ROM hosted on [ARABIC] is broken, but the correct one can be found at [OFFENG].)

Contents of this archive

Here are the details of the archive's contents:

orig-src/

This directory contains source listings of all known OS versions. As much as possible, these files incorporate all of the structure and comments found in the original source listings published by Atari.

800a-equates.asm

This is the listing of the 400/800 OS rev. A equates, originally published in print by Atari,[OSMAN] and then converted back to digital form. It does not contain the full source code, and is provided here for reference only.

The printout contains only first 72 columns of the original source file. Where possible, truncated text was restored from orig-src/800b.asm.

800a.asm

This is the source listing of the 400/800 OS rev. A, originally published in print by Atari,[OSSRCA] and then converted back to digital form. Most of the contents are identical to orig-src/800b.asm.

The printout contains only first 72 columns of the original source file. Where possible, truncated text was restored from orig-src/cc1r4.asm (which contains Rev. B device handlers) and from [OSMAN].

800b.asm

This is the source listing of the 400/800 OS rev. B, originally published in print by Atari,[OSSRCB] and then converted back to digital form. The file included is based on the conversion by Bruce Tomlin,[TOMLIN] but with additional typos fixed.

The printout contains only first 72 columns of the original source file. Where possible, truncated text was restored from orig-src/cc1r4.asm (which contains Rev. B device handlers) and from [OSMAN].

bb1r2.asm

This is the source listing of the XL OS BB000001 rev. 2, originally published in print by Atari in 1984,[XLADD] and then converted back to digital form.

The printout contains only first 60 columns of the original source file. Where possible, truncated text was restored from the CC000001 rev. 4 source.

bb0r1.asm

This is the source listing of the XL OS BB000000 rev. 1. It was created by comparing ROM binaries of BB000001 rev. 2 and BB000000 rev. 1, and applying the differences to rev. 2 sources from orig-src/bb1r2.asm.

aa1r11.asm

This is the source listing of the XL OS AA000001 rev. 11. It was created by comparing ROM binaries of BB000000 rev. 1 and AA000001 rev. 11, and applying the differences to rev. 1 sources from orig-src/bb0r1.asm. Source of the rainbow boot screen is based in part on the sources published by Curt Vendel at [RAINBW] (Curt's sources are of a later revision of the screen, never included in any OS revision).

aa0r10.asm

This is the source listing of the XL OS AA000000 rev. 10. It was created by comparing ROM binaries of AA000001 rev. 11 and AA000000 rev. 10, and applying the differences to rev. 11 sources from orig-src/aa1r11.asm.

bb2r3.asm

This is the source listing of the XL OS BB000002 rev. 3. It was created by comparing ROM binaries of BB000001 rev. 2 and BB000002 rev. 3, and applying the differences to rev. 2 sources from orig-src/bb1r2.asm.

bb2r3v4.asm

This is the source listing of the XL OS BB000002 rev. 3 ver. 4. It was created by comparing ROM binaries of BB000002 rev. 3 and BB000002 rev. 3 ver. 4, and applying the differences to rev. 3 sources from orig-src/bb2r3.asm.

cc1r4.asm

This is the source listing of the XL OS CC000001 rev. 4 as published by Curt Vendel.[OSREV4]

bb1r3.asm

This is the source listing of the XL OS BB000001 rev. 3. It was created by comparing ROM binaries of BB000001 rev. 2 and BB000001 rev. 3, and applying the differences to rev. 2 sources from orig-src/bb1r2.asm.

bb1r4.asm

This is the source listing of the XL OS BB000001 rev. 4. It was created by comparing ROM binaries of BB000001 rev. 3 and BB000001 rev. 4, and applying the differences to rev. 3 sources from orig-src/bb1r3.asm.

bb1r59.asm

This is the source listing of the XL OS BB000001 rev. 59. It was created by comparing ROM binaries of BB000001 rev. 3 and BB000001 rev. 59, and applying the differences to rev. 3 sources from orig-src/bb1r3.asm.

New source code in this revision has not yet been fully understood and commented.

bb1r59a.asm

This is the source listing of the enhanced version of XL OS BB000001 rev. 59. It was created by comparing ROM binaries of BB000001 rev. 59 and enhanced BB000001 rev. 59, and applying the differences to rev. 59 sources from orig-src/bb1r59.asm.

New source code in this revision has not yet been fully understood and commented.

ca65-src/

This directory contains the same source files as in orig-src, but with syntax modified to allow assembling with ca65. The included Makefile allows to create binaries of all ROM revisions at once, by typing

make

In order to make it work, you will need:

To do

References