mju@mudos.ann-arbor.mi.us (Marc Unangst) (01/11/90)
I had been having some problems with the MINIX hard disk driver overwriting my MS-DOS partition, which immediately followed it on the disk. Since I had modified xt_wini.c for RLL operation, I thought that might be the culprit. Turns out I was wrong... When I ran the rd_parms.c program recently posted to the net, I had a slight suprise. I am using a WD1004-27X controller hooked up to a Miniscribe 3675 (807 cyl., 6 heads, 26 sec/track). Well, instead of printing the correct values, rd_parms printed out 613 cyl., 4 heads, 26 sec/track. I decided to call up Western Digital to see what was happening. After waiting on hold for over 45 minutes, I finally got through to a tech. After explaining the problem, he told me that he couldn't help me (naturally...), but he could connect me to the engineer who designed the 1004-27X, Ashley Lo. I just got off the phone with Mr. Lo, and it seems that when you use the controller's dynamic configuration option (enter the disk parameters yourself, instead of using one of the preloaded drive configurations), it doesn't return the correct information to an INT 13 call. Instead of responding with the dynamic configuration information, it just sends back the info for the default (first) drive in the drive table, which is a 30MB RLL drive. He says that this is a known property (I'd call it a bug, but...) of the controller. He says that instead of using INT 13, you should use INT 41. The vector for INT 41 is actually a pointer to the structure of the fixed disk. I assume it's for hard disk 0; I don't know what it is for hard disk 1 (INT 46?). The information is in the following structure: Offset Size Description 0x00 WORD cylinders 0x02 BYTE heads 0x03 WORD starting reduced write cyl. (XT only) 0x05 WORD starting write pre-comp cyl. 0x07 BYTE maximum ECC burst length 0x09 BYTE standard timeout (XT only) 0x0A BYTE formatting timeout (XT only) 0x0B BYTE timeout for checking drive (XT only) 0x0C WORD landing zone (AT/PS2) 0x0E BYTE sectors/track (AT/PS2) 0x0F BYTE 0 (from Ralf Brown's _Interrupt List_, v89.1) It might be a good idea to re-write bios_wini.c (and possibly the others?) to use the INT 41 -> table method of finding out the information on the drive, instead of trusting INT 13 to return the correct info. Since the sectors/track byte is only present in AT's and PS/2's, you might still want to use INT 13 to get sectors/track (making it dynamically adapt to RLL and ARLL drives). Note that this table does not exist for ESDI drives. That isn't a big loss, however, because ESDI drives aren't supported as it is. -- Marc Unangst | "The only limit to our realization of Internet: mju@mudos.ann-arbor.mi.us | tomorrow will be our doubts of today." UUCP : ...!uunet!sharkey!mudos!mju | - Franklin D. Roosevelt Fidonet : Marc Unangst of 1:120/129.0 +--------------------------------------- BBS : The Starship Enterprise, 1200/2400 bps, +1 313 665-2832