Atari ST family
The Atari ST uses the big-endian 68000 line (CPU families). Like the Amiga, many ST games skip the OS and drive the hardware directly. A game that uses TOS and GEM can be traced at its GEMDOS, BIOS, XBIOS, AES and VDI calls. Hatari, an ST emulator, has the best documented debugger of these machines.
Atari 520ST and 1040ST
Hardware
| Fact | Value |
|---|---|
| Years | 520ST shipped in June 1985; 1040ST from 1986 |
| CPU | 68000 at 8 MHz |
| RAM | 512 KB or 1 MB |
| Video | Shifter: 320x200 in 16 colours and 640x200 in 4, from 512; 640x400 mono at 71.2 Hz |
| Sound | YM2149 |
| Other chips | MC68901 MFP, WD-1772 floppy controller |
| OS and media | TOS with GEM; 360 or 720 KB floppies |
Source: Wikipedia: Atari ST.
How games were made and loaded
Games either use TOS and GEM or take over the hardware. Rob Northen's Copylock protected disks on the ST as on the Amiga (Wikipedia: Rob Northen copylock). SPS supports Copylock ST and Speedlock timing tracks (SPS 2002-10-28; SPS Speedlock).
Media and image formats
| Format | What it holds |
|---|---|
| ST | Raw data with no metadata and no protection |
| MSA | Adds a geometry header and RLE compression |
| STX (Pasti) | Non-standard sectors, fake track addresses and sector timing |
Sources: fplanque.com, 8bitchip forum. Its author never documented STX. Hatari 1.8.0 (2014) added the first open-source decoder (IANA: Pasti STX; st-computer.org).
Tools
Hatari has these debugger features (Hatari debugger manual):
- conditional breakpoints with up to four conditions;
- CPU and DSP disassembly;
- symbol loading;
- profiling with Callgrind output;
- tracing of GEMDOS, BIOS, XBIOS, AES and VDI calls;
- command scripts that run at startup and on breakpoints.
The scripts let an agent drive captures (re-observe). No Ghidra loader for ST PRG files is known. Steem SSE's debugger is not documented here. Unicorn runs 68000 code but none of the ST's chips.
Projects to learn from
- glFrontier. Tom Morton started from the ST version of Frontier: Elite II. He stripped the hardware access from the assembly and changed a 68k assembler to emit C or i386 assembly (virtuallyfun.com; Aminet readme).
- fe2-intro reproduces the Frontier intro (watsonmw/fe2-intro).
- ReDMCSB is reconstructed Dungeon Master and Chaos Strikes Back source by forum user ChristopheF. Its build scripts make ST and Amiga executables, with an option to drop copy protection (dungeon-master.com forum). DM/CSB version 3 was built with Think C on Apple hardware (dungeon-master.com forum). ReDMCSB says its builds match the original binaries. No second source confirms this.
For an exact reimplementation
- Decide whether the game uses TOS or takes over the machine. Trace a TOS game at its system calls with Hatari's call tracing.
- Keep the STX image as the record of a protected disk. A plain ST image loses the protection.
- Read a self-decrypting game from emulator memory after it decrypts itself.
- Take ground truth for a function that touches only RAM from Unicorn's 68000 (re-emulate). Anything that reads chip registers needs a full trace from Hatari.
Atari STE, Mega STE, TT030 and Falcon030
Hardware
| Fact | Value |
|---|---|
| Years | STE in late 1989; to 1993 |
| CPU | 68000, at 16 MHz on the Mega STE; 68030 on the TT and the Falcon |
| RAM | To 4 MB on the STE |
| STE additions | Blitter, fine scrolling, split screen, 8-bit stereo DMA PCM, 4096 colours |
| Falcon030 (1992) | Adds a Motorola 56001 DSP |
| OS | TOS 1.06 to 2.00 |
Source: Wikipedia: Atari ST.
How games were made and loaded
No differences from the ST are listed yet.
Media and image formats
As for the ST: ST, MSA and STX.
Tools
Hatari disassembles DSP code as well as CPU code. It can disassemble code for the Falcon's 56001 (Hatari debugger manual).
Projects to learn from
None listed yet.
For an exact reimplementation
- Record the model. An STE game can use the Blitter and DMA sound that the ST lacks.
- On the Falcon, export the DSP code apart from the 68030 code.