ESDI HARD DRIVE

Ray Curci scri curci at stat.uucp
Mon Mar 27 03:23:26 AEST 1989


You say that the hard disk seems to be type 67.  How did you come to this
conclusion?  I recommend that you run the phoenix setup program and see
what setup says about your hard disk type.  Assuming that you find out that
your hard disk type is in the 1..47 range, you can then lie to the setup
program and tell it you want to change the hard disk setting.  When prompted
for the hard disk type, enter a '?' instead.  This will display a table of
hard disk types, number of cylinders, heads, landing zones, etc.  Record
this information (shift-PRINTSCREEN) and then enter the correct drive
type.  Through experimentation I have found that different BIOSes assign
different drive types to the same disk drives.  Most BIOSes agree in the
disk type 1..15 range (I guess they are patterned after the original IBM AT 
BIOS) only.

The following MSC program should tell you your hard disk types:
#include <stdio.h>
main()		/* quick&dirty program, excuse the sloppy code */
{
	int cmos12, cmos19, cmos20, drive1, drive2;
	outp(0x70,0x12);	cmos12 = inp(0x71);
	outp(0x70,0x19);	cmos19 = inp(0x71);
	outp(0x70,0x20);	cmos20 = inp(0x71);
	drive1 = (cmos12 >> 4) & 0x0f;
	drive2 =  cmos12       & 0x0f;
	if (drive1 == 0x0f) drive1 = cmos19;
	if (drive2 == 0x0f) drive2 = cmos20;
	printf("Drive C: is type %d, Drive D: is type %d\n", drive1, drive2);
	printf("Note: drive type zero indicates the drive is NOT present\n");
}

ray curci
curci at stat.fsu.edu



More information about the Comp.unix.xenix mailing list