Subject: Re: Floppy driver
To: Niklas Hallqvist <>
From: Mike Schwartz <>
List: amiga-dev
Date: 02/28/1994 12:41:48
At 12:43 PM 2/28/94 +0000, Niklas Hallqvist wrote:
>>>>>> "Brad" == Brad Pepers <> writes:
>Brad> Here is more status info on the floppy driver. It now works well
>Brad> enough for adosfs to work on it. I can mount my amiga floppies
>Brad> and copy files from them. Here is what I haven't done:
>Nice to hear that!
>Brad> 4. Handle disk labels enough to get newfs to work
>Don't forget, You still need to recognize ADOS disks without real disklabels.
>It's easy, but don't forget it.
>Brad> My plan now is to finish cleaning up the write code and
>Brad> implement disk labels. Then I can try newfs on it and get a
>Brad> read/write fs.
>Great work!

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.