Technical information
© Jean Louis-Guérin – V1.2a – September 2014 Page 63 / 69
Chapter 11. Information about TOS&DOS Partitions
There is no standard for TOS&DOS partitions. They are only available with the PPDRIVER and
HDDRIVER hard disk driver but with different implementation. In this chapter we will detailed the
technique used by these two drivers.
Most of the problems of compatibility between the TOS and FAT file systems are located in the BPB
area of the Boot Sector. Following is a description of the critical parameters of the BPB:
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 Sectors
19
. On a TOS file system a logical sector can range from 512
to 8192
20
bytes (BPS from 512 to 8192) with SPC always equal to 2. On a DOS/FAT file system
the BPS is always 512 bytes but the SPC can range from 1 to 128 leading to logical sector of 1024
to 65536. 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
of 8192 and a SPC of 2 on the TOS file system. The same 8192 bytes logical sector is achieved
with a BPS of 512 and a SPC of 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 partition
21
. 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.
For more details look at TOS Boot sector and DOS/FAT Boot sector
Therefore because of the fact that the GEMDOS part of TOS does not handle correctly some of the
DOS BPS it seems that it is only possible to use partitions of up to 32MB (FAT16A) on an Atari system
(unless we use BigDOS as a replacement to GEMDOS).
To overcome this limitation the HDDRIVER and PPTDRIVER hard disk driver have defined a new type
of partitions called the TOS&DOS partitions. Both drivers use similar technique but different
implementations. Basically the idea is that a TOS&DOS partition is seen as a TOS partition, with its
own TOS boot sector, when used on an Atari machine running TOS. The same partition is seen as a
DOS partition, with its own DOS boot sector, when accessed on a PC running DOS/Windows. This
implies that a TOS&DOS partition has two boot sectors: one boot sector for TOS and one boot
sector for DOS.
Therefore the limitations of a TOS&DOS partition follow the same limitations that a TOS partition (the
most constraining one). The maximum size of a partition depends on the TOS version, the Hard Disk
drivers, and the capability of the host adapter. With recent hard disk drivers and host adapters, that
support the ICD extended command set, the maximum partition size is:
Up to 256 megabytes for TOS < 1.04,
Up to 512 megabytes with TOS ≥ 1.4, and
Up to 2GB with TOS ≥ 4.0 (Falcon).
11.1 TOS&DOS Hard Disk Layout
Partitioning and Initialization of the disk write information that defines the layout of the disk:
The Master Boot Record (MBR) defines the number of partitions and their positions on the disk.
The Reserved Sectors is optional. However, for historical reason, a partition on a TOS&DOS file
system is aligned on a cylinder boundary (Cylinder 0, head 1, Sector 1 in CHS notation). The 62
(usual value) sectors gap between them is left unused. This is not required with LBA drives, but we
need to follow this rule in order to make happy old software (MS-DOS for example).
One or several partitions.
There are two types of partitions: primary partitions and extended partitions:
A primary partition contains a number of control structures, necessary to describe the partitions,
but most of its content is the actual data.
An extended partition is a special kind of partition which itself is subdivided into primary
partitions.
19
Note that the term logical sector is used differently on Atari and PC platforms.
20
32768 for TOS4.0 on Falcon (officially supported 16384)
21
For TOS < 1.04 max partition size = 256MB (2
15
* 8192), and for TOS 4.x max partition size = 2GB (2
16
* 32768).