1*7af41682SXin LI 2*7af41682SXin LI#------------------------------------------------------------------------------ 3*7af41682SXin LI# $File: atari,v 1.2 2026/04/30 18:40:15 christos Exp $ 4*7af41682SXin LI# atari: file(1) magic for Atari formats: 5*7af41682SXin LI 6*7af41682SXin LI# Operating system ROMs for the Atari ST series of computers, including a 7*7af41682SXin LI# GPLv2+ implementation called EmuTOS. 8*7af41682SXin LI# Teemu Hukkanen <tjhukkan@iki.fi> 9*7af41682SXin LI# 10*7af41682SXin LI# OSHEADER https://freemint.github.io/tos.hyp/en/OSHEADER.html 11*7af41682SXin LI# The first byte is a bra.s instruction, an unconditional short jump 12*7af41682SXin LI0 byte 0x60 13*7af41682SXin LI# The second byte is the offset for the jump target address, 14*7af41682SXin LI# jumping past the OS header 15*7af41682SXin LI# TOS 1.00 uses 0x1E 16*7af41682SXin LI>0x01 byte 0x1E 17*7af41682SXin LI>>0 use atari-tos-rom 18*7af41682SXin LI# TOS >1.00 and EmuTOS uses 0x2E 19*7af41682SXin LI>0x01 byte 0x2E 20*7af41682SXin LI>>0 use atari-tos-rom 21*7af41682SXin LI 22*7af41682SXin LI# EmuTOS for Amiga 23*7af41682SXin LI0 beshort 0x1111 24*7af41682SXin LI>0x02 beshort 0x4EF9 25*7af41682SXin LI>>0xD2 beshort 0x602E 26*7af41682SXin LI>>>0xD2 use atari-tos-versions 27*7af41682SXin LI 28*7af41682SXin LI0 name atari-tos-versions 29*7af41682SXin LI# Enumerate all known versions 30*7af41682SXin LI>0x02 beshort 0x0100 Atari TOS ROM 1.00 31*7af41682SXin LI>>0 use atari-tos-rom 32*7af41682SXin LI# EmuTOS uses 1.04 for 192kB ROMs, and 2.06 for >=256kB ROMs 33*7af41682SXin LI>0x02 beshort 0x0102 Atari TOS ROM 1.02 34*7af41682SXin LI>>0 use atari-tos-rom 35*7af41682SXin LI>0x02 beshort 0x0104 Atari TOS ROM 1.04 36*7af41682SXin LI>>0 use atari-tos-rom 37*7af41682SXin LI>0x02 beshort 0x0106 Atari TOS ROM 1.06 38*7af41682SXin LI>>0 use atari-tos-rom 39*7af41682SXin LI>0x02 beshort 0x0162 Atari TOS ROM 1.62 40*7af41682SXin LI>>0 use atari-tos-rom 41*7af41682SXin LI>0x02 beshort 0x0205 Atari TOS ROM 2.05 42*7af41682SXin LI>>0 use atari-tos-rom 43*7af41682SXin LI>0x02 beshort 0x0206 44*7af41682SXin LI# ST-Book TOS 2.08 header says 2.06, identify it by release date 45*7af41682SXin LI>>0x18 belong 0x03101992 Atari TOS ROM 2.08 46*7af41682SXin LI>>>0 use atari-tos-rom 47*7af41682SXin LI>>0x18 belong !0x03101992 Atari TOS ROM 2.06 48*7af41682SXin LI>>>0 use atari-tos-rom 49*7af41682SXin LI>0x02 beshort 0x0207 Atari TOS ROM 2.07 50*7af41682SXin LI>>0 use atari-tos-rom 51*7af41682SXin LI>0x02 beshort 0x0208 Atari TOS ROM 2.08 52*7af41682SXin LI>>0 use atari-tos-rom 53*7af41682SXin LI>0x02 beshort 0x0300 Atari TOS ROM 3.00 54*7af41682SXin LI>>0 use atari-tos-rom 55*7af41682SXin LI>0x02 beshort 0x0301 Atari TOS ROM 3.01 56*7af41682SXin LI>>0 use atari-tos-rom 57*7af41682SXin LI>0x02 beshort 0x0305 Atari TOS ROM 3.05 58*7af41682SXin LI>>0 use atari-tos-rom 59*7af41682SXin LI>0x02 beshort 0x0306 Atari TOS ROM 3.06 60*7af41682SXin LI>>0 use atari-tos-rom 61*7af41682SXin LI>0x02 beshort 0x0400 Atari TOS ROM 4.00 62*7af41682SXin LI>>0 use atari-tos-rom 63*7af41682SXin LI>0x02 beshort 0x0401 Atari TOS ROM 4.01 64*7af41682SXin LI>>0 use atari-tos-rom 65*7af41682SXin LI>0x02 beshort 0x0402 Atari TOS ROM 4.02 66*7af41682SXin LI>>0 use atari-tos-rom 67*7af41682SXin LI>0x02 beshort 0x0404 Atari TOS ROM 4.04 68*7af41682SXin LI>>0 use atari-tos-rom 69*7af41682SXin LI 70*7af41682SXin LI0 name atari-tos-rom 71*7af41682SXin LI# Release date, display using ISO 8601 date 72*7af41682SXin LI# Year 73*7af41682SXin LI>0x1A beshort x %.4x 74*7af41682SXin LI# Month 75*7af41682SXin LI>0x18 byte x \b-%.2x 76*7af41682SXin LI# Day 77*7af41682SXin LI>0x19 byte x \b-%.2x 78*7af41682SXin LI# os_conf: Video sync mode and language/country 79*7af41682SXin LI#>0x1C beshort x (os_conf: %u) 80*7af41682SXin LI# Video mode is not relevant for multilingual variants 81*7af41682SXin LI>0x1C beshort !255 82*7af41682SXin LI>>0x1C beshort ^1 Video: NTSC 83*7af41682SXin LI>>0x1C beshort &1 Video: PAL 84*7af41682SXin LI# Language / Country 85*7af41682SXin LI# https://github.com/emutos/emutos/blob/master/include/ctrycodes.h 86*7af41682SXin LI# TOS uses a country to indicate locale, use IETF language tags instead. 87*7af41682SXin LI>0x1C beshort x Locale: 88*7af41682SXin LI>0x1C beshort 0 en-US 89*7af41682SXin LI# PAL 1.04 and 1.06 TEX variants 90*7af41682SXin LI>0x1C beshort 1 91*7af41682SXin LI>>0x2A85C string AUSWAHL: de-DE 92*7af41682SXin LI# NTSC with de-DE 93*7af41682SXin LI>0x1C beshort 2 94*7af41682SXin LI# NTSC Kaos TOS de-CH 95*7af41682SXin LI>>0x26806 string Auswahl: de-CH 96*7af41682SXin LI# NTSC Kaos TOS en-GB 97*7af41682SXin LI>>0x26806 string Select: en-GB 98*7af41682SXin LI# NTSC 1.06 TEX variant 99*7af41682SXin LI>>0x2A4FC string AUSWAHL: de-DE 100*7af41682SXin LI# NTSC 2.06 TEX variant 101*7af41682SXin LI>>0x32C3E string AUSWAHL: de-DE 102*7af41682SXin LI# PAL de-DE 103*7af41682SXin LI# Several translations are based on de-DE, detect all known variants. 104*7af41682SXin LI>0x1C beshort 3 105*7af41682SXin LI# 1.00 de-DE 106*7af41682SXin LI>>0x15097 string AUSWAHL de-DE 107*7af41682SXin LI# 1.00 fi-FI 108*7af41682SXin LI>>0x15092 string VALINTA fi-FI 109*7af41682SXin LI# 1.00 dk-DK 110*7af41682SXin LI>>0x15090 string FIL\ V dk-DK 111*7af41682SXin LI# 1.02 de-DE 112*7af41682SXin LI>>0x16691 string AUSWAHL de-DE 113*7af41682SXin LI# 1.04 de-DE 114*7af41682SXin LI>>0x2BAE2 string AUSWAHL: de-DE 115*7af41682SXin LI# 1.04 cs-CZ 116*7af41682SXin LI>>0x2BAE4 string Soubor: cs-CZ 117*7af41682SXin LI# 1.04 de-DE 118*7af41682SXin LI>>0x2BAEC string AUSWAHL: de-DE 119*7af41682SXin LI# 1.06 de-DE 120*7af41682SXin LI>>0x2DA56 string AUSWAHL: de-DE 121*7af41682SXin LI# 1.62 de-DE 122*7af41682SXin LI>>0x2DB4A string AUSWAHL: de-DE 123*7af41682SXin LI# 1.62 cs-CZ 124*7af41682SXin LI>>0x2DB4C string Soubor: cs-CZ 125*7af41682SXin LI# 2.05 is-IS 126*7af41682SXin LI>>0x34E80 string Drif: is-IS 127*7af41682SXin LI# 2.05 de-DE 128*7af41682SXin LI>>0x34E5A string AUSWAHL: de-DE 129*7af41682SXin LI# 2.06 de-DE 130*7af41682SXin LI>>0x36B68 string AUSWAHL: de-DE 131*7af41682SXin LI# 2.06 cs-CZ 132*7af41682SXin LI>>0x36B68 string Soubor: cs-CZ 133*7af41682SXin LI# 2.06 sr-Latn 134*7af41682SXin LI>>0x36B68 string IZBOR: sr-Latn 135*7af41682SXin LI# 2.06 sr-Cyrl 136*7af41682SXin LI>>0x36B68 belong 0xC8C7C1CE sr-Cyrl 137*7af41682SXin LI# 2.08 de-DE 138*7af41682SXin LI>>0x36B18 string AUSWAHL: de-DE 139*7af41682SXin LI# 3.01 de-DE 140*7af41682SXin LI>>0x395F0 string AUSWAHL: de-DE 141*7af41682SXin LI# 3.06 de-DE 142*7af41682SXin LI>>0x3EDD2 string AUSWAHL: de-DE 143*7af41682SXin LI# EmuTOS uses the de-DE language code correctly 144*7af41682SXin LI>>0x2C string ETOS de-DE 145*7af41682SXin LI>0x1C beshort 5 fr-FR 146*7af41682SXin LI>0x1C beshort 7 en-GB 147*7af41682SXin LI>0x1C beshort 9 es-ES 148*7af41682SXin LI>0x1C beshort 11 it-IT 149*7af41682SXin LI# PAL sv-SE 150*7af41682SXin LI>0x1C beshort 13 151*7af41682SXin LI# 1.02 sv-SE 152*7af41682SXin LI>>0x1979F string PAPPERSKORG sv-SE 153*7af41682SXin LI# 1.04 sv-SE 154*7af41682SXin LI>>0x2FC9F string PAPPERSKORG sv-SE 155*7af41682SXin LI# 1.04 no-NO 156*7af41682SXin LI>>0x2FCA0 string Papirkurv no-NO 157*7af41682SXin LI# 1.06 sv-SE 158*7af41682SXin LI>>0x31C13 string PAPPERSKORG sv-SE 159*7af41682SXin LI# 1.62 sv-SE 160*7af41682SXin LI>>0x31D07 string PAPPERSKORG sv-SE 161*7af41682SXin LI# 2.05 sv-SE 162*7af41682SXin LI>>0x3C309 string PAPPERSKORG sv-SE 163*7af41682SXin LI# 2.06 sv-SE 164*7af41682SXin LI>>0x3E00D string PAPPERSKORG sv-SE 165*7af41682SXin LI# 3.06 sv-SE 166*7af41682SXin LI>>0x46277 string PAPPERSKORG sv-SE 167*7af41682SXin LI# EmuTOS uses the sv-SE language code correctly 168*7af41682SXin LI>>0x2C string ETOS sv-SE 169*7af41682SXin LI# 2.06 NTSC ru-RU (2004) 170*7af41682SXin LI>0x1C beshort 14 ru-RU 171*7af41682SXin LI>0x1C beshort 15 fr-CH 172*7af41682SXin LI# Kaos TOS NTSC de-CH 173*7af41682SXin LI>0x1C beshort 16 de-CH 174*7af41682SXin LI>0x1C beshort 17 de-CH 175*7af41682SXin LI>0x1C beshort 19 tr-TR 176*7af41682SXin LI>0x1C beshort 21 fi-FI 177*7af41682SXin LI>0x1C beshort 23 no-NO 178*7af41682SXin LI>0x1C beshort 25 dk-DK 179*7af41682SXin LI# Dutch TOS 1.04 (1989-04-06) uses Saudi-Arabia as country code. 180*7af41682SXin LI>0x1C beshort 27 181*7af41682SXin LI>>0x2BAB0 string Selectie: nl-NL 182*7af41682SXin LI>0x1C beshort 29 nl-NL 183*7af41682SXin LI>0x1C beshort 31 cs-CZ 184*7af41682SXin LI>0x1C beshort 33 hu-HU 185*7af41682SXin LI>0x1C beshort 35 pl-PL 186*7af41682SXin LI>0x1C beshort 39 ru-RU 187*7af41682SXin LI>0x1C beshort 49 ro-RO 188*7af41682SXin LI>0x1C beshort 63 el-GR 189*7af41682SXin LI>0x1C beshort 109 cat 190*7af41682SXin LI# Multilingual TOS, either TOS 4.x, or 1024kB EmuTOS, which contain multiple 191*7af41682SXin LI# languages, and select the language and video mode based on settings in 192*7af41682SXin LI# NVRAM. 193*7af41682SXin LI>0x1C beshort 255 Multilingual 194*7af41682SXin LI# Kaos TOS, a modified version of TOS 1.04 195*7af41682SXin LI>0x5FFC string KAOS Kaos TOS 196*7af41682SXin LI>0x2CDB0 string 1.4.3 Kaos TOS 1.4.3 197*7af41682SXin LI# EmuTOS 198*7af41682SXin LI>0x2C string ETOS EmuTOS 199*7af41682SXin LI# Extended OS header, EmuTOS >= 1.0.0 200*7af41682SXin LI# https://github.com/emutos/emutos/blob/master/doc/version.txt 201*7af41682SXin LI>0x34 string OSXH 202*7af41682SXin LI# Length of extended OS header 203*7af41682SXin LI>>0x38 belong 25 204*7af41682SXin LI# Major version 205*7af41682SXin LI>>>0x3C byte x v%d 206*7af41682SXin LI# Minor version 207*7af41682SXin LI>>>0x3D byte x \b.%d 208*7af41682SXin LI# Fix version 209*7af41682SXin LI>>>0x3E byte x \b.%d 210*7af41682SXin LI# Zero means official release, Non-zero means snapshot 211*7af41682SXin LI>>>0x3F byte !0 Snapshot 212*7af41682SXin LI# Display version string for snapshots 213*7af41682SXin LI>>>>(0x40.L) string x (%s) 214*7af41682SXin LI>>>0x48 beshort x Machine: 215*7af41682SXin LI>>>0x48 beshort &1 ST 216*7af41682SXin LI>>>0x48 beshort &2 STe 217*7af41682SXin LI>>>0x48 beshort &4 TT 218*7af41682SXin LI>>>0x48 beshort &8 Falcon 219*7af41682SXin LI>>>0x48 beshort &16 FireBee 220*7af41682SXin LI>>>0x48 beshort &32 M548X 221*7af41682SXin LI>>>0x48 beshort &64 Amiga 222*7af41682SXin LI>>>0x48 beshort &256 ARAnyM 223*7af41682SXin LI>>>0x4A beshort x CPU: 224*7af41682SXin LI>>>0x4A beshort &1 68000 225*7af41682SXin LI>>>0x4A beshort &2 68010 226*7af41682SXin LI>>>0x4A beshort &4 68020 227*7af41682SXin LI>>>0x4A beshort &8 68030 228*7af41682SXin LI>>>0x4A beshort &16 68040 229*7af41682SXin LI>>>0x4A beshort &32 68060 230*7af41682SXin LI>>>0x4A beshort &64 68080 231*7af41682SXin LI>>>0x4A beshort &256 ColdFire-V4e 232*7af41682SXin LI# Adjustable cold boot delay in seconds when > 0. 233*7af41682SXin LI>>>0x4C byte >0 Boot-Delay: %is 234