Floppy disk controller on FPGA

All off topic discussions go here. Everything from the funny thing your cat did to your favorite tv shows. Non-programming computer questions are ok too.
Post Reply
User avatar
iocoder
Member
Member
Posts: 208
Joined: Sun Oct 18, 2009 5:47 pm
Libera.chat IRC: iocoder
Location: Alexandria, Egypt | Ottawa, Canada
Contact:

Floppy disk controller on FPGA

Post by iocoder »

Hello!

I am going to write a floppy disk controller in VHDL for a school project. If anybody has interesting documents that might help me, please post it [-o< :D

I have read the pinout of the 34-pin FDD cable, however I need more information about how data transfer between the controller and the FDD could be properly synchronized. I have also read that IBM PCs use modified frequency modulation (MFM), which needs great study. Finally, I need to know exactly how IBM PC disks are formatted and what is exactly stored in the gaps between sectors.

Since I have come up with the idea, I have been searching the internet for information. However, it seems like the available information about the points above is so little or I don't use proper search keywords. Any help will be really appreciated :)
User avatar
SpyderTL
Member
Member
Posts: 1074
Joined: Sun Sep 19, 2010 10:05 pm

Re: Floppy disk controller on FPGA

Post by SpyderTL »

Most of the answers you are looking for are on Wikipedia: http://en.wikipedia.org/wiki/Floppy-disk_controller
Floppy disk controller functions (FDC)
Translate data bits into MFM or GCR format to be able to record them
Interpret and execute commands such as seek, read, write, format, etc.
Error detection with checksums generation and verification, like CRC
Synchronize data with phase-locked loop (PLL)

External hardware functions
Selection of floppy disk drive (FDD)
Switching-on the floppy drive motor
Reset signal for the floppy controller IC
Enable/disable interrupt and DMA signals in the floppy disc controller (FDC)
Data separation logic
Write pre-compensation logic
Line drivers for signals to the controller
Line receivers for signals from the controller
Phase-Locked Loop: http://en.wikipedia.org/wiki/Phase-locked_loop

MFM Encoding: http://en.wikipedia.org/wiki/Modified_F ... Modulation
Project: OZone
Source: GitHub
Current Task: LIB/OBJ file support
"The more they overthink the plumbing, the easier it is to stop up the drain." - Montgomery Scott
jnc100
Member
Member
Posts: 775
Joined: Mon Apr 09, 2007 12:10 pm
Location: London, UK
Contact:

Re: Floppy disk controller on FPGA

Post by jnc100 »

If you haven't already, I'd suggest getting a hold of the 8272A datasheet. It describes the interface between the FDC and the CPU, drive and DMA and PIC chips in detail.

Regards,
John.
User avatar
iocoder
Member
Member
Posts: 208
Joined: Sun Oct 18, 2009 5:47 pm
Libera.chat IRC: iocoder
Location: Alexandria, Egypt | Ottawa, Canada
Contact:

Re: Floppy disk controller on FPGA

Post by iocoder »

Thank you friends!

This document (AN-505 Floppy Disk Data Separator Design Guide for DP8473) is also great and has helped me a lot.

I finished a version of the controller that supports reading data from (but not writing to) the disk. The code is posted here: http://pastebin.com/w0S40FV3. I hope it helps anyone who wants to make her own FDC or learn how it works from the inside.
Post Reply