🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.atari.st
Article #32311

Re: Strange bug in FAT allocation

#32311
From: Allan Pratt
Date: Mon, 02 May 1988 18:09
42 lines
2488 bytes
From article <211@actisb.UUCP>, by federico@actisb.UUCP (Federico Heinz):
> ... the boot sector
> information (both TOS and MS-DOS) says that the floppy has 5-sector
> FATs, although 3 sectors would suffice.  Then I discovered why no files
> were found.  The boot sector information said 5-sector FATs and 7-sector
> root directory, ...
>
> but looking at the first sectors of the floopy I saw that the names of
> the files I had copied were written in sector #7, and that the first
> allocated cluster started in sector #14, which are the correct values
> for a 3-sector FAT disk!

Does your formatter put a unique (or at least random) serial number on
the disk, even when you ask for an MS-DOS boot sector? If it doesn't,
you're in trouble.  The ST checks the serial number AND NOTHING ELSE to
detect media change, and if the serial number is the same, it doesn't
reload any of the other information.  So if a disk goes from a three-
sector FAT to a five-sector FAT without changing its serial number,
the ST won't know of the change.

Incidentally, the format code *is* smart enough to set the media's
state to "maybe changed" when you format or write to the boot sector.
But if the serial number is the same, the state goes from "maybe"
to "not changed" without reloading the BPB.

Does MS-DOS *require* the words MS-DOS (or something) in the "OEM"
field? It's the last three bytes of this field which TOS uses for the
serial number.

I know three sectors is enough for a FAT.  One possible explanation for
the five-sector FAT is so on a double-sided disk, the first sector of
the root directory is on Side 1, not Side 0.  Otherwise, you could
use a single-sided drive to write to a double-sided disk, until you
actually tried to write the data: the file-create could succeed.

That is just one hypothesis; only apple!landon knows for sure.  But
whether he thought of it or not, it's sufficient justification for me to
keep that "feature" in GEMDOS. 

============================================
Opinions expressed above do not necessarily	-- Allan Pratt, Atari Corp.
reflect those of Atari Corp. or anyone else.	  ...ames!atari!apratt
Technical Details
Message-ID: <1051@atari.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!portal!atari!apratt
References: <211@actisb.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!portal!atari!apratt
From: apratt@atari.UUCP (Allan Pratt)
Newsgroups: comp.sys.atari.st
Subject: Re: Strange bug in FAT allocation
Message-ID: <1051@atari.UUCP>
Date: 2 May 88 18:09:08 GMT
References: <211@actisb.UUCP>
Organization: Atari Corp., Sunnyvale CA
Lines: 42