Difference between revisions of "Track Dump Format"

From Ninerpedia
Jump to navigation Jump to search
(Category)
Line 226: Line 226:


This offset is not mandatory, so it should not be assumed as fixed. Neither is it mandatory that the interleave is 4:1 in all cases. DSDD images, for instance, do not show this offset.
This offset is not mandatory, so it should not be assumed as fixed. Neither is it mandatory that the interleave is 4:1 in all cases. DSDD images, for instance, do not show this offset.
=== Special format: 16 sectors ===
This format is used with the TI double density controller and the HX5102, the Hexbus floppy drive (no skew).
{| style="width:72%; text-align:center"
|-
| style="border: 1px solid black; padding:0.2ex; width:4%; background-color:#eeeeee" | 0
| style="border: 1px solid black; padding:0.2ex; width:4%" | 9
| style="border: 1px solid black; padding:0.2ex; width:4%" | 2
| style="border: 1px solid black; padding:0.2ex; width:4%" | 11
| style="border: 1px solid black; padding:0.2ex; width:4%" | 4
| style="border: 1px solid black; padding:0.2ex; width:4%" | 13
| style="border: 1px solid black; padding:0.2ex; width:4%" | 6
| style="border: 1px solid black; padding:0.2ex; width:4%" | 15
| style="border: 1px solid black; padding:0.2ex; width:4%" | 8
| style="border: 1px solid black; padding:0.2ex; width:4%; background-color:#eeeeee" | 1
| style="border: 1px solid black; padding:0.2ex; width:4%" | 10
| style="border: 1px solid black; padding:0.2ex; width:4%" | 3
| style="border: 1px solid black; padding:0.2ex; width:4%" | 12
| style="border: 1px solid black; padding:0.2ex; width:4%" | 5
| style="border: 1px solid black; padding:0.2ex; width:4%" | 14
| style="border: 1px solid black; padding:0.2ex; width:4%" | 7
|-
|}


[[Category:File Format]]
[[Category:File Format]]

Revision as of 19:41, 29 July 2018

The Track Dump Format is used in the PC99 emulator. It contains all data bytes from all disk tracks. Unlike the Sector Dump Format, this format stores the tracks "twice ascending", that is,

  • the first half of the image contains tracks 0 to 39 of side one
  • the next track is track 0 on side two, increasing to track 39 of side two.

So it counts up for each side. Thus, the track sequence of side two is reversed to the access direction of the real medium.

The format, as defined by PC99, is not a precise track image: We do not get clock patterns, so we cannot precisely know where the address marks are. Second, the Track Dump Format does not support CRC checking; the CRC bytes are always 0xF7.

The track data depend on the recording technology, which is either FM or MFM.

FM track image

Track lead-in: 0x00 (16)
repeat for each sector Pre-ID gap: 0000 0000 0000
ID Address Mark (IDAM): 0xFE (1)
Track
Head
Sector
Size: 0x01
CRC: always 0xF7F7
0xFF (11)
0000 0000 0000
Data Address Mark (DAM): 0xFB
Sector content (256)
CRC: always 0xF7F7
FF (45)
Track lead-out: 0xFF (231)

The total length of a track and the length of a DSSD disk (180 KiB) thus calculates as

tracklen = 16 + 9*334 + 231 = 3253 bytes (9 sectors per track, single density)
imagelen = 2*40*tracklen = 260240

MFM track image

Track lead-in: 0x4E (40)
repeat for each sector Pre-ID gap: 0000 0000 0000 0000 0000
0xA1A1A1
ID Address Mark (IDAM): 0xFE (1)
Track
Head
Sector
Size: 0x01
CRC: always 0xF7F7
0x4E (22)
0x00 (12)
0xA1A1A1
Data Address Mark (DAM): 0xFB
Sector content (256)
CRC: always 0xF7F7
0x4E (24)
Track lead-out: 0x4E (712)

For a typical DSDD disk (360 KiB), we get

tracklen = 40 + 18*340 + 712 = 6872 bytes (18 sectors per track, double density)
imagelen = 2*40*tracklen = 549760

Interleave

If sectors were stored in rising sequence, a single revolution of the disk would be enough to read in all sectors of the track. This requires a data rate which cannot be maintained by most systems. Therefore, sectors are put on the track with a constant interleave between. By this technique, reading all sectors of a track requires 2, 3, 4 or more revolutions.

The interleave used for 9-sectors tracks may look like this:

0 7 5 3 1 8 6 4 2


and like this on a track with 18 sectors:

0 11 4 15 8 1 12 5 16 9 2 13 6 17 10 3 14 7

When the head moves to the next track, the disk keeps rotating, so it would be better to use an offset to catch the next sector. In the track dump format, we indeed have a shift in sector numbers which looks as follows:

Track 0 0 7 5 3 1 8 6 4 2
Track 1 6 4 2 0 7 5 3 1 8
Track 2 3 1 8 6 4 2 0 7 5
Track 3 0 7 5 3 1 8 6 4 2
Track 4 6 4 2 0 7 5 3 1 8
Track 2 3 1 8 6 4 2 0 7 5
...
Track 39 0 7 5 3 1 8 6 4 2

This offset is not mandatory, so it should not be assumed as fixed. Neither is it mandatory that the interleave is 4:1 in all cases. DSDD images, for instance, do not show this offset.

Special format: 16 sectors

This format is used with the TI double density controller and the HX5102, the Hexbus floppy drive (no skew).

0 9 2 11 4 13 6 15 8 1 10 3 12 5 14 7