trackfile.device and DAControl¶
trackfile.device is an AmigaOS 3.2 device driver that presents ADF floppy-disk images as virtual floppy disks. Its companion CLI command, DAControl, inserts and ejects those images under script control. Together they let the OS 3.2 installer use a single installation script regardless of source medium (CD-ROM, hard disk, real floppies) by treating every source as a sequence of swappable virtual floppies.
NDK 3.2 R4 ships the full SAS/C 6 source for both in DAControl+trackfile/ — a rare, fully-documented device driver that emulates trackdisk.device as closely as possible.
Why it exists¶
The OS 3.2 team decided to use one installation script for every install medium. The lowest common denominator was "virtual floppy disks" that the script can insert and remove on demand. That virtual floppy drive is trackfile.device; the command driving it is DAControl. As the source README puts it: "Small as it may seem, the trackfile.device cuts a swath through the AmigaOS stack."
What trackfile.device does¶
It is a device driver that:
- Accepts the standard
trackdisk.devicecommand set (CMD_READ,CMD_WRITE,CMD_UPDATE,TD_*geometry/query commands), so existing floppy-aware software works unmodified. - Backs each unit with an ADF disk-image file rather than physical media.
- Caches tracks and performs MFM encode/decode to emulate the floppy bitstream faithfully.
- Swaps its own stack (device calls may execute on the caller's stack) via
swap_stack.asm.
The source is laid out to mirror a textbook device driver:
| File | Role |
|---|---|
trackfile_device.{c,h} |
Device entry point, library/vector init |
unit.{c,h} |
Per-unit management |
commands.{c,h} |
Command dispatch (read/write/geometry) |
cache.{c,h} |
Track caching |
mfm_encoding.{c,h} |
MFM encode/decode |
functions.{c,h}, tools.{c,h} |
Helpers |
system_headers.{c,h} |
OS includes |
swap_stack.asm |
Stack swapping |
goodies/ |
Raw disk read/write & recovery tools |
What DAControl does¶
DAControl is the CLI front-end that the installer script calls to manage media:
- Insert an ADF image by path into a unit (
insert_media_by_name). - Mount a floppy image file (
mount_floppy_file). - Compute ADF checksums the same way
trackfile.devicedoes internally (DAChecksum), for verifying images. - Handle Workbench icons for the media (
process_icons).
Why it matters as a learning resource¶
Device drivers that emulate a well-known specification and are documented to this degree are rare. trackfile.device is therefore valuable as:
- A complete worked example of an AmigaOS device driver implementing the new-style command query protocol.
- A faithful
trackdisk.deviceclone — useful for understanding the real trackdisk API (compare with TrackDisk64 64-bit storage). - An ADF/image-handling reference, complementing the ADF Format Specification.
Build requirements¶
Both components build with SAS/C 6 (smakefile targets sc/link). They are not host-buildable on modern systems without SAS/C or a compatible cross-toolchain.
See Also¶
- Device Driver Command-Set Rules
- New Style Device Commands
- 64-bit Storage Access (TrackDisk64)
- Standard Device Libraries
- NDK 3.2 R2/R3/R4 Release Notes
Sources: Hyperion Entertainment / AmigaOS Team, NDK 3.2 R4 DAControl+trackfile/ source and README, 2022.
Raw: raw/devices/trackfile-device.md
Updated: 2026-08-04