Hard Disks on the Atari: IDE, CompactFlash and SD Interfaces with SpartaDOS X and APT

A "hard disk" on an Atari 8-bit today is usually a CompactFlash or SD card in a cartridge or an internal board. It holds dozens of partitions of up to 32MB each, reads and writes many times faster than a floppy, and boots straight into SpartaDOS X. Getting there means understanding three layers: the interface that connects the card to the computer's bus, the partition scheme that divides the card up, and the DOS and drivers that turn partitions into drive letters. SD-Card Drives, IDE Carts and Flash Multicarts surveys the devices you can buy. This guide explains how they work, how to partition a card with APT, how SpartaDOS X uses it, and how to rehearse the whole setup in Altirra first.

What you'll learn: the main parallel-bus storage interfaces and their limits, what APT is and why cards end up with both FAT and Atari partitions, how drives are mapped and booted, SpartaDOS X's role, and Altirra's hard-disk emulation.

What you need: an XL/XE (or an 800 with Incognito), one of the interfaces below with a CF or SD card, SpartaDOS X (built into most of them), and a PC card reader for copying files.

1. Why the parallel bus is different

SD drives such as SIO2SD and FujiNet plug into the SIO port and pretend to be floppy drives, so they are limited to SIO speed. The devices in this guide sit on the cartridge slot (often with the 130XE's ECI), the 800XL's Parallel Bus Interface (PBI), or inside the machine. The 6502 reads the drive's registers directly, so transfers run at memory speed. The KMK/JZ IDE manages 50–80 KB/s in native mode, against under 2 KB/s across a standard 19,200-baud SIO link. The cost is software: the OS knows nothing about IDE, so either a PBI BIOS on the device presents partitions as ordinary D: drives to any DOS, or a DOS driver (normally under SpartaDOS X) does the job.

2. The interfaces

Interface Year Connects to Notes
KMK/JZ IDE (1.0, 1.2) 1996 Cartridge + ECI IDE disk, CF or ATAPI; BIOS by Konrad Kokoszkiewicz; 16 partitions, up to 8 GiB per device; boots from any partition. The IDEa (2005) is a clone
MyIDE 1999–2006 Cartridge or internal Sijmen Schouten's design; needs a modified OS (MyIDE-OS)
MyIDE+Flash, MyIDE-II 2006, 2012 Cartridge Atarimax. MyIDE-II: CF, FAT32 loader for XEX and ATR, MyBIOS, 512K flash and 512K SRAM
IDE Plus 2.0 (IDE+2) 2011 PBI or Cartridge + ECI Simius and Drac030: flashable PBI BIOS, 512K or 1MB SpartaDOS X ROM, real-time clock, pass-through cartridge; up to 128 GiB, 16 partitions; ATA-3 or later
SIDE 2011 Cartridge Candle'O'Sin: CF, SpartaDOS X, RTC; switch between Loader and SDX modes
SIDE2 2012 Cartridge Lotharek's version: CF hot-swap, programmable button, on-board SDX
SIDE3 2020 Cartridge SD card, 8MB flash, 2MB SRAM, cartridge emulation up to 1MB, hot-swap
AVGCART / SUBCART 2018 / 2023 Cartridge SD multicart that emulates SIDE2 for SDX
Ultimate1MB — Internal (XL/XE) 1MB RAM, flashable OS/BASIC, SDX, RTC, and PBI disk emulation for a SIDE cart
Incognito 2012 800 personality board Built-in CF storage: PBI in XL/XE mode, SDX driver in 800 mode

Older systems, such as the msc-IDE controller, the Black Box and MIO with SCSI disks, and SIO2IDE on the serial bus, also map disk space to drive numbers, each in its own way.

Two practical points stand out. KMK/JZ and IDE+2 need no OS patch, because their BIOS works as a PBI device. MyIDE, by contrast, needs its own OS. And the SIDE family is designed around Jonathan Halliday's (flashjazzcat) firmware: the SIDE Loader, which runs XEX files and mounts ATR images straight from a FAT partition, plus the PBI BIOS when an Ultimate1MB or Incognito is present.

3. Partitioning: FAT, APT and why you want both

A modern card has to serve two masters. Your PC wants a FAT file system, so you can drag games and ATR images onto it. Atari DOSes want raw sector ranges they can format as SpartaDOS, MyDOS or DOS 2. The SIDE-family firmware solves this with APT, the Atari Partition Table:

  • The card is first divided the PC way, with an MBR. Typically there are one or more FAT partitions plus space set aside for an APT container.
  • Inside the container, FDISK creates native Atari partitions, each formatted later for SpartaDOS X, MyDOS or another DOS.
  • The APT can also hold external entries that point at the card's FAT partitions, so SpartaDOS X can mount them as drives through its FAT driver.
  • The SIDE Loader ignores APT and reads the FAT partition directly, so XEX and ATR files can stay where the PC put them.

The tool is FDISK, Halliday's APT partitioning program, which runs under SpartaDOS X with drop-down menus. Run FDISK once the hard disk is enabled in XL/XE mode. Older SDX ROMs shipped without it. It is on the APT Toolkit disk and in current SDX ROM images for these devices, so updating the device's firmware is often the first step. Until the APT container and at least one partition exist, the drivers see nothing, and SDX reports error 138 for the hard-disk drives.

A working example, from a ready-made image for a SIDE3 setup with an Ultimate1MB:

VHD / CF card
  FAT partition (100 MB)  -> D9:  (XEX, ATR, files from the PC; read via FATFS.SYS)
  APT container
    partition 1 (SDFS)    -> D5:  boot drive, holds CONFIG.SYS
    partition 2 (SDFS)    -> D6:
    partition 3 (SDFS)    -> D7:
    partition 4 (SDFS)    -> D8:

The Ultimate1MB BIOS is set to boot from D5:. That partition's CONFIG.SYS loads FATFS.SYS for the FAT volume and PCLINK.SYS for PC transfers.

4. SpartaDOS X on a hard disk

SpartaDOS X is the natural partner, and builds exist for IDE Plus 2.0, MyIDE, SIDE, SIDE2/AVGCART, SIDE3, Ultimate1MB and Incognito. From version 4.40 it handles:

  • 512-byte sectors (SDFS 2.1), so one partition can reach 65,535 sectors, 32MB. Earlier versions were limited to 16MB with 256-byte sectors.
  • Up to 15 drives (8 before 4.40), up to 1,423 entries per directory and files up to 16MB.
  • FAT access through FATFS.SYS (from 4.47: FAT12 and FAT16 with subdirectories). It is read-only, needs a device with 512-byte sectors, and handles volumes up to 2 GiB. Copy files from FAT onto an SDFS partition to change them.

When SDX runs from a different cartridge, Halliday's soft drivers add the hardware. SIDE.SYS, for example, drives a SIDE or SIDE2 card. It takes about 2.5K, but because SpartaDOS X can load driver segments into extended memory, it raises MEMLO by only about four pages. Interfaces with their own PBI BIOS (KMK/JZ, IDE+2, Ultimate1MB with SIDE, Incognito) present partitions as D: drives before any DOS loads, so DOSes other than SpartaDOS X can use them too. The KMK/JZ BIOS offers native 512-byte sectors or 256- and 128-byte emulation for older DOSes. Emulation is slower, and each partition can be write-protected independently.

5. Rehearse it in Altirra

Altirra emulates nearly all of these: MyIDE and MyIDE-II, KMK/JZ IDE and IDE Plus 2.0 (with slave devices), SIDE, SIDE2, SIDE3 (since 4.00; SIDE 3.1 since 4.20), the Black Box, MIO and the Ultimate1MB. Add the interface under System > Configure System > Devices, then add a hard disk beneath it. Disk images are VHD files, fixed or dynamic and up to 2 TB, and Altirra can create them for you. Useful extras:

  • A virtual hard disk device that presents a host folder as a read-only FAT16, FAT32 or SDFS partition, and a temporary write filter that discards writes. Both are handy for testing a setup without risking the image.
  • Disk Explorer can open APT partitions inside a VHD. A shortcut mounts the VHD in Windows, so you can copy files onto its FAT32 partition.
  • IDE+2: hold START while pressing RESET for its menu. On real hardware, always leave the menu before resetting or powering off. The configuration shares the clock chip's NVRAM and can be corrupted otherwise. Altirra protects it by default.
  • MyIDE: choose $D5xx for the cartridge version or $D1xx for the internal one. The image always stores 512 bytes per sector, though only a quarter to half is used with 128- or 256-byte sectors.

Gotchas, all of which apply on real hardware too:

  • With PBI disk emulation in the Ultimate1MB BIOS, turn off Altirra's SIO patch and Fast Boot, or enable SIO override detection. Otherwise the emulator answers disk requests before the BIOS can.
  • If a SIDE cart is used together with an Ultimate1MB, disable the SDX on the SIDE cart. The two SDX banking registers overlap, and the PBI BIOS can hang on startup.
  • Before reflashing an Ultimate1MB, turn off SIDE PBI support in its BIOS. Otherwise the flasher erases the PBI BIOS and then calls it, leaving the board bricked. That is easy to undo in an emulator and much less fun on a real machine.

Troubleshooting

  • FDISK not found: your SDX ROM predates it. Load it from the APT Toolkit disk or update the device's firmware.
  • Error 138 on every hard-disk drive: no APT container or partitions yet, the hard disk is disabled in the BIOS, or the card isn't detected.
  • Loader sees files but SDX doesn't: the files are on FAT. Load FATFS.SYS, or add an external APT entry for the FAT partition.
  • Can't write to the FAT drive under SDX: that's expected, because FAT access is read-only. Use an SDFS partition or PCLink.
  • Old CF cards misbehave: KMK/JZ wants ATA-1 (ATA-2 recommended) and IDE+2 ATA-3 or later. Try a different card.

Further reading

  • APT Software Manual (Jonathan Halliday, 6th edition) and his videos on card preparation, at atari8.co.uk.
  • The comp.sys.atari.8bit FAQ, sections 3.3.4 (IDE/CompactFlash), 3.3.5 (SD), 6.12 (Ultimate1MB) and 7.3.2 (SpartaDOS X).
  • Altirra's help file: MyIDE emulation, KMK/JŻ IDE 2.0 (IDEPlus 2.0), Ultimate1MB emulation, The Black Box.
  • Drac030's KMK/JZ IDE and IDE Plus 2.0 documentation.
  • Our guides SpartaDOS X: Getting Started with the Command-Line DOS, SD-Card Drives, IDE Carts and Flash Multicarts and RespeQt Folder Images and PCLink.

Credits