1

I've got a Fujitsu FM-7 with an external 5.25" floppy drive unit; it has a pair of 40-track, double-sided, double-density¹ drives. These use a fairly common low-level track format: the standard "IBM MFM" (as the HxC software calls it) encoding described in this answer, or in other words just like the IBM PC except with 256 byte instead of 512 byte sectors.

It would be handy if one of my modern Linux PCs could do read sector, write sector and track format operations on these disks.² (I am not concerned about anything beyond this; I am not looking for software that understands filesystem formats.) Ideally I'd have a choice of sector sizes (allowing me to use both the 256-bytes/sector formats used by the FM-7, the NEC PC-8001, and many other 8-bit machines, and the 512-bytes/sector formats used by the IBM PC and similar), but I'm open to solutions that use only one sector size of 128, 256 or 512 bytes.

The best approach I can think of off-hand is is to connect a floppy drive to a disk controller chip along the lines of a Fujitsu MB8877 or Western Digital WD1770 (which is actually exactly what my external drive unit does), and then program a microcontroller or Arduino board to handle the interface.³ It would exchange commands and sector data with the PC (probably just via a USB serial interface) and directly drive the low-level interaction (which is timing-dependent) with the disk controller chip.

Are there existing solutions out there that do this? What are my other options? An indication of approximate cost (for devices or major parts) would also be appreciated.

Most of my PCs are laptops, and I would prefer something that could work with those, but I do have both a Linux and a Windows desktop machine with PCI-X slots available, if necessary. Sadly, my main Linux desktop (using an ASUS P8H61MX motherboard), even though it's getting on more than ten years old, has no on-board floppy controller, but solutions using PC floppy controllers might be useful to others. (Or perhaps you can provide a pointer to a way to connect a floppy controller usable for this purpose to a modern PC.)


¹ Yes, I know that the drives and diskettes themselves are not double-density; it's the FM vs. MFM encoding that determines the density, but this phrasing seemed the easiest way to get across the information I'm trying to express.

² If a solution can't provide sector-level reads and writes to the disk itself, full-track reads and writes would also be acceptable, though not preferred. But that solution would also have to provide a way to get sectors out of the track, let me change or replace the data in them, and then write out the new track to the disk.

³ I'd also be happy to use a parallel port or GPIO interface on the PC itself for this, but I worry about timing problems even with a traditional parallel port, much less the USB versions I'd be using on my laptop.

cjs
  • 25,592
  • 2
  • 79
  • 179
  • Given your proposed solution, I take it you’re specifically interested in an external drive controller with a /dev/fd0-style interface, rather than a streaming controller such as a KryoFlux or SCP or FluxEngine, is that correct? – Stephen Kitt Jan 29 '20 at 05:43
  • @Stephen It sounds like you're talking about devices that would require I read and write only full tracks, rather than being able to read/write individual sectors (after the initial track format), is that right? It's not preferable, but I'm open to the idea. I'd kinda dismissed the KyroFlux because it's very expensive, but it sounds like the FluxEngine might work out just fine for me. I'll investigate it! – cjs Jan 29 '20 at 05:52
  • Yes, those devices are all track-based. – Stephen Kitt Jan 29 '20 at 06:00
  • 1
    What are you trying to achieve? Do you want to exchange floppies or floppy images between the FM-7 and your PC? The FM-7 has a serial interface, won't this be enough eventhough slow to transfer data? – the busybee Jan 29 '20 at 08:04
  • @thebusybee In this particular instance, I need to get data (particularly code I write) on to and off of my FM-7. If you want to buy me an FM-7 serial card, be my guest. That solution isn't exactly scalable when multiple different are involved, though. – cjs Jan 29 '20 at 09:48
  • Well, I just looked at the wikipedia page about the FM-7 and found the entry about the serial interface. My fault, I didn't dig deeper. :-} I'm trying to think outside the box: What interfaces does your machine have else? -- If you happen to connect a 5.25" drive to a PC with a floppy controller, it might be interesting to see what Linux can do with it. At least my experiments with Qemu often show floppy drives in the virtual machines, and Qemu might just emulate the standard 765 derivative. – the busybee Jan 29 '20 at 10:33
  • If you have a computer with an actual floppy controller, Linux does let you set arbitrary floppy parameters, but not the sector size. FreeBSD lets you set arbitrary floppy parameters, including sector size. They even give an example setting a 128 byte sector size for 8" floppies: https://www.freebsd.org/cgi/man.cgi?query=fdcontrol&sektion=8&apropos=0&manpath=FreeBSD+12.1-RELEASE+and+Ports –  Jan 29 '20 at 10:56
  • Linux is capable of accessing floppies with sector sizes other than 512 -- even if it isn't exposed through setfdprm, you can use the FDRAWCMD ioctl to issue commands directly to the floppy controller. LibDsk does this, for one. – john_e Jan 29 '20 at 11:11
  • @thebusybee Don't worry about X-Y problems on this one; I do know of other methods (e.g., direct DMA through the expansion bus or serial via printer status inputs), but I'm particularly interested in this one, even if I end up doing data transfers in a different way in the long run. – cjs Jan 29 '20 at 11:58
  • No problem. It seems you've got enough pointers now. – the busybee Jan 29 '20 at 12:04
  • As for using the (now orphaned) Linux floppy driver, that's certainly worth an answer. But it does appear that my main desktop machine's motherboard, an ASUS P8H61MX which is getting on ten years old, has no built-in floppy controller. – cjs Jan 29 '20 at 12:11
  • Ugh. I don't think there's the solution you are looking for. I'd be thinking Gotek or a vintage PC. Or, more interestingly, a DriveWire 4 client port to the FM-7. – Brian H Jan 30 '20 at 01:16
  • @BrianH Perhaps you can expand your comment into an answer giving details? I'm not clear on how a Gotek would be used to read/write (rather than replace) a real floppy disk, and neither of the two "DriveWire" devices I found in a search seem to be what you're talking about. – cjs Jan 30 '20 at 02:14
  • @CurtJ.Sampson DriveWire 4 available here. Being essentially a 6809 client program, I think it should be friendly to port. The server runs on all modern OS's (it's Java). – Brian H Jan 30 '20 at 13:38
  • @BrianH DriveWire looks like a very cool program, but I'm not clear on how I can use it on a modern PC to read and write floppy disks that will then be readable/writable on my FM-7. perhaps you could write up an answer that gives a more detailed expanation of how this would work? – cjs Jan 30 '20 at 14:20

0 Answers0