how the amiga reads floppies

So I’ve forever wondered, at the hardware level, how the amiga reads floppy disks.  I’ve gotten bits and pieces over the years, but I’ve never really understood the bulk of it.

So there are four main chips involved in the floppy controller — the functions are not grouped together like they would be on a NEC765 or similar controller.

The four chips involved are:

1. 8520 Complex Interface Adapter (CIA), the ODD one, U7 on the schematics.  This is a generic I/O chip that handles a bunch of things — but specifically the control OUTPUTS from the drive to the amiga.  Commodore calls this the “disk sensing” functions.

2. 8520 Complex Interface Adapter (CIA), the EVEN one, U8 on the schematics.  Same as above, but this one handles the control INPUTS from the amiga to the drive.  Selection, control, and stepping.

3. Gary handles the state of the MOTOR of the floppy drive, and takes what write data/gates from PAULA, does some magic stuff (still working on what Gary actually does), runs it through a NAND gate configured as an INVERTER, and then pipes it to the drive.  Gary handles just disk writes, so controller to drive output.

4. Paula handles processing the incoming read data from the drive, handles the DMA including firing off interrupts to the 68K when the SYNCWORD is found, or when the DMA is complete.  Paula has the real job of doing the data separation and has a digital PLL circuit in hardware.  Note that it appears that Paula doesn’t select, turn the motor on, select sides, etc etc whatsoever.  The programmer/OS has to handle all that stuff.  Paula just brings the bits in, DMA’s them into memory, and lets the rest of the processes handle everything else.

All the MFM stuff is handled inside the trackdisk.device stored in the Kickstart ROM.  I’d like to at least partially disassemble the ROM code since thanks to emulators, the ROM files are everywhere.  Maybe I’ll let IDA have a crack at it.

I would _really_ like to see the dpll circuit setup inside Paula to see exactly how Commodore implemented it on the Amiga.  The paper I recommended a couple posts back talked specifically about design decisions surrounding DPLL and I’d love to know what methods the original engineers used.

Originally I thought the controller was almost entirely in software (and actually, the majority of it is, in fact software) — but Paula has some disk controller hardware too.  You always need to have some hardware components for turning leads off and on — but I’m not too surprised that there is some custom hardware there.

I’m ordering a A500 service manual — which I think I already have a foreign copy of — I’d like as much info as possible.


Amateur Electronics Design Engineer and Hacker


  • Hi Dom.

    I’ve traded a couple emails with Jens.

    And Dennis of Minimig fame has done some similar FPGA work.

    I actually hit the motherload today by using Google’s Patent search feature.

    Paula Patent Number 4829473


    Glenn Keller’s Data Input Circuit with Digital Phase Locked Loop, patent # 4780844

    The second one is absolutely amazing in terms of detail. It spells out EXACTLY how Paula handles the data separation and the phase & frequency error correction. It’s actually fairly complicated. I’m not surprised, however, because I’ve read other floppy controller design guides and they too implement similar procedures.

    I’ve actually been looking for this for a long time. I always thought that the functionality was software-based, and so I looked at any source I could get ahold of. In fact, the majority of the big lifting is done with hardware.

    Now in comparison to normal PC drive controllers, the amiga is still super software heavy — which makes it much more flexible.

    Thanks for the comment, Dom.

  • Hi,

    I remember I was quite impressed when I eventually got hold of Amiga Hardware reference manual, and revealed to myself (not in big detail though) how floppy things have been organized in Amiga. One word: clever!