formatting and checking floppy disks for bad sectors

Maciej W. Rozycki macro at linux-mips.org
Sat Jul 30 21:24:07 CDT 2016


On Sat, 30 Jul 2016, Fred Cisin wrote:

> > I highly recommend it if you're still into the floppy business
> > and don't use Linux.  The plain `format' command supplied with DOS gives
> > you little control really and produces poor performance floppies.
> 
> My PCs (original 5150 and IBM 5160 being exceptions) can handle 1:1 , reading
> 9 sectors per revolution, making no need for interleave.
> IBM and Microsoft were not UNAWARE of the concept of interleave.
> But, many machines did need it, and most early hard disks, particularly on
> 5160, called for a a little experimenting based on how YOU used it, to
> determine YOUR optimum interleave.  (Programs that changed interleave for
> performance were sometimes unaware that the optimum one could be different
> based on what you were doing with the data)
> WRONG interleave could result in needing more revolutions to read a track.

 From my experience with floppy formats and reasonably fast computers 
(i.e. where CPU processing latency doesn't really matter) the best results 
are obtained with no interleaving, no sector staggering on head switching, 
and single-sector staggering on cylinder incrementing.

 I.e. taking the the 1.44MB 3.5" format (18 sectors, 2 sides, 80 
cylinders) as an example you start track #0, #1, #2, etc. on both sides 
with logical sector #1, #18, #17, etc.  Logical sector numbers then 
increment modulo 18, plus 1 (as sector IDs start counting from 1), i.e.: 
s[n+1] = (s[n] % 18) + 1.  This is because with a fast host CPU it takes 
negligible time to issue commands to the FDC as results from preceding 
commands become available and therefore the FDC will receive a subsequent 
sector or track read (or write) command soon enough for data requested not 
to have passed under the head in rotary movement yet.  And head selection 
is instantaneous, made along a read (or write) request.

 A seek command requesting the next cylinder however requires the step 
motor to physically move the head assembly and it takes enough time to 
complete for medium to have already rotated past the next physical sector.  
So if that happened to be the logical sector requested with the next read 
(or write) command as well, then almost a full rotation would be required 
to even start executing the data transfer.  So to avoid that missed sector 
you need to stagger sectors back by one on cylinder increments, so that 
the physical sector lost due to the head movement is actually one you may 
need last and the subsequent one is the logically next one.

 Empirical data showed that a 1.44MB 3.5" floppy formatted as I described 
above took IIRC ~35s to read (or write) it whole whereas one formatted 
with the regular DOS utility required noticeably more.  Given the figures 
I quoted above we have 2+1/18 vs 3 revolutions per two-sided cylinder read 
(or written) for the staggered vs unstaggered sector layout, giving ~51s 
required for a whole floppy formatted with physical and logical sector IDs 
identity mapped.  This makes the staggered format only ~1.5 times rather 
than twice as good, contrary to what I quoted from my faded memory in my 
original statement.  Still this was not to be underrated at the time of 
regular floppy use.

  Maciej


More information about the cctech mailing list