**** Cassettepunk ****

Technological Surrealism / Alec Nerds Out

Lo8: Resurrecting the 8-track as a data storage medium

December 8, 2013


I ranted back here about how awful the 8-track cartridge was. I’m happy to report that I’ve finally found a good use for it as a mortal insult to tape as a data storage medium.

I’ve always hated tape backup. My first experience with it was a Reveal brand device that piggy-backed somehow onto the floppy controller. It was an attempt to make tape backup accessible to the humble consumer; the drive was badly made and poorly supported, and any time I attempted to use it, the data was corrupted before I even had a chance to put the tape back in its plastic case. The $200 or so of hard-earned paper route money I spent on the thing was as irretrievable as the files I entrusted to its care.

So I figured I could kill three birds with one stone:

  • Insult tape backup by associating it with something as reviled as the 8-track
  • Revive the cherished experience of storing data on consumer audio media, as the first generation of home computers did in the early ’80s
  • Pay tribute to the 8-track, which I secretly love.

Here goes.

Precedents

It turns out that there are several precedents for the use of the 8-track for data storage. (Why? I can only imagine that raw, brutal cheapness overpowered every other consideration.)

The Compucolor 8001 from 1976 is the worst and purest example; it simply used 8-track to store data. Apparently a full 25 or so of these units sold (see above link) and Bobby reports on an earlier thread that most of what they sold was returned. This is exactly what one might expect from such an inherently flawed design.

A more workable example is the Exidy Sorcerer from 1978, which wisely ditched the tape entirely and just used the plastic shell of an 8-track as a chassis for a ROM cartridge. Still a commercial flop, but not the fault of the 8-track this time.

Finally, I ran across this video of a guy who somehow came across an 8-track cartridge that appears to have been used in an analog data logging device installed in a locomotive. Weird, and given that it’s just a single frequency going onto each track, it’s perhaps the only appropriate use of an 8-track that you’ll see here.

Hardware

I had several problems to solve:

  • At the best of times, 8-track sound fidelity is … low.
  • We’re dealing with some of the worst quality tape of the era, judging by the titles I have, and it’s now something approaching 40 years old.
  • I’m no hardware engineer; it has to be simple.

I decided to use DTMF to store data on the tape. DTMF is best known for its use in touch-tone dialing — the sounds you get when you dial numbers into a phone. Each number has a unique combination of two frequencies, and the system on the other end knows which frequencies correspond to which numbers and can therefore decode what’s being sent. DTMF was designed to be robust over bad quality phone lines and an 8-track definitely needs that kind of mojo.

DTMF will not provide anything like the data transfer rate that traditional FSK would; I believe FSK was generally used to store data on tapes in the early days.

Fortunately there are complete DTMF encoder/decoder chips on the market with simple microcontroller interfaces. I chose the MT8880 in tandem configuration — one for each of the stereo channels.

I breadboarded up one of these for testing…

MT8880 Breadboard
This uses the example circuit from the datasheet more or less verbatim.

For the microcontroller, I simply used an Arduino and built a shield to stick onto it out of protoboard. (Arduino, we love you, but HOW COULD YOU SCREW UP THE PIN LAYOUT? A bunch of the I/O pins don’t align with protoboard holes so you basically have to jam your protoboard onto it and bend some of the pins.)

Then it was a matter of identifying the connections on the 8-track unit itself — the audio inputs and outputs, but also the miscellaneous circuitry controlling the motor, and the switches detecting tape insertion, end-of-tape, and the current track. There’s also a great fat solenoid for switching between tracks.

(My point-to-point wiring technique on this project will probably remind you of a spider on psychoactive drugs. Sorry.)

Most of the interface between Arduino and 8-track was easy because it’s just passive switches. The tape insertion and end-of-tape switches could be wired from ground right to the Arduino, making use of the built-in pull-up resistors on those pins.

The current track switches made use of a resistor network trick to allow all 4 switches to be wired to the same analog input pin on the Arduino.

Two relays were needed — one to turn the motor on and off, and another to switch between regular speed and fast-forward. To switch each of these I used a TIP122 as in these circuits.

I mounted all of this into a chassis from an old SCSI tape drive chassis, sourced from The Hackery. I dremelled a new faceplate out of an old piece of plastic from a scrap chassis from Free Geek Vancouver and saved some parts of the old 8-track stereo for cosmetics. When completed, it looks like this:

Lo8 8-track drive
The silver button at the bottom right is the “record” button; as in the original stereo, the tape must be inserted with this button pressed to prevent inadvertent recording.

Software

This involved two programs: one on the Arduino to handle most of the actual work, and another on the computer to do some UNIX-style pipe-based I/O.

First, the Arduino software and some testing. I’ve posted the Arduino sketch on github.com.

Most of this is straight-forward: I/O pin manipulation to control aspects of the tape, a small library to interface with the two MT8880 chips, etc. However, there are two elements that were not totally trivial: handling the two audio channels, and dealing with encoding quirks.

First, the audio channels. We have one MT8880 chip for the left channel, another for the right. Each encodes 4 bits per tone, giving us a convenient 8 bits in stereo. We just need to make sure that we get information from both channels, which might be detected at slightly different times, before we send anything back to the client machine.

Second, encoding quirks. Here the picture, unfortunately, gets muddy. Some testing revealed that the MT8880 chips were generating tones just fine, but several of the generated tones, despite sounding fine to my untrained ear, do not get detected when the tape is replayed. The bad tones are almost perfectly consistent across the two channels: for whatever reason, 0×0, 0×3, 0xD, and 0xE would not get detected. On the left channel, 0×6 was also pretty unreliable.

This means my perfect 8-bits-per-tone scheme is shot. Being a software guy, I came up with a workaround in code: for the problem cases, send a two-byte sequence that can be properly decoded. (Obviously this has an impact on storage capacity but I’m content with it for now.)

On the PC side, we’re communicating over the standard Arduino serial link, so I wrote a quick-and-dirty command-line tool to interact with it: recording, playback, track selection, seek-to-start, etc.

Results

Summary: remarkably slow and less than perfectly reliable. (Isn’t that kind of what I set out to prove? I guess so.)

I experimented with different DTMF tone lengths and found that I had to turn the speed down to a crawl to get anything near reliable results. I’m sure I can do lots to improve this — tape fidelity isn’t inherently this bad — but for now it’s below typing speed.

But it works. Kind of. Maybe about as well as my Reveal-brand tape drive of yore.

(Actually, it’s not nearly as error-prone as the video shows — I think I hit a bad patch of tape here. But it has that first-take charm so I’m sticking with it.)

$ lo8 --help
Lo8 8-Track tape drive controller
Copyright (c) 2013 by Alec Smecher (http://www.cassettepunk.com)
Usage: lo8 [OPTIONS]
Options:
-b Set baud rate (default 9600)
-d Set device name (default /dev/ttyUSB1)
-tSet track number before starting
-s Seek to beginning of track before starting
-r Read data from the tape and dump to stdin
-w Write data from stdin to the tape
-e (Used with -w) Echo input to stdout
-i Query and display status information

Reading and writing may not be performed simultaneously. Tapes must
be inserted with the record button pressed in order to record, and
cannot be read in that mode.

If the -i flag is specified, information will be queried after seek
and track switching operations have been completed (if specified).

(Follow-up: I also printed custom labels to use on data tapes.)


Categorized as: Uncategorized


6 Comments

  1. […] Before [Woz] created the elegant Disk II interface for the Apple II, and before Commodore brute-forced the creation of the C64 5 1/4″ drive, just about every home computer used cassette tapes for storage. Cassette tapes, mind you, not 8-track tapes. [Alec] thought this was a gross oversight of late 1970s engineers, so he built a 8-track tape drive. […]

  2. truthspew says:

    Oh – you might have to boost the levels on the DTMF encoders. That’s a common issue.

    • admin says:

      Entirely possible. The MT8880′s decoder side does have amplification on input, with some sort of AGC, but I haven’t even gotten as far as checking the levels against the datasheet. Needs more attention.

  3. admin says:

    (A quick addendum: I built an 8-track rewinder. See < http://cassettepunk.com/blog/2013/12/11/8-track-rewinder/>.)

  4. Alex Cunneen says:

    I am planning on doing the same thing, but with cassete tapes because I don’t have any 8-track, and on a level of knowledge that even Elmer Fudd could get to, because I’m a novice coder. Am substituting Raspberry Pi for Arduino.

    • admin says:

      Alex, on the Pi you’ll have lots of options using the audio adapter to do the heavy lifting; have a look e.g. at softmodem and multimon. Good luck!

Leave a Reply