Turning a Teensy into a floppy controller
If you've messed around in the Commodore 64 world for even a short time, you've probably discovered that it's theoretically possible to hook up a Commodore 1541 5.25" floppy disk drive to a PC. Most of the information you come across though either talks about a specialized circuit board, or using a computer with a parallel port. While I do have plenty of older computers that have the nifty parallel port that can be used as GPIO, I was more interested in interfacing the drive through USB. Since I have gobs of various Arduinos and Arduino clones, it seemed to me that I should be able to use one of those.
At first I thought I was going to have write my own software or maybe port some software in order to do this. The trick was using the right search terms. Instead of searching for "commodore 1541 arduino" I started getting results when I used a specific model of Arduino clone, in this case "commodore 1541 teensy."
It turned out that there was something called the xu1541 cable which had evolved into the xum1541, and then into what is known as a ZoomFloppy. http://www.root.org/~nate/c64/xum1541/ It was mostly open source but all the documentation was in German. I found a YouTube video where someone was demonstrating that he had managed to build his own xum1541 with nothing more than a teensy and a cable, but no docs on where he got the software or what the wiring was.
Eventually I managed to find a forum in German where the pinout was documented and told me what firmware I needed. The firmware (another copy on archive.org) had versions for several different Arduino clones, including the Teensy 1.0 and Teensy 2.0. For the Teensy 2.0 you want the cheap_v07.zip firmware.
- PD0 to DATA
- PD1 to CLK
- PD4 to ATN
- GND to GND
After installing the Cheap3 firmware on a Teensy, when I plugged it into Windows it saw it, but needed a Windows driver. I got the driver from the ZoomFloppy site, but the included opencbm software didn't install correctly and kept giving me DLL errors when I tried to use the commands. However the official opencbm software works and was able to see the Teensy and talk to the 1541 drive!