[net.micro.mac] About Apple's Sample SCSI driver

ephraim@wang.UUCP (pri=8 Ephraim Vishniac x76659 ms1459) (07/28/86)

After receiving the new Software Supplement on Friday, the first thing
I did (besides open the envelope) was to try out the sample SCSI disk
driver.  Porting to MDS was no problem.  Getting the drive running was
no problem.  Getting the drive to boot was a problem.

The solution (for a Rodime 652 drive) was to change the "reliable" use
of _SCSIRead to an "unreliable" use of _SCSIRBlind!  With the normal
reads, the drive always hung at boot time, with the access light on.
With blind reads, no problem.

Other tweaks:

In DiskPrime, the bounds checking incorrectly prevents you
from reading the last sector of a partition.  Change "bge" to "bgt".  I
can only conclude that neither the developer nor any beta tester tried to
scan their entire drive, otherwise this bug would have been spotted long
ago.

In RealInstall, you can free up some system heap space by adding a call
to _SetPtrSi~%to trash the area held by the installation code.  The size
to change it to is simply RealInstall-Disk.

If there's interest, I'll post source for my SCSI installer (MDS assembler)
to net.sources.mac.  To demonstrate interest, send mail to me:

Ephraim Vishniac
decvax!wanginst!wang!ephraim

ephraim@wang.UUCP (pri=8 Ephraim Vishniac x76659 ms1459) (07/31/86)

> After receiving the new Software Supplement on Friday, the first thing
> I did (besides open the envelope) was to try out the sample SCSI disk
> driver....
> 
> If there's interest, I'll post source for my SCSI installer (MDS assembler)
> to net.sources.mac.  To demonstrate interest, send mail to me:

Apparently, there is enough interest (11 messages today!).  I'll finish 
cleaning up the source over the weekend, and try to post on Monday,
August 4th.  Also, since more people have ResEdit than have MDS, I'm 
trying to make the program configurable via resource editing.  For example,
if your SCSI Format command is different from mine, you just edit the
SCMD (SCSI command) resource named "Format" using the ResEdit template
provided.  Ditto for certification, sense, read capacity, and the DDM and
DPM.  With any luck, many people won't have to hack the source.

Ephraim Vishniac
decvax!wanginst!wang!ephraim

ephraim@wang.UUCP (pri=8 Ephraim Vishniac x76659 ms1459) (08/04/86)

> > If there's interest, I'll post source for my SCSI installer (MDS assembler)
> > to net.sources.mac.  To demonstrate interest, send mail to me:
> 
> Apparently, there is enough interest (11 messages today!).  I'll finish 
> cleaning up the source over the weekend, and try to post on Monday,
> August 4th.  Also, since more people have ResEdit than have MDS, I'm 
> trying to make the program configurable via resource editing...
> With any luck, many people won't have to hack the source.

The flood of enthusiasm in my mailbox is gratifying, but there's some confusion
over what it is I'll be posting.  Note that the first article talks about 
posting source for the *installer*, not the *driver*.  The driver is
"Copyright 1985, 1986 Apple Computer."  So, I don't think I can post it.  I
will post an explanation of how I modified it to work with my drive.  To get
your own copy of the source, you can:
	1) Buy the Software Supplement, volume 1, number 3 from Apple;
	2) Download it from Compuserve or Delphi, where it is posted with
	   Apple's permission; or
	3) Petition Apple for permission to let it be generally distributed.

After some reflection (and coding), the initial posting of the installer will
be binary + documentation + ResEdit TMPL's.  I *think* I've arranged it so
that you can adapt for most drives simply by editing resources with the
templates provided.  I'm extremely curious to know whether this is really
the case - I see it as the height of Mac-ish programming.  (Nearly, anyway:
the real height would be achieved if the program contained its own facilities
for configuration.)  If the program is inadequately flexible, I'll consider
the experiment a failure and post the source for direct hacking.

The program seems to be in good shape, and I'm currently writing the docs
as fast as I can.  Stay tuned for a couple of days.

Ephraim Vishniac
decvax!wanginst!wang!ephraim