[comp.sys.mac.misc] Patching Apple HDSC Setup to work with other drives

REEKES@applelink.apple.com (Jim Reekes) (05/30/91)

In article <0E010025.bfcyib@tidbits.UUCP>, ace@tidbits.UUCP (Adam C. Engst) writes:
>   A friend just bought a new non-Apple Quantum drive and wants to
> format it with Apple's drivers so he doesn't have any strangeness
> with his internal Apple drive and System 7. I remember hearing about
> some patch that could be applied to HDSC Setup to let it see other
> drives. Can someone please mail me instructions for that? My friend
> is a developer, so there's no trouble with using file editors or ResEdit
> or anything like that.


A common question that I've answered many times with this same message..

> Can I use AppleUs HD Setup on non-Apple hard disks?

Apple designed HD Setup to only work on Apple hard disks, but itUs 
not because weUre bad guys and only what to sell Apple hard disks.  
ThatUs just a vicious rumor.  There are very good reasons in doing 
for this.

A SCSI formatter will set up the drives formatting and operating 
parameters, then formats the drive.  These options are drive, CPU, 
and driver specific.  These options include interleave, cache, 
number of retries, block size, unit attention, and so forth.  
AppleUs hard disks have all of these formatting and operating 
parameters established in the driveUs firmware as the defaults.  
This helps to reduce drive specific code that would be required in 
HD Setup.  To determine which drive HD Setup is using, it does the 
standard SCSI INQUIRY command.  This returns information on the 
drive.  HD Setup, when finding an Apple drive, will proceed with 
the format command.  Once the format is completed, it then installs 
a driver that is designed for a the installing Mac and drive.  
Therefore, HD Setup can assume the format options are the driveUs 
default options.  Only something such as interleave are CPU 
specific, and this is determined by HD Setup at format time.

If someone were to RpatchS HD Setup to use a non-Apple drive, then 
itUs very possible that the default parameters would not match the 
ones expected by HD Setup and our drivers.  SCSI drives are not 
generic and require unique formatting and driver code.  Rodime 
drives, for example, have a RfeatureS that causes a pause in the 
middle of a block transfer.  While reading from the drive in non-
polled (blind) mode, this would be a problem.  Thus a unique driver 
is required that expects this hiccup in the middle of the transfer.  
A driver expecting such a pause would not work on another disk 
drive.

As another example consider a drive that feature a cache.  The 
operation of this cache is established at format time.  (Remember 
that HD Setup assumes all of its format and run-time parameters are 
the defaults.)  If the driver was written to take advantage of the 
cache working is a certain manner, any change to this could 
introduce performance problems.  There are other operating 
parameters such as UNIT ATTENTION.  Apple recommends all drives 
have UNIT ATTENTION disabled.  The default for most drives in the 
industry is to respond to UNIT ATTENTION.  So, if you manage to 
make HD Setup format a non-Apple drive this would be a problem.  
UNIT ATTENTION mode can cause a drive to hang at boot time.  Refer 
to Tech Note #96.

As another example, certain Quantum drives have a Rfast deassertion 
of busyS flag in its operating parameters.  This is a vendor 
specific feature.  To properly set this, the formatter must know 
that it is a certain Quantum drive.  Having this flag set 
incorrectly would cause timing problems for a Mac.  So do not 
consider patching any driver or formatting software to work with a 
drive.  The software *must* be designed *exactly* for a drive.

Furthermore, the Pro series of Quantum drives do not completely 
respond to a SCSI FORMAT command.  If the drive has be previously 
formatted, the FORMAT command is ignored.  A low level format is 
necessary in order to map out any bad blocks.  Such a drive 
containing bad blocks will require a special bit set before the 
FORMAT command will have effect.

-----------------------------------------------------------------------
Jim Reekes, E.O.             |     Macintosh Toolbox Engineering
                             |          Sound Manger Expert
Apple Computer, Inc.         | "All opinions expressed are mine, and do
20525 Mariani Ave. MS: 81-EQ |   not necessarily represent those of my
Cupertino, CA 95014          |       employer, Apple Computer Inc."