HDSniff last updated by Roedy Green 1996/10/25 Tells you how your AT/XT hard disks were last low-level formatted. Needs no parameters. example of use: HdSniff or HDSniff | MORE or HDSniff >LPT1: or HDSniff >Temp.Dat Roedy Green Canadian Mind Products #101 - 2536 Wark Street Victoria, BC Canada V8T 4G8 tel:(250) 361-9093 mailto:roedyg@mindprod.com http://mindprod.com This program is copyrighted, however it may be copied freely and used for any purpose except military. Here is a typical output for an XT with one 72 MB hard disk: °±²Û HDSniff 2.4 Û²±° Copyright: (c) 1989-2017 Roedy Green, Canadian Mind Products May be freely copied and used for non military purposes only. Ferrets out the parameters that were used to perform the last low-level hard disk format. All numbers are both in decimal and [hex]. Low level formatting parameters for DISK 0 [0=C: 1=D:] XT style disk controller presumed 1024 [400] / 918 [396] = Number of cylinders (per drive parms/per drive table) 8 [8] / 15 [F] = Number of heads (per drive parms/per drive table) 918 [396] = Starting cylinder for reduced write current 918 [396] = Starting cylinder for write precompensation 7 [7] = Maximum bits of error burst to attempt to correct (usually 7 to 11) 2 [2] = Step control byte (bit 7 = disable retries; bit 6 = disable ECC retries) (bits 2..0 = seek step PULSE rate, faster than track-to-track seek rate) (approx 12 æs for modern buffered seeks, 3 ms for older unbuffered.) Brand Debug Init Step byte code interpreted as step pulse rate ÍÍÍÍÍ ÍÍÍÍÍÍÍÍÍÍ ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ Adaptec g=c800:ccc 3=13 æs, 2=30 æs, 5=70 æs, 4=200 æs, 0=3 ms DTC5150CRH g=c800:5 2=12 æs, 5=70 æs, 4=200 æs, 0,1,6,7=3 ms DTC5150XL g=c800:5 0=5,10,20,30,40,50,60,70 æs (cannot tell which!) IBM/Xebec 5=70 æs, 4=200 æs, 0,6,7=3 ms Omti g=c800:6 1=10 æs, 2=25 æs, 3=40 æs, 5=70 æs, 4=200 æs, 0,6,7=3 ms WD-old g=c800:5 5=70 æs, 4=200 æs, 0,6,7=3 ms WD1002-WX1 g=c800:5 3,7=10.5 æs, 2=22.5 æs, 6=28.5 æs, 1=46.5 æs, 5=70.5 æs, 4=202.5 æs, 0=3.1 ms WD10025WX2 g=c800:5 3,7=18 æs, 6=30 æs, 1=45 æs, 2=60 æs, 5=75 æs, 4=210 æs, 0=3ms WD1002-27X g=c800:5 3,7=8 æs, 1,2,4,5,6=24 æs, 0=3 ms WD1004-WX1 g=c800:5 3,7=12 æs, 6=27 æs, 1=51 æs, 2=63 æs, 5=75 æs, 4=207 æs, 0=3 ms WD1004-27X g=c800:5 3,7=8 æs, 1,2,4,5,6=24 æs, 0=3 ms WD1004A27X g=c800:5 3,7=11 æs, 1,2,4,5,6=24 æs, 0=3.3 ms WD-XT-GEN1 g=c800:5 3,7=18 æs, 6=30 æs, 1=45 æs, 2=60 æs, 5=75 æs, 4=210 æs, 0=3ms WD-XT-GEN2 g=c800:5 3,7=18 æs, 6=30 æs, 1=45 æs, 2=60 æs, 5=75 æs, 4=210 æs, 0=3ms 4 [4] = Standard timeout value 25 [19] = Formatting timeout value 10 [A] = Disk check timeout value 17 [11] / 0 [0] = sectors per track (per drive parms/per drive table) (usually 17 for MFM, 26 for RLL, 36 for ESDI) When information gleaned from get-drive-parameters (ROM BIOS INT 13 function 08) conflicts with that gleaned from get-drive-table (INT 41/46), trust get-drive-parameters. See HDSNIFF.TXT for information on interpreting these results. To see everything before it scrolls off the screen try: HDSniff | MORE or HDSniff >LPT1: or HDSniff >Temp.Dat Purpose ======= HDSniff will tell you the parameters that were used the last time your hard disk was low-level formatted. It displays information from hard disk BIOS INT 13 function 08 get drive parameters and from the INT 41/46 get drive table. This can be useful if you need to reformat your hard disk, or if you want to ensure the formatting was done correctly. The following parameters are often specified incorrectly during low level format and result is flaky operation. - Starting cylinder for reduced write current. - Starting cylinder for write precompensation. - Step control byte seek step PULSE rate, faster than track-to-track seek rate, ranging from 12 æs for modern buffered seeks to 3 ms for older unbuffered seeks. GETTING THE LATEST VERSION ========================== Look for the latest version at my Web site: http://mindprod.com Interpreting HDSNIFF Results ============================ From the drive manufacturer you must determine the number of cylinders, heads, starting reduced write cylinder and write precomp cylinder. Many BBS's also post lists of such information. If the cylinders and heads are incorrect, you are wasting part of your disk. If the RWC and WP are incorrect you might expect unreliable operation. The ECC burst length should be a number between 5 and 11. Setting it smaller is more conservative. ECC will not attempt to correct serious errors without telling you. When ECC tries to correct serious errors it does not always succeed, but it lets you carry on without notice. Setting the ECC burst length larger allows you to carry on and recover from serious errors, hough you never hear about them unless you use HDTest. When you low level format, you normally enter the step pulse rate as a code number, not the pulse rate directly. However, the DTC5150XL lets you enter the step rate directly. Normally, you must select a code corresponding to the desired step rate. If the step pulse rate is set too fast (lower number) you can expect slower response due to corrected seek errors. If the pulse rate is too slow (higher number) you can expect slower response due to the disk waiting needlessly long for pulses. Sometimes there can also be seek errors. Most AT controllers use 35 æs fixed by the motherboard BIOS. Ontrack Disk Manager offers a utility to override this. It is hard to get information about the optimal pulse rates for disk drives. As rule of thumb try 3 ms for very old drives with unbuffered seeks, 30 æs for 20 MB disks, and 18 æs for 30 to 40 MB disks, and 12 æs for premium voice coil drives. If any parameters are incorrect, you must back up everything twice, redo the low level format, the FDISK, the FORMAT C:/S/V and restore your data. HDSNIFF currently cannot tell you the interleave. Use Gibson SpinRite to determine the optimum interleave and correct it. Caveats ======= Information about the size of a disk is indirectly recorded in four separate places: 1. the drive table accessed via int 41/46 2. BIOS via int 13 ah=08 3. the partition table in the mini partition-selector boot on track 0 4. the BPB in the boot on track 0 of the DOS partition Unhappily these do not all necessarily agree. HDSniff will tell you about 1 and 2. FDisk will tell you about 3. ChkDsk will tell you about 4. I have found 2 to be the most reliable, and 1 the least. Some controllers fail to record the RWC (Reduced Write current Cylinder) and WPC (Write Precompensation Cylinder) in the drive table. If you plan to reformat your disk, get the proper values from the disk manufacturer or from tables in OnTrack software or from tables posted on BIX. If you have used a program like SpeedStor or Ontrack, and have installed their drivers in Config.Sys, they will lie for you. They fool DOS into thinking disks with more than 1024 cylinders have fewer cylinders but more heads. If there is no drive table slot for your disk, they will fake one for you. HDSNIFF sees the end result of the smoke and mirrors. In other words, HDSNIFF sees the same thing DOS does. If you wanted to see the raw results, you could use HDTest's bootload program to find your orginal INT 13 entry point and then you could modify the assembler code in HDSNIFF to look there instead of the usual redirected INT 13. Why Copyright? ============== In the past all CMP software was public domain. Now we are releasing only copyrighted software. We did this because Rockwell International (a major American defense contractor) asked my permission to use my public domain RESTORE program to distribute their software. I refused to bend my no military use rule. They told me they were going to continue using it anyway. I found out legally I had no way to stop them because we did not display a copyright notice. If there is any doubt whatsoever if your use of HDSniff constitutes military use, you must get clearance with Canadian Mind Products. Errors ====== If you discover any errors, or if you have information about a disk controller and its step pulse rates that HDSNIFF does not cover, please let us know so we can incorporate that into the next version. Windows ======= Windows lies to HDSNiff. Best to run HDSNIFF under a vanilla DOS system with as few other programs as possible running that may intercept HDSNIFF's probes and lie about the results. Help Me Help You **************** It would also be helpful if you mentioned the URL or source of where you got your copy. I want to make sure that site is kept kept up to date. -30-