# Atari TOS

TOS (The Operating System) is the operating system of the Atari ST range of computers. This range includes the 520ST and 1040ST, their STF/M/FM and STE variants and the Mega ST/STE. Later, 32-bit machines (TT, Falcon030) were developed using a new version of TOS, called MultiTOS, which allowed multitasking. More recently, users have further developed TOS into FreeMiNT.

## Details

Atari TOS (The Operating System) debuted with the Atari 520ST in 1985. TOS combines Digital Research's GEM GUI running on top of the DOS-like GEMDOS. Features include a flat memory model, DOS-compatible disk format (starting with TOS 1.04), support for MIDI, and a variant of SCSI called ACSI in later versions. Atari's TOS is usually run from ROM chips contained in the computer: Thus, before local hard drives were available in home computers, it was an almost instant-running OS. TOS booted off floppy disks in the very first STs, but only about half a year after the ST was introduced, all ST models started shipping with the latest version of TOS in ROM.
TOS consisted of the following:
* Desktop – The main interface loaded after bootup.
* GEM – Graphics Environment Manager, licensed from Digital Research
** AES – Application Environment Services
** VDI – Virtual Device Interface (screen drivers only, other drivers loaded using GDOS)
* GEMDOS – GEM Disk Operating System
* BIOS – Basic Input/Output System
* XBIOS – Extended BIOS
* Line-A – Low-level high-speed graphics calls. Obsolete from TOS 3 onwards.
The following were extensions to TOS (loaded separately):
* GDOS – Graphics Device Operating System
* AHDI – Atari Hard Disk Interface (hard disk driver)
True multitasking was not directly supported, but TOS allowed up to six Desk accessories to be loaded into the system. MultiTOS was developed to allow TOS to preemptively multitask.

### Desktop

The TOS desktop uses icons to represent files and devices, windows and dialog boxes to display info. The desktop file "DESKTOP.INF" was read to determine window settings, icon placements and drive icons, otherwise the standard default desktop of two floppy icons and the trash icon was used.
Later versions use "NEWDESK.INF" for saving and reading the desktop configuration.
Executable files are identified by their extensions:
* *.ACC – Desktop accessory. Automatically loaded.
* *.APP – Application (rarely encountered).
* *.PRG – Executable program. Can be GEM programs.
* *.TOS – "TOS" program that doesn't use GEM — i.e., similar to a PC's .EXE or .COM running in a CLI-mode box. The desktop clears the screen, turns on the text cursor, and hides the mouse pointer.
* *.TTP – "TOS takes parameters". This opens a dialog box where arguments can be added for the program. It converts characters to uppercase.
* *.GTP – "GEM takes parameters". This opens a dialog box where arguments can be added for the program. It converts characters to uppercase.
TOS programs (but not GEM programs) can auto boot by placing them in a folder named "AUTO". TOS 1.4 allows GEM programs to be set to load automatically from the "Install Application" dialog. Programs with *.TTP extensions and environments can not be used for auto boot. Desktop accessories were placed in the root directory of the default drive and loaded automatically.

## File system

Atari TOS is based on GEMDOS which uses a modified FAT12 (or, on hard disks, FAT16) file system. The major differences are the fact that the boot sector does not need to contain the IBM compatible jump sequence at the beginning (typically 0xE9 0x?? 0x?? or 0xEB 0x?? 0x90), the lack (before TOS 1.04) of an OEM identifier compatible with PC-based systems, and the fact that a checksum is used to mark the boot sector as executable (the PC format uses the signature word 0x55 0xAA instead). Executable boot sectors for the Atari platform typically start with an MC68K jump opcode (e.g. 0x603C, and the last two byte word must sum with the rest of the boot sector (in big-endian word form) to 0x1234 in order to be bootable.
Unlike MS-DOS, GEMDOS would typically allow disks with unusual sector and track counts. As such, disks with 10 or even 11 sectors per track and over 80 formatted tracks were not uncommon in the Atari community. Typically a safe combination, such as 10 sectors per track by 80 tracks, was used, yielding an unformatted capacity of 800KB, but many users pushed the capacity of their double-density disks beyond 900KB using custom formats.
GEMDOS disc file systems can be read using DOS or Windows 9x.

## Versions
### TOS 1

* 1.0 (ROM TOS) Earliest version released on disk. First ROM release of TOS.
** Formats: floppy, 2 chip and 6 chip ROMs (192 KB)
** ROM date: 20 November 1985
** Machines: 520ST, 1040ST
* 1.02 (MEGA TOS) fixed bugs, supported Blitter co-processor and real-time clock.
** Formats: 2 chip and 6 chip ROMs (192 KB)
** ROM date: 22 April 1987
** Machines: 520ST, 1040ST, Mega 1, Mega 2, Mega 4
* 1.04 (RAINBOW TOS) Many bug fixes, file selector changed, DOS-compatible disk formatting, much improved performance. However, compatibility problems with older software.
** Formats: 2 chip and 6 chip ROMs (192 KB)
** ROM date: 6 April 1989
** Machines: 520ST, 1040ST, Mega 1, Mega 2, Mega 4, Stacy
* 1.06 (STE TOS, Revision 1) Support for STe machines only. Needed STE_FIX.PRG to patch bugs.
** Format: 2 chip ROMs (256 KB)
** ROM date: 29 July 1989
** Machines: 520STE, 1040 STE
* 1.62 (STE TOS, Revision 2) bug fixes for the previous 1.06 STE TOS.
** Format: 2 chip ROMs (256 KB)
** ROM date: 1 January 1990
** Machines: 520STE, 1040 STE

### TOS 2

* 2.02 Early TOS release for Mega STE.
* 2.05 (Mega STE TOS) Only found in the Mega STE with 720K floppy drive.
** Format: 2 chip ROMs (256 KB)
** ROM date: 5 December 1990
** Machines: Mega STE
* 2.06 (ST/STE TOS) Last TOS version for (Mega) ST/STE computers. Bug fixes, 1.44 MB disk support, memory test. Adds GTP program support (GEM-Takes-Parameters). Greatly enhanced GEM GUI. IDE hard disk booting. Atari logo display at boot-up. Automatic cold boot memory test. Supports higher resolutions.
** Format: 2 chip ROMs (256 KB)
** ROM date: 14 November 1991
** Machines: 520ST, 1040ST, 520STE, 1040STE
* 2.07 used on the Falcon prototype "FX-1"
* 2.08 used in notebook ST. ROM also contains some notebook-specific utilities: STTRANS (null-modem/ parallel-cable data transfer), power management tools, hard disk drive tools and drivers (AHDI, XHDI, BOOKINST and BOOKFMT) and a RAMdisk installer.

### TOS 3

* 3.01, 3.05, 3.06 (TT TOS) Primarily for 68030 TT support only. Supports fast "TT RAM", special TT screen resolutions etc. ST-hardware-compatible "Line-A" API dropped for extended TT functionality, forcing programmers to use GEM-compliant VDI calls etc. and thus encouraging GEM-compatible (as opposed to ST-compatible) development.
** Format: 4 chip ROMs (512 KB)

### TOS 4

* 4.00, 4.01, 4.02, 4.04 (512 KB) Update for Falcon 030 machines only. 68030 only. Adds support for DSP, 16 MHz blitter and video overlay. New v3.40 AES (last single-tasking version, but MiNT/MultiTOS-multitasking-aware) supports: pop-up menus, 3D window and dialog objects (later modified to use more compatible ob_state flags instead of extended type), 256-colour "animated" icons, soft-loaded fonts, inter-app drag&drop, background window manipulation, extensible filesystems. New CPX module for international localisation configuration. V4.04 was the last official Atari version of TOS.
* 4.08 (512 KB) Developed and released by Milan Computersysteme for the Milan, a 68040/60 TOS/GEM computer.
* 4.9x (4.92, 4.98) Never officially released, though prototypes were leaked and subsequently shared.
TOS 4.92 was a version of MultiTOS, the multitasking version of TOS, in a format (.IMG) designed to be written to a ROM chip. TOS 4 ROM contains five user-selectable language versions.

## EmuTOS

EmuTOS is a replacement for TOS (the operating system of the Atari ST and its successors), released as a free software. It runs on Atari and Amiga hardware and various emulators. Its compatibility with computer video games for Atari ST is limited.