[comp.sys.atari.st.tech] 1024-byte floppy sectors?

adamd@rhi.hi.is (Adam David) (06/15/91)

I have formatted disks with 1024-byte sectors, both by using my own version of
the Minix formatting program and with the excellent format option in Knife-ST
from Hisoft. Both in TOS (1.2) and in Minix (1.5:4) there are serious problems.
TOS cannot read any sectors with this format and displays the data damaged
dialog. Minix produces DMA error status 0 at present, but I am working on this
with a little help here and there.

1024-byte sectors are very useful on HD floppies because although it is
possible to squeeze 22 normal 512-byte sectors onto a track, this is slow
and potentially unreliable. 11 sectors of 1024 bytes each fit comfortably
on the track though, so 10% more space becomes available in a reliable format.

TOS uses a BPB to handle various media specifications. The floppy driver /
filing system must use 1024-byte cluster buffers for the standard format.
Why should it not be possible with standard TOS to use 1024-byte clusters
of one sector each? What modifications do I need to make to TOS in order to
use the larger sectors with it?

Any thoughts / suggestions welcome.

--
Adam David.
(adamd@rhi.hi.is)

ytsuji@wucc.waseda.ac.jp (Y.Tsuji) (06/16/91)

Using a 1024-byte-sector format is a waste of time. If you want disk space,
why not use cheap hard disks. Hard disks are least expensive storage media
now (1.2 giga bytes costs as little as US$2100! And you must have experienced
being asked to take charge of obsolete disks from your friends).

I actually have a driver for 1024-byte-sector MSDOS disks, but as it calls
ROM routines directly, I cannot post it to the public. I thought Adam could
have written the code blind-folded.

Tsuji

Roger.Sheppard@actrix.gen.nz (Roger Sheppard) (06/16/91)

In article <3251@krafla.rhi.hi.is> adamd@rhi.hi.is (Adam David) writes:
> I have formatted disks with 1024-byte sectors, both by using my own version of
> the Minix formatting program and with the excellent format option in Knife-ST
> from Hisoft. Both in TOS (1.2) and in Minix (1.5:4) there are serious problems.
> TOS cannot read any sectors with this format and displays the data damaged
> dialog. Minix produces DMA error status 0 at present, but I am working on this
> with a little help here and there.
> 
> 1024-byte sectors are very useful on HD floppies because although it is
> possible to squeeze 22 normal 512-byte sectors onto a track, this is slow
> and potentially unreliable. 11 sectors of 1024 bytes each fit comfortably
> on the track though, so 10% more space becomes available in a reliable format.
> 
> TOS uses a BPB to handle various media specifications. The floppy driver /
> filing system must use 1024-byte cluster buffers for the standard format.
> Why should it not be possible with standard TOS to use 1024-byte clusters
> of one sector each? What modifications do I need to make to TOS in order to
> use the larger sectors with it?
> 
> Any thoughts / suggestions welcome.
> 
> --
> Adam David.
> (adamd@rhi.hi.is)

The BIOS in the ST is set up to only read 512 byte sectors, that is
the Big problem.
I did see a program that installed a ACC that would support 512/1024
bytes sectors and you set up different drive id's, this was in the
Package called HyperFormat.

Note: some game programs use the 512/1024 sector format, this is equal
as the 11 sector format, but with out the problem of using 11 sectors.
-- 
***  Roger W. Sheppard        *    Roger.Sheppard@bbs.actrix.gen.nz  ***
***  85 Donovan Rd          *  *   At least I don't Flicker, not     ***
***  Kapiti New Zealand..    *     like a dying light globe. !       ***

rkrueger@opal.cs.tu-berlin.de (Robert 'red sea' Krueger) (06/17/91)

In article <3251@krafla.rhi.hi.is> adamd@rhi.hi.is (Adam David) writes:
> [ ... ]
>TOS uses a BPB to handle various media specifications. The floppy driver /
>filing system must use 1024-byte cluster buffers for the standard format.
>Why should it not be possible with standard TOS to use 1024-byte clusters
>of one sector each? What modifications do I need to make to TOS in order to
>use the larger sectors with it?
>
>Any thoughts / suggestions welcome.
>
The problem is as follows: 
A sector-size of 512 bytes is *hardcoded* in (older) TOS versions !
TOS can recognize other sector-sizes than 512, and reports them right
in the BPB, but internally, the floppy routines, which access the DMA
controller, expect 512 byte per sector.
So, the only solution is another TOS-Patch ...



Hope that helps !

Greetings,

   Robert


-- 
Robert Krueger  TU-Berlin  FB20 (Informatik)   
Preferred:     rkrueger@opal.cs.tu-berlin.de
UUCP:  ...!{unido,pyramid}!tub!opal!rkrueger
BITNET:        rkrueger%opal@DB0TUI11.BITNET

csbrod@immd4.informatik.uni-erlangen.de (Claus Brod) (06/17/91)

rkrueger@opal.cs.tu-berlin.de (Robert 'red sea' Krueger) writes:

>The problem is as follows: 
>A sector-size of 512 bytes is *hardcoded* in (older) TOS versions !
>TOS can recognize other sector-sizes than 512, and reports them right
>in the BPB, but internally, the floppy routines, which access the DMA
>controller, expect 512 byte per sector.

In fact, the problem is even more complicated than this: The TOS 1.0
floprd and flopwr functions could handle 1024 sector sizes! This,
however, was a side effect of the FDC command used, not a deliberate
design. Due to problems with the old solution, this undocumented features
has been removed.

It's not too hard, however, to write a 1024-bytes-per-sector floppy driver.
Actually, I've seen one some time ago; it had been sent to me for
testing purposes.

----------------------------------------------------------------------
Claus Brod, Am Felsenkeller 2,			Things. Take. Time.
D-8772 Marktheidenfeld, Germany		 	(Piet Hein)
csbrod@medusa.informatik.uni-erlangen.de
Claus_Brod@wue.maus.de
----------------------------------------------------------------------

apratt@atari.UUCP (Allan Pratt) (06/18/91)

adamd@rhi.hi.is (Adam David) writes:
>TOS uses a BPB to handle various media specifications. The floppy driver /
>filing system must use 1024-byte cluster buffers for the standard format.
>Why should it not be possible with standard TOS to use 1024-byte clusters
>of one sector each? What modifications do I need to make to TOS in order to
>use the larger sectors with it?

>Any thoughts / suggestions welcome.

You are mistaken in your belief that TOS keeps cluster buffers around. It
doesn't.  It keeps SECTOR buffers around.  The floppy BIOS assumes sectors
are 512 bytes long.  GEMDOS does not, and hard-disk partitions larger than
16MB are implemented using large logical sectors (but not large physical
sectors) with appropriate values in the BPB.  To use 1K sectors on floppies
you would have to replace the floppy BIOS completely, and include in your
TSR a routine which replaces GEMDOS's sector buffers with new buffers large
enough to handle the largest sector size in your system.  This is what the
hard disk driver has to do (except that instead of replacing the floppy
BIOS it's installing the hard-disk BIOS).

============================================
Opinions expressed above do not necessarily	-- Allan Pratt, Atari Corp.
reflect those of Atari Corp. or anyone else.	  ...ames!atari!apratt

Roger.Sheppard@actrix.gen.nz (Roger Sheppard) (06/20/91)

In article <2964@atari.UUCP> apratt@atari.UUCP (Allan Pratt) writes:
> adamd@rhi.hi.is (Adam David) writes:
> >TOS uses a BPB to handle various media specifications. The floppy driver /
> >filing system must use 1024-byte cluster buffers for the standard format.
> >Why should it not be possible with standard TOS to use 1024-byte clusters
> >of one sector each? What modifications do I need to make to TOS in order to
> >use the larger sectors with it?
> 
> >Any thoughts / suggestions welcome.
> 
> You are mistaken in your belief that TOS keeps cluster buffers around. It
> doesn't.  It keeps SECTOR buffers around.  The floppy BIOS assumes sectors
> are 512 bytes long.  GEMDOS does not, and hard-disk partitions larger than
> 16MB are implemented using large logical sectors (but not large physical
  ^^^^
Correct me if I am wrong, but should this not read 32MB ?, I thought
that this was a typo that caused this problem and was fixed in TOS 1.4

> ============================================
> Opinions expressed above do not necessarily	-- Allan Pratt, Atari Corp.
> reflect those of Atari Corp. or anyone else.	  ...ames!atari!apratt





-- 
***  Roger W. Sheppard        *    Roger.Sheppard@bbs.actrix.gen.nz  ***
***  85 Donovan Rd          *  *   At least I don't Flicker, not     ***
***  Kapiti New Zealand..    *     like a dying light globe. !       ***

apratt@atari.UUCP (Allan Pratt) (06/25/91)

Roger.Sheppard@actrix.gen.nz (Roger Sheppard) writes:
>> ...and hard-disk partitions larger than
>> 16MB are implemented using large logical sectors...
>  ^^^^
>Correct me if I am wrong, but should this not read 32MB ?, I thought
>that this was a typo that caused this problem and was fixed in TOS 1.4

It may or may not have been fixed, but because even people with TOS 1.2 and
(gasp!) TOS 1.0 want to be able to use large partitions, HDX goes to BGM at
16MB for maximum compatibility.  Otherwise you could take a 31MB, non-BGM
partitioned disk to a machine running TOS 1.2 and not be able to get at
the files.

============================================
Opinions expressed above do not necessarily	-- Allan Pratt, Atari Corp.
reflect those of Atari Corp. or anyone else.	  ...ames!atari!apratt

ONM07@DMSWWU1A.BITNET (06/27/91)

In article <2969@atari.UUCP>, apratt@atari.UUCP (Allan Pratt) says:
>
>Roger.Sheppard@actrix.gen.nz (Roger Sheppard) writes:
>>> ...and hard-disk partitions larger than
>>> 16MB are implemented using large logical sectors...
>>  ^^^^
>>Correct me if I am wrong, but should this not read 32MB ?, I thought
>>that this was a typo that caused this problem and was fixed in TOS 1.4
>
>It may or may not have been fixed, but because even people with TOS 1.2 and
>(gasp!) TOS 1.0 want to be able to use large partitions, HDX goes to BGM at
>16MB for maximum compatibility.  Otherwise you could take a 31MB, non-BGM
>partitioned disk to a machine running TOS 1.2 and not be able to get at
>the files.
>
But I really would like to know, whether such partitions DO work under TOS 1.04
(GEMDOS 0.15). I think they do, but how can I be sure?
Reason: my harddisk partitioning utility automatically switches to larger
sectors (and BGM) for partitions larger than 16 MB. But when manually editing
partition and sector sizes, it allows for 32MB partitions with 512 byte
sectors (warning, that these partitions can't be used under old GEMDOS
versions).
Is this behaviour tolerable, or should I remove this 'feature'?

>============================================
>Opinions expressed above do not necessarily     -- Allan Pratt, Atari Corp.
>reflect those of Atari Corp. or anyone else.      ...ames!atari!apratt
___________________________ cut here _____________________________________
Julian F. Reschke, Hensenstr. 142, D-4400 Muenster, Phone: ++49 251 861241
fast eMail: ONM07@DMSWWU1A.BITNET,    slow: jr@ms.maus.de (++49 251 77216)
____________________ correct me if I'm wrong _____________________________