[Coco] Biggest OS-9/Nitros-9 HD?

Robert Gault robert.gault at worldnet.att.net
Sat Sep 24 18:36:02 EDT 2005


More precisely, the size in bytes of the allocation map is specified in 
LSN0 bytes $04-$05 (DD.MAP). The OS-9 manual states,
"  Multiple sector allocation maps allow the number of sectors/clusters 
to be as small as possible for high volume media.
    The FORMAT bases the size of the allocation map on the size and 
number of sectors per cluster."

You can look that the source code for format to see how it calculates 
the size of the map. It seems to check for cluster size (DD.BIT) only if 
the initial calculation of DD.MAP would result in more than a one sector 
map. DD.BIT is a two byte value so one bit of the allocation map could 
represent 65535 sectors of 256 bytes in a stock Tandy OS-9 disk or with 
NitrOS-9 256-2048 bytes per sector hard disk, 256-512 bytes floppy.

Maximum hard disk would then be DD.TOT sectors or $FFFFFF. But the 
allocation map can accommodate DD.MAP x DD.BIT sectors or $FFFF x $FFFF 
= $FFFE0001 sectors. Clearly the limiting factor is DD.TOT so if the 
sector is 2048 bytes then the drive could be 34Geg if my math is right.

Dave Kelly wrote:

> Gene Heskett wrote:
> 
>>> byte x 8 bits = 2048 sectors of storage x 256 (sector size) = 624,280
>>> hard disk size possible.
> 
> 
> I'll accept your 524,288 if you accept that at the time I multiplied 
> that this morning I had a hurricane in the neighborhood.
> 
>>
>>
>> You are calulating how many clusters the disk can contain I take it. 
>> But kcalc gives me 524,288 clusters for 65536 (maximum FAT size) x 8
>> (bits per byte). That translates to a maximum disk size if a cluster
>> is 1, of 134,217,728 bytes.  Changing the cluster size by powers of 2
>> is one option and the code is in rbf.mn to handle this.
> 
> 
> 
> This is what I remember, although I have had a couple of dreams since I 
> first conceived this understanding :)
> 
> The storage area on the disk that tells if a sector is in use is of size 
>  sector, 256 bytes. Each bit in that sector that is set denotes that a 
> sector is in use, if the 3rd bit of the sector is set, the 3rd sector is 
> in use, and not to be overwriten.
> 
> If the above is correct then 256 x 8 = 2048 places are alloted to mark a 
> cluster in use.  Each cluster is one sector in size or 256 bites. My 
> understanding is that 48 - 5 bite date units at the end of the file 
> descripter were there only to allow the file to be spread over the 
> entire disk if needed, or where ever there was an empty sector available.
> 
> 



More information about the Coco mailing list