Technical information

© Jean Louis-Guérin V1.2a September 2014 Page 65 / 69
11.2.2 HDDRIVER 9.02 MBR / EMBR
For TOS&DOS partitions HDDRIVER hard disk driver uses a non-standard format for MBR / EMBRs.
The format used is a combination of DOS MBR and TOS RS formats. Yet it is designed to be
interpreted normally by Windows and DOS utilities. The format is the following
Offset
Length
Description
0x0000
440
Boot loader code. Filled with zero if disk is not bootable.
0x01B8
4
Disk signature
0x01BC
2
Checksum to render MRB bootable on Atari?
0x01BE
1
State: 0x80 = bootable, 0x00 = non-bootable
0x01BF
3
CHS address of first block in partition described in the next 3 bytes.
Head (0-254)
Sector is in bits 50; bits 98 of Cylinder are in bits 76
bits 70 of Cylinder
0x01C2
1
partition type
0x01C3
3
CHS address of last block in partition described in the next 3 bytes.
Head (0-254)
Sector is in bits 50; bits 98 of Cylinder are in bits 76
bits 70 of Cylinder
0x01C6
4
LBA of first sector in the partition in little-endian format
0x01CA
4
number of blocks in partition, in little-endian format
0x01CE
1
State = 00
0x01CF
3
Not used
0x01D2
1
partition type 05 = extended or 00 = end-of-chain
0x01D3
3
Not used
0x01D6
4
LBA relative address of next EMBR.
0x01DA
4
number of blocks for next logical partition
0x01DE
1
State: indicate the state of the partition
bit 0 when set partition exist,
bit 7 when set partition bootable
0x01DF
3
ID Name: a 3-bytes ASCII field that identifies the type of partition
GEM for regular (< 32MB) partition
BGM for big ( 32MB) partition
0x01E2
4
Offset to the beginning of the partition from the beginning of the hard disk.
0x01E6
4
Size of the partition in number of physical (512 bytes) sectors
0x01EA
1
State = 01
0x01EB
3
ID = XGM must be used
0x01EE
4
Offset to the beginning of the next subdivision from the beginning of the
entire extended partition. In number of physical (512 bytes) sectors
0x01F2
4
Size of the partition in number of physical (512 bytes) sectors
0x01F6
8
Not used set to 0
0x01FE
2
Signature = 0x55AA
In the table abos the color is used as follow: DOS interpreted, TOS interpreted.
This MBR is interpreted as follow by the DOS/FAT file system on a PC platform:
The first partition entry at location 0x01BE is a standard DOS partition entry. Therefore DOS will
find the type of partition at 0x01C2 and the location and size of the primary partition using the LBA
of first block and the length of the partition (alternatively for very old version of DOS it can use the
CHS address of first and last block).
The second partition entry at location 0x01CE is used to eventually chain multiple partitions. So the
type is set to 00 when no other partition follow or 05 to point to a next EMBR.
The third entry at location 0x01DE and the fourth entry at location 0x01EE are ignored by DOS
because the partition type = 0 at location 0x01E2 and 0x01F2. However the other bytes of this
partition entries contains values that, as we will see later, are used by HDDRIVER on the Atari.