Zeus SCSI driver patch program
------------------------------

  This archive contains some programs that attempt to apply a patch to the
Progressive Peripherals Incorporated Zeus SCSI driver.  This patch includes
a patch to use the Wait/Signal mechanism to wait for the completion of SCSI
I/O instead of the "busy-wait" poll method used by the driver.  (These
programs will only patch the 2.98 version of the Zeus ROM.)

  I have occasionally had AmigaDOS not recognize a file as an executable
file when I am running with all these patches installed.  I haven't been
able to isolate the problem to determine which program is causing the
problem (i.e. the Zeus patches or the Zeus memory configuration).  If the
command is run again, it usually works fine.
[This problem may have now been fixed.  In tracking down a problem with
occasional corruption of SCSI reads, it looks like the same problem could
have caused the "non-executable" file errors.]

ZeusSCSIfix
-----------

  This program is a replacement for the SCSIpatch_Zeus program that was
supplied by PPI on their software disk.  This program is called ZeusSCSIfix
to distinguish it from the PPI-supplied patch program.  (The version of
SCSIpatch_Zeus I have is 2.985.)  The ZeusSCSIfix program contains all
the fixes of SCSIpatch_Zeus and adds the following changes:

    Use of Wait/Signal to wait for SCSI I/O completion.  Data cache is now
	turned off if the data buffer does not start and stop on a 16 byte
	boundary.  This prevents the possibility of stale data in the data
	cache being incorrectly written back to memory.

    Does not allow an invalid io_Command value of 32 (which the SCSIpatch_Zeus
        program appears to do).

    Returns the actual data transfer length in the scsi_Actual and
        scsi_SenseActual fields for SCSI-direct commands.  (It doesn't
        set the io_Actual field for reads & writes yet, but that will
        probably be added in the near future.)

  
  ZeusSCSIfix is also linked with the SAS/C cback.o startup file, so it can
just be executed from the CLI command line and will detach itself from the
CLI.


PatchZeus
---------

  This program is an alternative to ZeusSCSIfix.  It currently does not
contain all the fixes applied in SCSIpatch_Zeus (specifically the additional
command ??).  It does include the Wait/Signal fix and the SCSI-direct
scsi_Actual/scsi_SenseActual fix.  One advantage of this program is that it
will install itself as a resident module in the KickMemPtr list.  In this
manner, it will survive a reboot and apply the patches when all the resident
modules are initialized, so the patches will be made to the driver early in
the boot process.
  If you encounter a problem with this program installed and your machine
fails to reboot, you can inhibit the program from initializing during the
boot by holding down the left mouse button.  You can remove the resident
program with the KickLoad program included in this archive.
  This patches several things in the PPSscsi2.device driver:
    o Uses Wait()/Signal() instead of a busy poll to wait for I/O completion.
    o Sets the scsi_Actual and scsi_SenseActual fields for scsidirect I/O
      to the actual length of data transferred.
    o Correctly compares the partition name against any current existing
      devices (i.e. allows you to name partitions on separate disks with the
      same name and should correctly adjust the names of duplicate partitions).
      [The comparison is still case-sensitive though - this should be changed
      to be case-insensitive.]
    o Attempts to handle devices that don't respond to a select with ATN
      (i.e. older SCSI devices ignore the ATN and go directly to command
      phase after being selected).
    o OpenDevice will return HFERR_NoBoard if the unit number is >= 100.
    o Scsidirect returns HFERR_BadStatus when the CheckCondition bit was
      set in the Status byte.
    o Synchronous transfer rate of 100usecs is requested instead of 120usecs.
      [I don't know if this will work correctly or not - it appears to
      be working fine on my MXT540SL drive.]
  One "bug" that I haven't addressed yet is that if the driver ever needs
to reset the SCSI bus (which it will do under some error conditions), the
synchronous transfer is never re-negotiated.
  Another bug I have run into (which I haven't tried to fix yet) is if the file
system information in the RDB blocks is corrupt, the driver will loop when
trying to process the file system load blocks.  The PPI SCSI_Toolbox program
can corrupt the RDB blocks if you attempt to set up a custom file system
without having a valid filesystem name defined.  I and two other people ran
into this when attempting to set up NetBSD partitions which use the custom
file system to set up a special DosType field used by NetBSD.

PatchZeus2
----------
  This program is similar to PatchZeus, except that it initializes later
in that bootup sequence.  It replaces the interrupt handler and BeginIO()
routines like the PPI patch program, except it does it before AmigaDOS starts.
Like PatchZeus, it will not install the patch if the left mouse button
is down during the startup process.  This patch can be installed with the
PatchZeus program - PatchZeus will apply its patches before the driver
initializes (fixing a couple of problems in the initialization code) and
PatchZeus2 will replace the interrupt handler and BeginIO() code after the
driver has initialized.  This program uses the same code at ZeusSCSIfix, so
it provides the same patches as that program, except that the patches can
be applied when the Amiga is rebooted.

ConfigMem
---------

  This is another Zeus utility I wrote that will configure the 32 bit memory
(similar to Init040), but is also a resident module program and will add the
32 bit memory very early in the boot process.  This provides the advantage
of having 32 bit memory available for loading device drivers and library
vectors.  This program is not generalized yet, so it will not work as-is
if you are autoconfiguring any Zeus memory.  It assumes that all the Zeus
memory is going to be added as 32 bit memory.  It also won't work with the
FASTROM option of Init040.  The source is included, so it could be modified
to fit whatever configuration you would like.
  Again, if you encounter a problem with this program installed and your
machine fails to reboot, you can inhibit the program from initializing
during the boot by holding down the left mouse button.  You can remove the
resident program with the KickLoad program included in this archive.


KickLoad
--------

  This program was originally written to install resident modules into the
KickMemPtr list and to remove the entire KickMemPtr list.  I'm including it
here so the ConfigMem and PatchZeus modules can be removed without requiring
a power-off of the Amiga.  To remove all resident modules, just enter the
command:
    kickload -clear
It should respond with a list of the resident modules it finds and indicate
that they have been removed.

----
  Sources to KickLoad, ConfigMem, and PatchZeus are included, but the other
programs are based on the PPI patch program and I am reluctant to provide
them at this time.

Michael
-- 
Michael L. Hitch			INTERNET:  osymh@montana.edu
Computer Consultant			BITNET:  OSYMH@MTSUNIX1.BITNET
Office of Systems and Computing Services
Montana State University	Bozeman, MT	USA
