DUMP1050: Reading the ROM of a Happy or Lazer 1050 from the Atari

In July 2019 the AtariAge member E474 released DUMP1050, a small utility that reads the firmware ROM out of an enhanced 1050 disk drive (a Happy, a Lazer or a similar modification) and saves it as an ordinary Atari DOS file. The first public release went up on GitHub on 9 July 2019 as source code plus a ready-to-boot ATR, with an early version tested by Nezgar.

How it works

A stock 1050 has no command for reading its own ROM, but the Happy-style upgrades replace the drive's firmware with one that accepts programs uploaded from the computer. They keep a table of SIO commands in drive RAM, and new entries can be added to it. DUMP1050 uses that mechanism step by step:

  1. It asks for a drive number (D1:–D4:) and reads the drive's command table through ordinary sector reads, because the Happy firmware maps drive memory onto "sector" numbers (the read starts at $9780 in drive RAM; the table itself is at $97A0).
  2. It prints the table on screen and writes it to a file on D1:.
  3. It finds a free slot and adds a new SIO command, X, pointing to code placed at $9000 in drive RAM.
  4. It writes the updated table and the X handler back into the drive.
  5. It then calls X repeatedly to pull both banks of the drive ROM into buffers in the Atari, and saves them to disk.

The source includes a file of Happy equates: the drive's RIOT ports, its timer, its RAM buffer at $8000, and entry points in its ROM for jobs such as read sector, write sector, format track, motor on and move head to track. These came from a German magazine series.

Built on a 1987 magazine course

The routines are based on the "Happy programming" course that ran in the German Atari Magazin in 1987, issues 1 to 5. Soon after the release E474 added an English translation of the first article to the project's GitHub wiki, along with its original listings, and planned to follow with the rest. For anyone wanting to write their own drive-side code for a Happy, those notes are as interesting as the dumper itself.

Notes and caveats

  • It should run on any stock 8-bit with 16 KB or more, and the code assembles with ATASM. It was written in WUDSN on Linux.
  • With Hias's high-speed SIO OS patches, transfer speed can be unpredictable. It may also fail if a DOS has already programmed the drive.
  • The dumped files are not suitable for CRC comparison with other dumps, because the bank-select addresses $FFF8/$FFF9 return inconsistent values when read.
  • Important: in August 2022 the author added a warning to the README that the code may trigger a disk-corruption bug and should not be used until further notice. If you try it anyway, use a scratch disk in D1: and keep no valuable data in the drive.

Where to get it

The source, build script and dump1050.atr are at github.com/e474/DUMP1050, in the DUMP1050 folder. Boot the ATR with the Happy- or Lazer-equipped drive connected and powered, and choose its drive number when asked.

Credits