Subject: Re: Floppy driver
To: Alan Bair <>
From: Mike Schwartz <>
List: amiga-dev
Date: 02/28/1994 14:12:30
At  4:05 PM 2/28/94 -0600, Alan Bair wrote:
>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.

Sounds like the hard way to do things...  However, to label the disk, there's
an offset as I mentioned in sector 0 of track 40 where you can put any label
you want.  You need to checksum the track and store it in the right offset as

>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