A Floppy Controller For The Raspberry Pi

The Raspberry Pi is the darling single board computer that is everything to everyone. It even has lit up the eyes of the older set with the Pi 400 mimicking the all-in-one keyboard computer design so popular in the 1980s. Another project that harkens back to that golden era is this Raspberry Pi floppy controller board from [Dr. Scott M. Baker].

[Scott] is no stranger to floppy controllers, having worked with the popular WD37C65 floppy controller IC before with the RC2014 homebrew Z80 computer. Thus, it was his part of choice when looking to implement a floppy interface on the Raspberry Pi. The job was straightforward, and done with just the IC itself. Despite the Pi running at 3.3 V and the controller at 5 V, [Scott] has found no problems thus far, implementing just a resistor pack to try and limit damage from the controller sending higher voltage signals back to the Pi. With that said, he plans to implement a proper level shifter down the road to ensure trouble-free operation long term.

The project is rounded out with a bunch of Python tools used to interface with the controller, available on Github. Performance is limited by the non-realtime nature of the Raspberry Pi’s user mode operation, which [Scott] notes could be fixed with a kernel module. With that said, if you’re looking for performance, floppies aren’t it anyway.

We do love the Pi put to use in retro tasks; it can even be a SCSI Swiss Army Knife if you need one. Video after the break.

[Thanks to Baldpower for the tip!]

 

26 thoughts on “A Floppy Controller For The Raspberry Pi

          1. Indeed, I had on hand a 3.5″ 1.44MB drive, the pair of 8″ QUME drives, some Mitsubishi high density 5.25″ drives, a slightly-less-than-half-height 360K temperamental epson SD-321, and the TM100-2A full height. The IBM 5150’s full height drives have long been my favorite and that drive has been sitting here NOS for a few years waiting to be used, so it made the video. ;)

        1. I got my first floppy drive in 1984, and it was half-height. I still have a few.

          The only full size I have are for the Apple II.

          My second to last computer, bought used in 2012, had a 3.5″ drive. My first one came in 1989. I probably have more if those than 5.25″ .

          So it sticks out, a full size 5.25″ .

  1. Scott,
    Nice project, thanks for sharing.
    Like you, I also have concerns about 5v vs 3.x V interface and the stress on the GPIO. For my application it probably needs to work for a couple of weeks.

    Anyway it seemed like you were wondering if there was another 5.25″ floppy solution.
    I don’t have these boards but was looking at buying so I thought I would share what I found..

    http://deviceside.com/fc5025.html
    https://webstore.kryoflux.com/catalog/product_info.php?cPath=1&products_id=28
    supercard pro https://www.cbmstuff.com/proddetail.php?prod=SCP

    Since I just need to read and archive , I think I shall look at your solution in more detail.

    Thanks again.

    1. You can also get (well, pre-order, or wait a few months and order, or build your own) a Glasgow, which can do nearly everything that a Kryoflux can (plus more) but without the draconian license terms

    1. Your numbers are sort of worse case scenerio which doesn’t exists IRL – part have 0 ohms output driver impedance and they drive all the way to 5V.

      These parts were meant for 5V TTL which doesn’t need to be all the way at 5V. For old parts, the output drivers are asymetrical and they have weak sourcing due to poor mobility in PMOS.

      Datasheet: VOH = 2.8V (min) @ -5mA i.e. impedance is *less than* (5V – 2.8V)/5mA = 435 ohms (upper bound)! They don’t say what’s the lower bound, but it’ll be in the hundreds of ohms range.

  2. Notably, the WD37C65 floppy controller used in this project is the Western Digital edition of the venerable classic 765 design. That’s a somewhat universal base model, as single-chip floppy disk drive controller chipsets go, that’s in everything from the Osborne One to… well, pretty much anything that needs a floppy controller chip in that sort of era.

    The original design (IIRC) was a NatSemi part and thus given the model number uPD765 (properly μPD765 for those whom substituting a modern ‘u’ for the Greek lowercase Mu gives a mental eye-twitch… also, good heavens, isn’t there a pill for that?! :P ) but it’s so universal it’s hard to list all the different ones out there. Zilog’s Z0765blahblahblah (Zilog’s chips sometimes have ridiculously long part numbers; this is one of those, go look at Wikipedia’s “Floppy-disk controller” article, they’ve got a photo, you’ll see what I mean — it’s very annoying and I’m afraid I just can’t be bothered here) is one, the WD one here is another (as mentioned previously), NEC second-sourced it as the D765… Intel’s 8272 is their version of the chip. It’s such a universal design as to be almost unavoidable in anything that needs to spin a floppy disk that’s either an 80s microcomputer or an aftermarket (OEM or otherwise) disk drive expansion to one.

    There were a number of revisions as well… the ‘765A (eg NEC D765AC for the ‘A’ revision in CMOS-process form, or Intel’s 8272A) added a few features… etc. In fact, Intel made some far more advanced ones, based on the design, culminating (IIRC) in the 82077AA CHMOS III Single-Chip Floppy Controller, a PLCC68 that could run anything from a 360k 5.25″ drive on through 2.88mb gear (4mb unformatted, and referred to such in the datasheet) and tape drives. It was designed for use with PC-AT and PS/2 system interfaces and dates to the mid-1990s… I would not be surprised if modern motherboard chipsets that still integrate floppy support (and historical ones going back to earlier days, eg Pentium 4 and even Core Solo/Duo and early Core2 setups) had something very similar to a somewhat feature-slimmed 82077AA integrated into the southbridge for that purpose…

    Wiki’s article has a photo of an IBM floppy controller card from the PC 5150 — I’m pretty sure I have one in a box somewhere that’s the same model as in the photo, and I’m pretty sure that mine, like theirs, has an NEC D765AC on it ;) I’m away from home till after Easter, though, so I’m afraid that if anyone’s interested, they’ll have to source their own cards — I’ll have long forgotten by the time I get back, I’m afraid.

    I suspect that *any* 765-based chip variant that’s reasonably close to the original — i.e., not something nearly so fancied-up as the 82077AA, which at that point is really more a derivative than a variant anyways! — such as an NEC D765AC or a Zilog Z0765whatever will work fine here as well. Do indeed mind your voltage tolerances, though! An old trick would be to run the entire thing at 3v3 instead of 5v… I mean, the datasheet doesn’t say you *can’t*, it’s within absolute maximum ratings, but it’s pretty clear that operational tolerances are meant to be essentially 4v5 to 5v5, so YMMV. Probably it will work, but will be a bit grumpy about it (i.e., it will run, but a bit slowly and with noticeably more errors than you’d otherwise get) — those old datasheets had tolerances listed that were WAY tighter than what the chips would actually handle and everyone back then knew it. You’ll likely have the most luck with CMOS-process chips in that regard… those tend to be lower on the power requirements, in general, for the work they do.

    1. Was it in the Osborne? I don’t know either way. Memory says the 765 came “later”, ie were other devices and then the 765 appeared.

      There was at least one discrete IC floppy controller in Byte, but Western Digital seemed to rule. Early enough that some needed external data separators.

      Even the controller in the PC Jr. needed an external VCO (so I assume for tge data separator).

      And the “1771” line eventually became just about one IC, nice and simple.

      There was some minor incompatibility with the 765, I forget what. But you needed a workaround either reading or writing between systems. It was the 1773 or so that was used in the Radio Shack Color Computer controller, and in the Atari ST, so there was a division.

        1. I didn’t know, I was just wondering based on timing.

          But a search shows it was the Fujitsu 8877, which is a second source for something in the WD17xx series.

          That wikipedia entry is nominally about floppy disk controllers, but deals with the 765.

          But in the”see also” section, it points to an entry for the “Western Digital FD1771”, which really amounts to disk controller ICs before the 765. And some of that runs concurrent with the IBM PC.

          The Ferguson Big Board, almost concurrent with tye Osborne 1 uses tge WD1771.

Leave a Reply to piotr_goCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.