Detecting floppy drive types and installed media is a far trickier topic than it should have been. In the ideal world, software could determine how many floppy drives are attached, what their capabilities are, and what media is installed in them, if any. In the real world, software can only accomplish some of those tasks.
Detecting whether a drive is present is the only easy part. If a (functioning) drive is present, the RECALIBRATE command will succeed. If no drive is present, recalibration will fail because the FDC will never detect the TRK0 (track 0) signal (typically after stepping 80 or so tracks). If drive presence is detected, the real fun starts. Continue reading

