home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Black Box 4
/
BlackBox.cdr
/
dskstruc
/
hdsnif21.arj
/
HDSNIFF.TXT
< prev
next >
Wrap
Text File
|
1992-04-03
|
9KB
|
217 lines
HDSniff version 2.0
last updated by Roedy Green 1992/04/04
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
by Roedy Green
Canadian Mind Products
#168 - 1020 Mainland Street
Vancouver BC
Canada V6B 2T4
(604) 684-6529
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.1 █▓▒░
(C) Copyright 1989, 1990, 1991, 1992 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), 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 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.
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
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.
-30-