Hard-Disk Audio Recording on the XL/XE (Frankenstein's proposal)
- Type
- DIY project
- Category
- Audio recording project (design proposal)
- Manufacturer
- Design proposal by Frankenstein (Freddy Offenga), with Alphasys
- Tags
- diy, sampling, audio, hard-disk, black-box, eightlink, double-buffering, dli, project-idea, advanced
Overview
"HD recording on XL/XE: making a dream come true?" is a design proposal by the writer Frankenstein (Freddy Offenga, F#READY). His goal was hard-disk audio recording, the kind of thing people bought an Atari Falcon for, on an ordinary 800XL. It shows clearly what limits the 8-bit's I/O and how to work around it. The text survives in the Nir Dary CD collection. There is no evidence it was ever built, so treat it as a worked example rather than a finished project.
Why one Atari wasn't enough
Frankenstein knew it was already possible to play samples while loading from a 1050. GateKeeper's demo The Miracle interrupted SIO transfers with display-list interrupts every two scan lines to output a sample, giving about 7.5 kHz. Frankenstein found that interrupting on every scan line gave about 15 kHz during a disk read.
His first plan was to record with a CSS Black Box and a SCSI hard disk. It failed, because the Black Box moves whole sectors in a tight CPU loop rather than with interrupts, leaving no time to take samples. He disassembled the Black Box's I/O routines to rewrite them, but couldn't work out enough about how its 6522 VIA moved the data.
The two-computer design
Arianne Slaager (Alphasys) then described the EightLink, a cartridge-port cable that links two Ataris with an 8-bit parallel bus (see AtariCom and other link cables). That suggested splitting the job:
| Computer | Hardware | Job |
|---|---|---|
| Slave | a sample cartridge (ANG Software's was suggested) in the cartridge port, and an EightLink fitted internally, which Alphasys said meant piggy-backing a second PIA | takes samples and sends them across the link |
| Host | a CSS Black Box with SCSI hard disk | receives the data and writes it to disk, through normal DOS calls or, if too slow, direct sector writes |
Static buffering: the slave fills four buffers in rotation, sending two while it fills the others, and the host writes each pair while the next arrives. The sample rate can be no higher than the slower of the link and the disk.
Dynamic buffering (Alphasys's improvement): a timer interrupt on the slave fills buffer A, then buffer B, while the main loop sends whichever buffer is full. The host needs one buffer. The achievable rate becomes
Sample rate = (link speed × disk speed) / (link speed + disk speed)
With a 20 KB/s link and a 5 KB/s disk, that is 4 KB/s, or 8 kHz with 4-bit samples (two per byte).
The numbers
Alphasys estimated the EightLink at up to about 30 KB/s. Frankenstein measured several Black Box systems owned by Atari users and groups, among them Mega Magazine and ANG Software:
| System | Write | Read |
|---|---|---|
| Mega Magazine, 40 MB | 5.8 KB/s | 19.7 KB/s |
| Beco, 20 MB | 5.8 KB/s | 12.8 KB/s |
| Beco, 140 MB | 5.6 KB/s | 12.8 KB/s |
| ANG, 20 MB | 5.8 KB/s | 14.9 KB/s |
| Louis (ANG BBS), 40 MB | 5.8 KB/s | 13.9 KB/s |
Writing at about 5.8 KB/s is the bottleneck. With a 30 KB/s link the dynamic formula gives roughly 4.9 KB/s, enough for about 9–10 kHz in 4-bit mode.
Lessons for builders today
- Black Box disk writes are CPU-bound, so anything time-critical must run on another processor or from interrupts.
- Double buffering with an interrupt-driven producer is still the right pattern for streaming audio on a 6502.
- Modern storage such as SIDE3 or Ultimate 1MB with CF or SD cards, together with a Covox for output, makes far higher rates practical on a single machine.
- Frankenstein ended with a second idea: use the slave Atari as a dedicated mouse handler.
Credits
- Frankenstein — HD recording on XL/XE: 'Making a dream come true?' (HDRECORD, Nir Dary collection) — Pigwa.net Atari archive
- comp.sys.atari.8bit FAQ, sections 5.3.2 (EightLink) and 6.11 (Frankenstein = Freddy Offenga / F#READY) — Michael Current (comp.sys.atari.8bit FAQ)
