I've had a floppy drive working on my Rockwell Forth system for some time now, but haven't managed to document as I'd planned to, so I thought I'd post a picture of it here in the mean time.
The motivation for this is that the Rockwell Forth ROM has built in code for floppy disk control, so the software side is done. The documentation on this shows a block diagram of possible hardware using a Western Digital 1993 controller. This particular chip requires a lot of support circuitry to interface with a drive, but the newer 1793 has all of this built in, and the data sheet says that they are register compatible. So it should be possible to build a relatively simple controller using the 1793. This was a very common floppy controller back then and most of the more modern controllers were backward compatible (The main exception being the NEC 765 controllers).
So this is what I built:
Attachment:
IMG_0055.jpg [ 2.3 MiB | Viewed 1378 times ]
And with a bit of debugging and a couple of patch wires it actually works. These controllers are not fast enough for HD disks, so it should work with most 5 1/4 inch drives and up to 720k 3.5 inch drives, but not 1.44 MB drives. One of the little tricks I discovered is that I needed to cover the HD marker hole on a 3.5 inch disk to get it to work.
There are two patch wires, one was a simple mistake where I used the wrong address line, the other was a logic error that required an inverted signal that happened to be available.
The Rockwell software uses what is now a non-standard format and it took me a while to figure out parameters that worked, but eventually I managed to get it working reliably with what is a 640k capacity on a 3.5 inch disk. This is 80 tracks, 16 sectors per track, 256 byte sectors, double sided. The software loads 1k blocks and it seems very fast. I don't have a filesystem just block read and write functions. I haven't managed to get the Forth screen editing working yet, but this is probably down to my lack of experience with Forth.
To format a 640k 3.5 inch disk I used these words:
Code:
320 B/SIDE !
80 0 FORMAT
And there is a word called R/W that can be used to read or write a 1k block.
I'm shifting houses soon, so this will have to go in a box for a few weeks at least, but I would like to try changing the format to be compatible with the IBM disk format so that I can transfer data from a PC to the Forth board. Maybe not a full FAT filesystem, but just being able to read and write Forth screens would be really useful.