Detecting Disk Drives, Disks, Disk Format and Disk System

If you want to ask questions about how the machine works, peculiar details, the differences between models, here it is !
How to program the oric hardware (VIA, FDC, ...) is also welcome.
User avatar
Twilighte
Game master
Posts: 819
Joined: Sat Jan 07, 2006 12:07 am
Location: Luton, UK
Contact:

Detecting Disk Drives, Disks, Disk Format and Disk System

Post by Twilighte »

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?
User avatar
Euphoric
Game master
Posts: 99
Joined: Mon Jan 09, 2006 11:33 am
Location: France

Post by Euphoric »

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
Post Reply