Every DMS file starts with a header of 56 bytes. All numbers are big-endian. The layout was read from real files and from memory of the xDMS source; the table says how far each field is confirmed.
Layout
| Offset | Size | Type | Name | Description |
|---|---|---|---|---|
0x00 | 4 | text | Signature | DMS!. |
0x04 | 6 | – | Reserved | Zeros in most files. Some tools write a tag here (MaPuS, CHK0.43 seen). |
0x0A | 2 | bits | Info flags | See info flags. |
0x0C | 4 | uint32 | Date | Seconds since 1 January 1978 (the Amiga epoch), when the disk was packed. |
0x10 | 2 | uint16 | First track | The lowest disk track in the file, normally 0. |
0x12 | 2 | uint16 | Last track | The highest, normally 79. A partial disk has a smaller range (40 to 79, 0 to 39 seen). |
0x14 | 4 | uint32 | Packed size | The sum of the tracks’ packed sizes. |
0x18 | 4 | uint32 | Unpacked size | The sum of the tracks’ unpacked sizes: 901,120 for a disk, more when banner or DIZ text tracks are counted. |
0x1C | 18 | – | Creator details | Describes the machine that packed it: a serial number (u32), then u16 values for CPU, coprocessor, machine type, an unknown, clock and a speed figure. Their values vary between files; their meaning is not confirmed. |
0x2E | 2 | uint16 | Created with | The DMS version times 100: 111 is 1.11. Seen from 102 to 203. |
0x30 | 2 | uint16 | Needed version | The version needed to unpack, same scale. |
0x32 | 2 | uint16 | Disk type | 1 in nearly every file, 2 in a few, 0 in some. |
0x34 | 2 | uint16 | Compression | The mode used overall, 0 to 6 (see Compression modes). Each track states its own. |
0x36 | 2 | uint16 | Header CRC | CRC-16 of bytes 4 to 53 (50 bytes). |
Info flags
| Bit | Value | Name | Meaning |
|---|---|---|---|
| 0 | 1 | No zero tracks | Set in many files; confirmed present, meaning from xDMS. |
| 1 | 2 | Encrypted | The packed data is scrambled with a password. No file here has it. |
| 2 | 4 | Appends | From xDMS; not seen. |
| 3 | 8 | Banner | The file has a banner track. Confirmed, but many files have banner tracks without it. |
| 4 | 16 | High density | From xDMS; no high density file here. |
| 5 | 32 | PC disk | A PC (FAT) disk rather than an Amiga one. From xDMS; not seen. |
| 6 | 64 | Device | From xDMS; not seen. |
| 7 | 128 | FILE_ID.DIZ | From xDMS; not seen (the DIZ is found by its track instead). |
The CRC
CRC-16 with the reflected polynomial 0xA001 (as ARC and many others), start value
0, no final XOR. The same CRC protects the track headers and the packed data.
Not described
Parts of the header are known only from the layout of real files or from memory of xDMS.
- Reference: the meaning of the creator details at 0x1C to 0x2D, of the reserved bytes at 0x04, and of the info flag bits 2, 4, 5, 6 and 7 is not confirmed; the disk type values are not named reliably; no file has the encrypted or high density flag.
- Viewer: shows the creator details as raw numbers, names all the flag bits from memory, and unpacks no encrypted file.