Floppy Disk Controller
I recently converted an Apple IIc into a keyboard for a friend of mine, and he let me keep all of the internals. One thing that I have wanted to implement is a floppy drive, so the first thing I took off of the board was the floppy drive controller. The IWM is a single chip controller for Apple floppy drives that was used in a bunch of machines, both Apple II and Macintosh.
The chip was never made public and neither were it’s related documents, but many of them can be found online here.
Wiring it in was pretty easy, I used a free IO slot, slot 4, and the usual address and data lines. It also needs two higher frequency clocks. The Apple IIc that the chip came from used 7MHz, and the documentation says you should always use 7Mhz, but there is an 8MHz mode and I happened to have an 8MHz oscillator so thats what I used. The chip also needs a 2MHz clock which I got by halving the other clock twice.
Controlling the chip is kind of complicated. The chip doesn’t have any immediately accessible registers, instead you control the thing with soft switches. Soft switches were used a lot in Apple systems and the way they work that each switch is two memory locations. Accessing the first one clears the switch and accessing the second one sets the switch. This is implemented by having the A0 be the data bit and A3, A2, A1 as the address bits. To access the registers, there are two register select bits that have to be set using the last two switches. From there, you can read or write to one of the switches, making sure you don’t change any settings you don’t want to.
The chip communicates with the drive with serial lines for the data on the disk as well as 4 individual lines for controlling the drive itself. Each of those 4 lines is set using their own switch.
In the example below I am using the first of these lines to blink an LED.
I don’t use any write operations like sta, accessing the memory locations is all that’s needed to change the value.
Next on the list is to figure out how to power the drive. It needs 12v, 5v, and -12v. What I will probably do is find a 12v power supply and bring it down to the other voltages. I thought about using the power supply from the Apple IIc but I’d need a big card edge connector, plus I would need both the 15v external and the internal one, and on top of that both of them are more than 30 years old at this point.