Subject: Re: Floppy driver
To: Mike Schwartz <mykes@shell.portal.com>
From: Alan Bair <abair@amcu-tx.sps.mot.com>
List: amiga-dev
Date: 02/28/1994 16:05:25
Mike Schwartz writes:
> 
> I have a bit of advise here.  When I wrote MS-DOS or AmigaOS formatted
> floppies with my own drivers, I wrote two sectors on track 40 of the floppy
> to fool amigaos into thinking that the disk was indeed an AmigaOS disk but
> that it was 100% full.  My reasoning was that when someone sticks a disk in
> the drive and sees a bad volume reported by amigaos, they'd consider
> formatting it to use it :-)  With the 100% full (fill BAM sector with
> 0xffff), they saw the disk was valid and could not use DOS or some other
> program to write on the disk.
> 
> What was involved was to use ADos to format a blank floppy then use a
> sector editor to dump track 40 sectors 0 and 1 and see for yourself what
> the format is.  To add an ADOS disk label, there was an offset into sector
> 0 for a count+string
> (not null terminated) and a checksum.  Sector 1 is the bam and should be all
> 0xffff.  My floppy disk drivers would automatically skip writing or reading
> data from these two "magic" sectors.
> 
> You also have to deal with track 0, where the boot sector goes.  Otherwise
> ADOS will not see it is a valid dos disk.
> 

If bad blocks are supported for floppies under NetBSD, the special ADOS
blocks could be marked as bad to avoid requiring special code to skip them.
This could be setup when the disk is formated under NetBSD, though then the
foramting program would need the special processing code, which could be an
option. Also, it may be nice to put an ADOS name like "NetBSD_floppy" to
make it easy to know what kind of disk this is on the ADOS side.


-- 
Alan Bair             		MCTG AMCU DSCS
Motorola, Inc.            	    (Design Software &
Mail Stop OE-320		     Computer Services)
6501 William Cannon Dr. West	(512) 891-2336
Austin, TX  78735-8598          abair@amcu-tx.sps.mot.com

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