I've just run a little program I wrote over my disks and have got some
interesting results. My 4 drives are Conner 420, Maxtor 540, Quantum 2.4
gig, Quantum 2.4 gig. Amibios says that they are:
826 16 63
1050 16 63
4969 16 63
4969 16 63
My program says that they are:
825 16 64
524 32 64
873 16 64
873 16 64
Note that 4969 % 1024 = 873.
I therefor conclude that there is a bug in Amibios that is causing
LBA to not remap the drive correctly. Note that LBA on the 540 meg
drive is working fine, as the figures above show.
BTW, can you tell me whether there are 63 or 64 sectors per track.
I added 1 to get the # heads right, but not sure if I should do the
same with sectors. BFN. Paul.
rc is 0
tracks is 825
sectors is 64
heads is 16
attached is 4
drivetype is 227
rc is 0
tracks is 524
sectors is 64
heads is 32
attached is 4
drivetype is 227
rc is 0
tracks is 873
sectors is 64
heads is 16
attached is 4
drivetype is 227
rc is 0
tracks is 873
sectors is 64
heads is 16
attached is 4
drivetype is 227
#include
#include
int BosDriveParms(unsigned long drive,
unsigned long *tracks,
unsigned long *sectors,
unsigned long *heads,
unsigned long *attached,
unsigned char **parmtable,
unsigned long *drivetype)
{
union REGS regsin;
union REGS regsout;
struct SREGS sregs;
regsin.h.ah = 0x08;
regsin.h.dl = (unsigned char)drive;
int86x(0x13, ®sin, ®sout, &sregs);
*tracks = ((regsout.h.cl & 0xC0U) << 2) | regsout.h.ch + 1;
*sectors = (regsout.h.cl & 0x3F) + 1;
*heads = regsout.h.dh + 1;
*attached = regsout.h.dl;
*parmtable = MK_FP(sregs.es, regsout.x.di);
*drivetype = regsout.h.bl;
if (regsout.x.cflag == 0)
{
return (0);
}
else
{
return (regsout.h.ah);
}
}
static int testDriveParms(int drive)
{
int rc;
unsigned long tracks;
unsigned long sectors;
unsigned long heads;
unsigned long attached;
unsigned char *parmtable;
unsigned long drivetype;
rc = BosDriveParms(drive,
&tracks,
§ors,
&heads,
&attached,
&parmtable,
&drivetype);
printf("rc is %d\n", rc);
printf("tracks is %lu\n", tracks);
printf("sectors is %lu\n", sectors);
printf("heads is %lu\n", heads);
printf("attached is %lu\n", attached);
printf("drivetype is %lu\n", drivetype);
return (0);
}
int main(void)
{
testDriveParms(0x80);
testDriveParms(0x81);
testDriveParms(0x82);
testDriveParms(0x83);
return (0);
}
@EOT:
---
* Origin: X (3:711/934.9)
|