My ongoing side quest: 5.25" 1.2 MB floppy drives via USB.
Posted by schill@reddit | vintagecomputing | View on Reddit | 21 comments
This is a proof of concept I've been working on. Demo and full explanation in the linked video.
tl;dr: It is possible, with some caveats. Format and real-time I/O works, but using PC98 (1.23 MB, 77 tracks × 8 sectors / track × 1024 bytes/sector @ 360 RPM) - not the "holy grail" of DS/DD 5.25" 1.2 MB (80 × 15 × 512.) This may be down to the chipset(s) I've been using, TBD.
A bit more detail: I'm "Shucking" the PCB from a few select USB 3.5" floppy drives, adapting the 26-pin FFC cable to a standard 34-pin "universal" floppy cable, and connecting to a Teac FD-55GFR with some jumpers set to allow dual-speed (300 and 360 RPM) and flipping the density line logic, means the 3.5" USB controller recognizes the 5.25" disk as a PC98 "3-mode" format.
I'm using an old WinXP laptop for demonstration purposes and for formatting the disks, but this set-up also works on my Mac.
This is all for fun, an experiment and a challenge. For practical and archival purposes, floppy disk I/O has largely been solved thanks to devices like the Greaseweazle which lets you do disk-at-once reads and writes via USB. What I'm trying to do is get real-time disk access working, like the real thing.
m-in@reddit
This is the job for a Raspberry Pico II basically, plus a couple level translators. There’s approximately 0 need for special chips and whatnot.
shadowcaster3@reddit
yet no one has done it yet.
m-in@reddit
I have done it several times by now lol, although for the RP2040. Always in a hacky way not worth publishing though :( Never had it in me to get something usable for wider consumption. Maybe I’ll get off my ass one day. Sorry about that.
shadowcaster3@reddit
The only practical application of adapter of this type is to read IBM PC compatible floppies from an 5.25 DD (360kb) of HD (1.2mb) format. The main point is to get it to show proper icon in windows 11 (which still exist in shell32.dll, fancy that), but I now doubt is it possible at all with USB UFD class device...
schill@reddit (OP)
I would love to nerd-snipe an electronics engineer into going down this rabbit hole, believe me!
This is one of those sneaky problem spaces: In theory, there should be no difference between theory and practice. "It's not impossible. I used to bullseye womp rats in my T-16 back home, they're not much bigger than two meters."*
The earliest USB 3.5" floppy drives I've found contain a few discrete ICs from SMSC, perhaps before SMSC themselves integrated them: a USB controller, a floppy drive controller, and some sort of flash memory for USB and related device ID / config data.
I have a number of drives with the integrated SMSC "chipset", and I have wondered if dumping the flash memory might reveal some things. The datasheet suggests that features can be enabled via the config in flash, in addition to USB VID/PID etc. Notwithstanding, this is all speculative and dependant on finding hardware that's 25+ years old.
It would be awesome to see a modern "chipset" that can implement all this stuff. I think the wrinkle is in implementing either the USB UFI spec, or doing translation for a mass storage device. As far as I'm aware, the only USB floppy drive that does mass storage is the LS-120/240 disk - which happens to have support for classic 3.5" @ 1.44 MB and such. I have one and have been hesitant to take it apart as they're quite rare.
Another approach, perhaps, could be a driver or add-on for devices like the Greaseweazle that enable the real-time I/O aspect.
(* --Yogi Berra and Luke Skywalker, respectively.)
shadowcaster3@reddit
There is no need to go for mass storage, usb UFI specs are designed exactly for this purpose.
https://www.usb.org/sites/default/files/usbmass-ufi10.pdf
medium types selector supported by standard is 720/1.25/1.44 3.5' floppies, but *Flexible Disk Page* settings have priority over the medium type setting, and is quite flexible in terms of setting heads/tracks/cylinders/bytes per sector/rotation rate/etc.. :)
schill@reddit (OP)
Agree on UFI; the LS drives are the only "exception" because they happen to also support the traditional 3.5" FDD format.
Good insight on "Flexible Disk Page" UFI settings. I have found some USB 3.5" drives that will let me format 1.2 MB (80 × 15 × 512) like you'd find on 5.25", and so that is very interesting. Not all do.
jaybird_772@reddit
You should definitely get yourself a few plastic spudgers. Not only are they the correct tool for opening and closing those little flat-flex connectors, but they're extremely useful in general once you've got them laying around.
I've considered before the possibility of just implementing USB storage on a microcontroller and interfacing that with the floppy drive, but I think formatting the disk would have to be an on-microcontroller-only thing … and because memory cards always have partition tables on Windows you'd kinda have to emulate the MBR partition table. It'd also show up as a very tiny hard drive. Not perfect, but it's the only way I can come up with to work around the shortcomings of the USB storage floppy protocols.
schill@reddit (OP)
I have some of the classic green ones from iFixIt (I think), when I took apart my first Mac Mini in 2007. Great little tools, and best to use plastic on plastic and related bits, I think.
From what I know and as you've noted, USB floppy drives implement the UFI (USB Floppy Interface) spec which its a thing unto itself. Format support is limited, but 1.44 MB is the obvious common one. I wrote more tech findings in an above comment, but the only mass storage (vs. UFI) floppy I've seen is the LS-120/240 drives which happen to support "legacy" 3.5" disks, too.
jaybird_772@reddit
I actually wonder how the legacy 3.5 formatting is done on those drives. The USB drives are literally IDE LS-120 drives with a bridge in the bespoke cable. But I'm not aware how the IDE drives get formatted either. Someone did write an IDE floppy format tool for Linux, but it's not really got much documentation with the code, and since the LS-120 didn't catch on … I considered picking one up because the USB drives are cheap and if you can print a faceplate (or have a case that doesn't need one) they're easy to turn back into internal IDE drives. Just shuck 'em.
I considered getting one because it has a very mac-like motorized eject mechanism I thought I might be able to use with a slightly modified Basilisk II to use and eject directly. That'd be fun! 😁 Waste of a failed format drive? Maybe, but I'd still have the thing if I ever needed to get data off a real LS-120 disk, and honestly teaching Basilisk II to mount and eject these things directly is probably easier than teaching Linux how to interface the 1.44MB DB-19 drive I've got sitting here. There isn't a block-device-level equivalent of FUSE so it'd have to be a kernel module. Not ideal for a tinkerer's project that's going to be of interest to maybe single-digit other people.
schill@reddit (OP)
I have one of the blue LS240 / 32 MB drives seen here - they have a regular USB cable and the bridge on the inside, vs. the earlier Mac-themed LS120 models I think you're referring to. Apparently it's "laser servo" tech on the 240s that allows increased density, and 32 MB on a traditional 3.5" floppy. My guess is the internal firmware does all the magic and compatibility. The one I have occasionally has what I think is called the "click of death" on start, but it usually works after a number of retries - or if I start the drive upside-down.
jaybird_772@reddit
I'm betting it's still IDE internally, but it might start requiring some uncommon adapters for that model. There's a couple of models of earlier mac-themed that definitely are just IDE drives with fancy connector adapters slapped on them though. And they're cheap because … who wants a USB LS120 these days?
LOL us maybe.
Drogoslaw_@reddit
So it doesn't need specialized file management software and just works like a native drive detected by the OS? Awesome.
schill@reddit (OP)
Correct. In the ideal case, it works just like a USB 3.5" drive - the controller doesn't see the difference. What I'm trying to determine is when and if there is a difference in the digital signalling and/or timing between 3.5" and 5.25" drives and logical formats. I have had some luck thus far, so it's close.
If I format a 1.2 MB 5.25" disk as 1.44 MB (long story short, you can), it works via USB. However, 1.2 MB does not under WinXP. I wrote a bunch on my findings, with some video example, above.
darthuna@reddit
I've been waiting for someone to come up with a USB solution to read/write 5.25" floppy disks directly just like a regular USB flashdrive for the last 25 years.
achbob84@reddit
Me too!
schill@reddit (OP)
I'm trying my best, after being inspired by a YouTube video myself! My hope is that my work will help inspire someone else to take it to the finish line, if nothing else.
leadedsolder@reddit
Neat project!
schill@reddit (OP)
Thank you! I recognize your name and work from some of my research, in fact; you might find the PC98 aspect of this interesting. The 3.5" 3-mode stuff has been a whole other rabbit hole.
Without spoiling the fun, you may know that the PC98 floppy format has roots in 8" floppy disks - so in theory, the 3.5" USB controller should be able to recognize PC98 on 8" and 5.25" and 3.5" media, indeed. ;)
leadedsolder@reddit
Thanks!
Yeah, the PC-98 8", 5.25", and 3.5" formats should all be interchangeable from the same image as a result of this decision.
I'm impressed that 3.5" USB floppy drives have enough recognizable guts left to drive an actual drive.
schill@reddit (OP)
I need to do a full-length video on all my research, and perhaps a blog post. The first hurdle is finding drives which have a discrete USB PCB and a 26-pin cable that connects to the floppy drive, vs. newer ones which tend to have everything on a single PCB.
The theory and ideal case is that a USB 3.5" controller can't tell the difference between a 3.5" and 5.25" drive, since they share the same pinout and cable when in a full-size desktop. However, my findings suggest there is some detail I'm missing. I am wondering if pull-up or pull-down resistors on data lines play a role in some cases.
Certain older USB 3.5" drives have a SMSC USB97CFDC IC and Flash memory "chipset" - and with those, I've had some luck. In my findings, these don't support formatting 1.2 MB (80 × 15), but can do 1.44 MB (80 × 18) and 1.23 MB (77 × 8, PC98.) That is down to how the chip implements the USB UFI protocol, and whether or not it says "format not supported."
Interestingly, I can boot my WinXP laptop into DOS on a 1.2 MB-formatted 5.25" via USB as the SMSC chip supports the USB UFI(?) BIOS boot method and I can run scandisk etc. once booted, but the same disk does not read when in Windows XP. I was inspired to try all this after seeing someone on YouTube demonstrate this using a NEC UF0001 3.5" drive, and my goal was to try to take it further.
If I format a 5.25" disk as 1.44 MB (which you can get away with using special programs) at 360 RPM on a traditional desktop tower with FDFORMAT under DOS, then it works in the 5.25" via USB set-up under WinXP with typical jumper settings. It sees the disk and can read and write. If you try to format this disk via USB, it fails and then the disk becomes unreadable. I don't think the old DOS-era "media byte" stuff plays a role in USB land, but I could be mistaken.
I have had some luck formatting 5.25" as PC98 via USB as shown using the SMSC stuff; I have not been able to format PC98 or boot using other newer, more generic USB drives - but the ones I've tested seem to read 1.44-MB 5.25" disks OK. So, it's a start.
The holy grail, of course, is being able to format and read 1.2 MB. The newer / generic 3.5" controllers I have allow formatting 1.2 MB on 3.5", but it doesn't work when a 5.25" is connected. I ultimately get a track 0 / unusable error in WinXP's command prompt, and I'm trying to figure out what is missing.