Subject: Re: Darwin SWIM3 Floppy Driver v0.95
To: David A. Gatwood <dgatwood@gatwood.net>
From: Nyef <nyef@softhome.net>
List: port-mac68k
Date: 06/03/2002 15:50:45
On Sun, 2 Jun 2002, David A. Gatwood wrote:

> On Sun, 2 Jun 2002, Nyef wrote:
>
> > Allow me to save you some of that work:
> >
> > At http://www.dridus.com/~nyef/documents/ you will find a set of notes on
> > how to control some parts of the SWIM chip.
>
> That's really fairly good reverse-engineering work.  Let me help you out a
> little.
>
> 1.  The two modes of SWIM are IWM and ISM, not IWM and SWIM.

Okay. I just called it SWIM mode because it was new to the SWIM chip and
none of the documentation I could find even _mentioned_ a mode switch.

> 2.  Yes, HDSEL can be set in either place.  You should probably control it
> on the chip where possible, despite what classic Mac OS does.

Huh. I'd have thought that it would depend on the way the hardware is set
up. Is this a wired-OR setup?

> 3.  Be careful when using the phase line trick to determine mode.  Not
> all phase settings are safe.  It's safer to just set the mode to whichever
> mode you want, then just keep a variable that tells what mode it's in.
> :-)

Of course. Only time to use the phase line trick is making sure the mode
switch went okay.

> 4.  Need delays between accesses to the ISM cell.  Mental note: check
> and probably fix this in the MkLinux/Darwin source.  :-)

Could you elaborate on this please?

> 5.  Register glitches:
>
> -ALL- registers are read/write (at least on SWIM and I think SWIM II).
> Some have different values when reading.  The first few registers are
> identical to SWIM III except the addition of the CRC functionality when
> you write to the rError register.
>
> 0x1000 and up do not exist except on the SWIM III.  You might be seeing
> mirrors caused by non-connected address lines....

I was thinking that the read/write select was dependant on that address
bit for the SWIM I.

I'd check this stuff against what my Mac does, but my mac is broken and I
don't have the time to try and fix it right now. :-/

Thank you for the feedback. I'll try to make time over the next week or so
to work on this some more...

---------------------------
All programming can be viewed as an exercise.
---------------------------
Alastair Bridgewater
e-mail: nyef@softhome.net