The latter 3 are possibly easier and the last must be detected first in order for the previous to be tested for.
How do we detect the Disk Drive and DOS?
How do we detect the number of Disc Drives?
How do we detect the presence of disks in an attached drive?
How do we detect the Disk Format and number of tracks/sector/sides?
Detecting Disk Drives, Disks, Disk Format and Disk System
There are surely several ways to detect all this.
You may either use "high-level" ways (e.g detecting the presence of routines in page 4), or low-level ways (detecting first where the FDC controller is located in page 3).
Same thing for the number of tracks/sector/sides: you could go "high-level", and directly read the number of track/sector/sides in the correct sector (this is OS-dependant), or go low-level and try to read several sector IDs in chosen tracks to determine if the disk has one or two sides, 40 or 80 tracks, and then 18, 17, or 16 sectors...
To detect the number of disc drives and the presence of disks, I suggest you have a look at the disassembly of Telemon (you have a commented disassembly in Guillaume Meister's "Si Telestrat système m'était conté")
Cheers,
Fabrice
You may either use "high-level" ways (e.g detecting the presence of routines in page 4), or low-level ways (detecting first where the FDC controller is located in page 3).
Same thing for the number of tracks/sector/sides: you could go "high-level", and directly read the number of track/sector/sides in the correct sector (this is OS-dependant), or go low-level and try to read several sector IDs in chosen tracks to determine if the disk has one or two sides, 40 or 80 tracks, and then 18, 17, or 16 sectors...
To detect the number of disc drives and the presence of disks, I suggest you have a look at the disassembly of Telemon (you have a commented disassembly in Guillaume Meister's "Si Telestrat système m'était conté")
Cheers,
Fabrice