Subject: Re: Floppy driver (was: Re: This week's NetBSD/amiga changes)
To: None <billc@iceCuBE.cryogenic.com>
From: Ty Sarna <tsarna@endicor.com>
List: amiga-dev
Date: 04/11/1994 02:59:01
Cc'ing the list since this is of interest... hope you don't mind Bill.

William J Coldwell wrote:
> 
> Got 2.04 RKM:Devices?  Pg. 337
> 
> 	Amiga: $00000000
> 	5.25": $55555555
> 	Amiga: $00000000 (high density)
> 	None : $FFFFFFFF

Interesting! These are inverted from the values RKM:Hardware
gives. (see page 371)

> Dunno how you're supposed to tell an HD from a normal 3.5"... sigh.. could be  
> a screw up in the manual.

It is and isn't apparently.  Since I have every kind of floppy drive on
one machine or another, I typed in the program and tried it out.  The
values above are what it reports.  the HD drive reports $00000000 for
DD floppies, $AAAAAAAA for HD floppies.  If no floppy is inserted, it
reports the value of the last floppy, or $00000000 if no floppy was ever
inserted this boot. 

RKM:Hardware reports the exact inverse values, so I guess disk.resource
inverts the values before returning them...  dunno why... 

So:
            
 3.5" DD = ~00000000 = FFFFFFFF
 3.5" HD = ~AAAAAAAA = 55555555	
 5.25"   = ~55555555 = AAAAAAAA   (listed as reserved in RKM:Hardware)
 None    = ~FFFFFFFF = 00000000   (   "   "     "      "       "     )

Just clone the 3.5" DD entry in the id table, change the number of
tracks to 40, set the id to $AAAAAAAA and change the name. Voila! 5.25"
support! That's my theory, anyway... :-)

Also, I'd have to look at the fd.c source again, but I don't think it
does HD mode correctly right now. It needs to re-read the ID whenever
the disk changes (which isn't detected, so I guess it has to be done on
every track read or write? ewww... Actually, maybe it only needs to be
checked on open. Hmm... yeah I think that would work.) Applogies if the
driver already does that.

-- 
Ty Sarna                 "As you know, Joel, children have always looked
tsarna@endicor.com        up to cowboys as role models. And vice versa."

------------------------------------------------------------------------------