[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to program IWM



phoenyx <quazar@dcnet2000.com> wrote:

> Making function calls to the chip can cause some very undesirable side
> effects to your disks (read: scrambled and/or erased). I mentioned in a
> different post about code which ejected a 3.5 disk. This post reminded me
> why the authors (and Apple) recommended it not be used. With the smartport
> it simply ejected the disk, on other computers it was known to format
> tracks. Caveat Emptor.

That example wouldn't have been using the IWM directly, but instead
using the SmartPort firmware calls.

SmartPort control code 4 was defined as EJECT some time after the
command set was invented, but earlier implementations, such as the
original Apple SCSI card, had assigned their own meaning to this code:
FORMAT in the case of the Apple SCSI card.  This was fixed with the
revision C firmware to comply with the (new) standard.

If a program wants to use the EJECT code, it has to be very careful not
to try to use this call on an original Apple SCSI card, with the
revision A or B firmware.  Luckily it is reasonably straightforward to
detect this.

If you are dealing with the IWM at hardware level, you can't affect
anything apart from floppy drives connected to the disk port.  This
limits the field of damage somewhat.

-- 
David Empson
dempson@actrix.gen.nz
Snail mail: P O Box 27-103, Wellington, New Zealand