SDrive (C.P.U.) and Derivatives

Year
2008
Type
DIY project
Category
SD-card floppy drive emulator (SIO)
Manufacturer
C.P.U. — Radek Šterba (Raster) and Robert Petružela (Bob!k)
A black plastic SDrive box with a grey SIO cable, a row of LEDs, three push buttons, a blue DIP switch block and a RESET button on its label, with an SD card in its side slot and four more SD cards in front.

Overview

The SDrive (2008) is the minimalist's SD-card drive. The Czech group C.P.U., Radek Šterba (Raster) and Robert Petružela (Bob!k), wanted the cheapest possible design. That meant a DIL-28 ATmega8-16PU microcontroller on a single-sided board, a handful of LEDs, a few buttons and DIP switches, and no LCD. Instead of an on-device display, SDrive boots a small control program from the SD card into the Atari, and you pick images on the TV screen. Firmware and software source were published, so the design was easy to copy, extend and port.

Specifications (original SDrive)

Feature Detail
Microcontroller ATmega8-16PU (the schematic uses a 14.31818 MHz crystal)
Cards SD up to 2 GB, FAT16
Drives D1:–D4: plus one special boot drive
SIO speed 3.5–128 kbit/s; standard 19 and 69 kbit/s
Images ATR and XFD up to 16 MiB, 128- or 256-byte sectors
Executables COM/XEX/BIN or any extension, via a built-in loader
Controls drive-swap buttons, write-protect switch, ID DIP switches (up to 4 SDrives on one bus)

Clever details: reads are buffered and writes delayed, which speeds things up and reduces flash wear. The boot loader needs under 256 bytes including its sector buffer, can be relocated anywhere from $0500 to $BE00, re-initialises SKCTL before every block, and loads executables of up to 8 MiB. Active files appear in a simulated directory, so you can run them from most DOSes or QMEG. Note the 80 KB file-size limit with standard DOSes.

Building and first boot

The original was published as a schematic and manual (SCHEME.PDF and SDrive_en.pdf on Raster's site). First-boot checklist:

  1. Put SDRIVE.ATR, the control program, in the root of the card. Four yellow LEDs lighting at power-up means the card and that file were found.
  2. With all DIP switches off, the unit is SDrive ID 1 and the special boot drive is active as D1:. Power the Atari and it should boot straight into the menu.
  3. If it doesn't, the SDrive may not have finished initialising before the Atari asked for D1:. It is powered from SIO pin 10, which comes up with the computer. Press RESET to retry, or power the SDrive externally first.
  4. Never feed external +5 V while SIO +5 V is still connected. Disconnect pin 10, or fit a switch.

Why the diode? The schematic puts a 1N4148 between the ATmega's serial TX and SIO pin 3 (computer Data In). The diode keeps the SDrive from holding the line high, so other peripherals can share the bus. Classic SIO2PC designs use the same open-collector trick.

The SDrive family

Because the source was open, SDrive became a platform:

  • SDrive NUXX (Steve Vigneau, 2009): an off-the-shelf enclosure with printed end panels, a proper SIO connector footprint, an on-board low-cost AVR programmer, and brown-out detection at 4.0 V.
  • SDrive Micro (Panos Santos, 2012): a 70×50×20 mm all-SMD version with a captive SIO cable and push-push SD socket.
  • SDrive-NG (Klaus Brandl, "kbr", 2014): SDHC and FAT32, error blink codes, a bootloader for firmware updates, image creation, and a control program converted to the XA assembler.
  • SDriveARM (2017): a 48 MHz Cypress PSoC 4 ARM, capacitive buttons, every SIO pin wired to the CPU for future features.
  • SDrive-MAX (kbr, 2017): SDrive-NG firmware on an Arduino UNO with a 2.8" touchscreen, now the most common way to build one.
  • SIO2Arduino (2012) and SIO2MicroSD (2013) are independent Arduino projects inspired by the same idea. SIO2MicroSD borrowed SDrive's XEX boot loader.

Tips

  • Use small FAT16 cards (≤ 2 GB) with the original firmware. Move to SDrive-NG or SDrive-MAX if you need SDHC.
  • Set different DIP-switch IDs if you chain several SDrives or mix one with real drives.
  • For maximum compatibility with copy-protected software, keep a real drive or an ATX-capable emulator. The original SDrive handles ATR/XFD, not protected-disk formats.

Credits