Rewinding Progress
Bitluni built the cutest little miniature Commodore Datasette drive you have ever seen, and you can use it with a modern computer.
Cassette tape data storage for personal computers was never about performance. It was slow, offered only linear data access, and was fraught with errors. But in an era where memory was worth its weight in gold and a floppy drive nearly doubled the price of a computer system, the low cost of a cassette deck made it a very attractive option all the same. There is no conceivable reason to use cassette-based storage today, but through the rose-colored glasses of nostalgia, even the annoyances of yesterday don’t seem quite so bad.
Hardware hacker bitluni wanted to better understand this digital-analog hybrid world of the past, so he set out to encode data onto a cassette tape from a modern computer. For starters, he picked up a second-hand microcassette recorder. It looked suspiciously like a tiny version of the Commodore Datasette, which gave him the idea to turn it into exactly that — the miniature Datasette drive that Commodore never made.
bitluni disassembled the microcassette recorder and reverse engineered it well enough to understand how to electronically trigger the functions (e.g., play, record, rewind) normally activated by button presses. He then selected a RISC-V CH32V208 microcontroller with an analog-to-digital converter (ADC) and used it to control the hardware. The ADC was wired into the speaker while an external digital-to-analog converter was connected to the microphone for recording data.
A 3D-printed case, using filament matching the color of the original Datasette was created to house the guts of the microcassette recorder, as well as the modern components that were built into a custom PCB. An exposed USB-C port allows the mini Datasette to connect to a modern computer.
With the hardware squared away, bitluni turned his attention to encoding data on magnetic tape. He started with an amplitude-shift keying approach, but found that it was quite slow (about a 50 bit/s transfer rate) and that the decoding process was fairly complex. But after switching to frequency-shift keying, things improved significantly. This allowed data transfer rates of 1,000 bits/s with a simpler decoding scheme.
After putting the finishing touches on the device, bitluni demonstrated that a Pac-Man ROM could be successfully loaded for use with a Commodore 64 emulator. But when loading larger amounts of data, some occasional errors were observed (welcome back to the awful world of tape-based data storage). As a workaround, he broke data into 512 byte chunks and stored each chunk twice. If an error was found in one (after verification with a checksum), then the other chunk would be read.
This approach cuts transfer rates and storage capacity in half, but in this day and age making a Datasette has nothing to do with performance, so we can let that slide. What matters is that it works, and this approach did the job. Now bitluni can store up to a megabyte of data on a 60 minute cassette tape, however it takes a full hour to load that much data. It’s a super cool little device that gives a more authentic emulation experience, but I’m not going to throw away my SD cards just yet.