This article is also available in Polish (polski).
TrackZero64 — Commodore 1541-II Disk Writing via XUM1541
version 1.0.0, 2026-07-28
Purpose
TrackZero64 is a program for writing Commodore 1541-II floppy disks via the XUM1541 (ZoomFloppy) USB adapter. Written in C99, runs in userspace via libusb-1.0 — zero kernel drivers. Works on NetBSD and Linux. This is not an emulator — it is a tool for physically writing real 5.25" floppy disks on real hardware.
Architecture
TrackZero64 implements two protocols from scratch in C99 in userspace:
- XUM1541 firmware protocol — USB communication with the adapter (VID/PID 0x16d0:0x0504, bulk endpoints 3 IN and 4 OUT)
- IEC serial bus protocol — communication with the 1541-II drive via CBM serial port
By implementing both layers in userspace, the program requires no kernel driver — just libusb-1.0. This works identically on NetBSD and Linux.
Supported Hardware
| Element | Details |
|---|---|
| Adapter | XUM1541 (ZoomFloppy), USB VID/PID 0x16d0:0x0504 |
| Drive | Commodore 1541-II (single-drive system) |
| Disk format | D64 — 35 tracks, 174,848 bytes |
| Identification | ROM probe at $FF40 and $FFFE — recognizes 1541-II and related 1541 models |
Features
- Write D64 images to physical 5.25" floppy disks
- Read floppy disks to D64 images
- ncurses TUI — real-time per-track progress
- Disk directory browser
- Oscilloscope waveform visualization during write
- Radial disk map
- OSC 52 clipboard — copy results to terminal
- Full i18n — English and Polish
- Drive model detection via ROM probe
TUI — The Project's Gem
TrackZero64's ncurses TUI is not just a "progress window". It is a full-featured interface with 62.5 FPS, split panels, mouse support and F-key dispatch:
- Oscilloscope (F6) — per-track write waveform visualization, adaptive 1/2/3 column layout, real-time signal amplitude visible. Awesome.
- Radial disk map (F7) — concentric rings of 35 tracks, sector-by-sector progress. Looks like radar. Awesome.
- Split-panel layout: left (status, progress, LED), right (directory browser with 1541-II drive panel)
- Log window: 256-line buffer, timestamps, auto-scroll, OSC 52 clipboard
- LED indicators styled after the real 1541-II faceplate
- Language toggle EN/PL via 'l' key
- OS-aware themes: Linux (green on navy), NetBSD (red on gray)
How It Works
The program sends commands to the XUM1541 adapter over USB. The adapter translates them into IEC bus signals and sends them to the 1541-II drive. The drive performs the physical write on the floppy disk, track by track. The entire process is visible in real-time via the ncurses TUI — you can see which track is currently being written, progress, and any errors.
Writing a full disk (35 tracks) takes ~2-3 minutes on a 1541-II with the original Alps mechanism at 300 RPM.
Compatibility
| System | Status |
|---|---|
| NetBSD | Works — tested on T400 (NetBSD 10.1, 11 RC7) |
| Linux | Works — tested on Gentoo (Legion Go, T400) |
| OpenBSD | Should work — libusb-1.0 available |
| Windows | Not supported. Not planned. |
Source Code
Repository on SourceHut. Licensed under BSD-2-Clause.
Limitations (v1.0.0)
- Commodore 1541-II only — other drives (1571, 1581, PET) not supported
- D64 format only — no D71, D81, GCR
- Format via native N0: — host has no progress visibility (2-5 min)
- No post-write file verification (removed from beta — verify manually with
xum-read) - No REL file operations (detected in directory but not read/written)
- No file management — cannot rename, copy, scratch
- No batch operations — each xum-read/xum-write transfers one file
- No daemon mode — each tool opens/closes the adapter independently
- USB 3.0 port issues — USB 2.0 recommended
- XUM1541 firmware v8 only — v7 has known U1/U2/M-R bugs
- Debug trace compile-time only (flags
-DXUM_TRACE,-DDRIVE_DEBUG)
Summary
TrackZero64 is not a toy. It is a tool written from scratch in C99, implementing two full communication protocols, running on real, 40-year-old hardware. If you have a Commodore 64 and a 1541-II drive with an XUM1541 adapter — this is the program you need for writing floppy disks from NetBSD or Linux.