| |
| Legenda |
| WORD | 2 bytes |
| DWORD | 4 bytes |
| BYTE[N] | N bytes |
| ASCII[N] | N ASCII characters |
| ASCIIZ[N] | ASCII string with zero-padding to N bytes total |
All multi-byte values are stored in Intel byte order (little-endian).
All reserved or undefined bits must be set to zero.
All the headers fields must be filled in; blank values are not allowed. |
| HDF Header |
| HDF file header - status: required |
| Offset |
Value |
Type |
Description |
| 0x00 |
"RS-IDE" |
ASCII[6] |
HDF signature |
| 0x06 |
0x1A |
BYTE |
Termination marker |
| 0x07 |
0x11 |
BYTE |
HDF revision number
Represented in BCD form: 0x11 = v1.1
|
| 0x08 |
- |
BYTE |
Flags
b0: halved sector data (only LSB of sector words is stored)
b1: ATAPI device (e.g. CDROM)
|
| 0x09 |
DOFS |
WORD |
Image data offset
This is the absolute offset in the HDF file where the actual hard-disk data dump starts.
In HDF version 1.1 this is 0x216.
|
| 0x0B |
0x00 |
BYTE[11] |
Reserved (must be set to zero) |
| 0x16 |
- |
WORD[256] |
IDE/ATA device identification data
This is the dummy sector information returned by ATA command 0xEC or ATAPI command 0xA1 (see bit 1 of the flags to determine
which is the case)
Data are stored in words using the ATA convention (big endian), e.g. ASCII string "Hello!" is stored as "eHll!o"
|
| DOFS |
- |
- |
Raw disk data dump
Tracks are stored in the following order: C0 H0, C0 H1 ... C0 H15, C1 H0, C1 H1 ...
|
Note: IDE devices transfer data in 16-bit words.
Since the Z80 data bus is only 8-bit, so some IDE adapters use additional logic to split the IDE
word into two bytes so that the Z80 can fetch them. However, other adapters
discard the most significant byte of the word completely, in favour of a
simplified circuitry; in this case, only half of the nominal capacity of a
disk sector is used. Bit 0 of the flags field is used to signal this
evenience: when it is set, it means that the sector size specified by
the IDE identification data is actually halved in the HDF file. This
is done to reduce the HDF file size, by storing only the "usable" significant
data; for all the supported adapters, the least significant byte is stored.
The IDE identification data format is reported into any IDE/ATA technical
paper. It contains information about the drive geometry (cylinders, heads,
sectors, sector size), the device model name, the supported features and so on.
|