Hi,
This question is a bit theoretical as I will probably never have a real 2.88MB floppy drive in my hands.
But I had a question about the osdev wiki floppy disk info: http://wiki.osdev.org/Floppy_Disk_Controller
What happens if you insert a 1.44MB Floppy into a 2.88MB drive?
By default I guess the fdc driver will always assume its 2.88MB, and initialise the fdc to 1mbit/s and perpendicular mode.
When this has happened, is fdc still capable of reading a 1.44MB disk?
Question about 2.88MB Floppy Drive - Initialisation
-
- Member
- Posts: 170
- Joined: Wed Jul 18, 2007 5:51 am
Re: Question about 2.88MB Floppy Drive - Initialisation
Hi,
In this way, the driver can/should auto-detect the correct data rate to use for the disk. Once that is known you can do more tests to determine if the disk is single-sided or double sided, if there's 21 sectors per track (or 18 or 15 or ...), etc.
Now imagine that you've got a list of possible disk formats - let's say there's 12 entries in your list. Before you do any tests the disk could be any of those 12 possible disk formats. After the first test (data rate detection) you can filter out formats that have the wrong data rate, and you might be left with 3 entries in your list. If all of the remaining entries are for double sided disks, then you'd skip the "try to read from the second side" test. Then, starting from "most sectors" to "least sectors", you'd figure out how many sectors there are.
Of course this doesn't work if the floppy disk has not been (low level) formatted (all tests will fail). In that case the user must tell you what they want; because the same disk could be formatted in many different ways (e.g. a 3.25 inch "extended density" disk could be formatted as 3360 KiB, 2880 KiB, 1680 KiB, 1440 KiB, 720 KiB, 640 KiB or 320 KiB), and there's no easy way to auto-detect what the user might want.
Cheers,
Brendan
You'd configure the controller for a data rate of 500 Kbps (suitable for both 1440 KiB disks and 1200 KiB disks and also the most likely choice) and attempt to read from the first sector of the disk. If the data rate is wrong you won't be able to read the disk, so you'd set the data rate to 1 Mbps (and enable "perpendicular mode") and attempt to read from the disk again. If this doesn't work either, then you'd set the data rate to 250 Kbps or 300 Kbps and try again.tom9876543 wrote:What happens if you insert a 1.44MB Floppy into a 2.88MB drive?
By default I guess the fdc driver will always assume its 2.88MB, and initialise the fdc to 1mbit/s and perpendicular mode.
When this has happened, is fdc still capable of reading a 1.44MB disk?
In this way, the driver can/should auto-detect the correct data rate to use for the disk. Once that is known you can do more tests to determine if the disk is single-sided or double sided, if there's 21 sectors per track (or 18 or 15 or ...), etc.
Now imagine that you've got a list of possible disk formats - let's say there's 12 entries in your list. Before you do any tests the disk could be any of those 12 possible disk formats. After the first test (data rate detection) you can filter out formats that have the wrong data rate, and you might be left with 3 entries in your list. If all of the remaining entries are for double sided disks, then you'd skip the "try to read from the second side" test. Then, starting from "most sectors" to "least sectors", you'd figure out how many sectors there are.
Of course this doesn't work if the floppy disk has not been (low level) formatted (all tests will fail). In that case the user must tell you what they want; because the same disk could be formatted in many different ways (e.g. a 3.25 inch "extended density" disk could be formatted as 3360 KiB, 2880 KiB, 1680 KiB, 1440 KiB, 720 KiB, 640 KiB or 320 KiB), and there's no easy way to auto-detect what the user might want.
Cheers,
Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
-
- Member
- Posts: 170
- Joined: Wed Jul 18, 2007 5:51 am
Re: Question about 2.88MB Floppy Drive - Initialisation
Thanks Brendan.