-
Notifications
You must be signed in to change notification settings - Fork 2
The TOS file system
Two important parameters in the BPB are the number of bytes per sector (BPS) and the number of sectors per cluster (SPC). They are interpreted differently by TOS and DOS/FAT but together they define the notion of Logical Sector1
On a TOS file system a Logical Sector = BPS and can range from 1024 to 81922 Bytes and the SPC is always equal to 2. On a DOS/FAT file system a Logical Sector = BPS * SPC. The BPS is always 512 bytes but the SPC can range from 2 to 128 resulting to logical sector of 1024 to 65536 Bytes. Therefore we can see that the two file systems use a different scheme to define logical sectors bigger than 512 bytes. For example a logical sector of 8192 bytes is achieved with a BPS = 8192 and a SPC = 2 on the TOS file system. The same 8192 bytes logical sector is achieved with a BPS = 512 and a SPC = 16 on the DOS file system.
Another important parameter in the BPB is the total number of sectors. On a TOS file system this number is stored as a 16-bit quantity (NSECTS parameter). This results in a maximum size of 512MB (2^16 * 8192 bytes) for a TOS partition3 On DOS/FAT file system the number of sectors can be stored as a 32-bit quantity (HSECTS parameter) allowing definition of partitions up to 2TB.
Cluster values are slightly different to DOS FAT16.
0 Unused cluster
0xFFF0 - 0xFFF7 Bad sector in cluster or reserved cluster
0xFFF8 – 0xFFFF End of file
References http://joo.kie.sk/wp-content/uploads/2013/05/Atari_HD_File_Sytem_Reference_Guide.pdf