<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.temlib.org/AtariForumWiki/index.php?action=history&amp;feed=atom&amp;title=DISK2DFI</id>
	<title>DISK2DFI - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.temlib.org/AtariForumWiki/index.php?action=history&amp;feed=atom&amp;title=DISK2DFI"/>
	<link rel="alternate" type="text/html" href="https://www.temlib.org/AtariForumWiki/index.php?title=DISK2DFI&amp;action=history"/>
	<updated>2026-05-02T07:39:56Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.2</generator>
	<entry>
		<id>https://www.temlib.org/AtariForumWiki/index.php?title=DISK2DFI&amp;diff=12424&amp;oldid=prev</id>
		<title>&gt;Wongck at 13:14, 11 October 2011</title>
		<link rel="alternate" type="text/html" href="https://www.temlib.org/AtariForumWiki/index.php?title=DISK2DFI&amp;diff=12424&amp;oldid=prev"/>
		<updated>2011-10-11T13:14:32Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 09:14, 11 October 2011&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l431&quot;&gt;Line 431:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 431:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Back to [[Disk-Imagers]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Back to [[Disk-Imagers]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;br /&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:Data Formats]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:Disk Imaging]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>&gt;Wongck</name></author>
	</entry>
	<entry>
		<id>https://www.temlib.org/AtariForumWiki/index.php?title=DISK2DFI&amp;diff=12423&amp;oldid=prev</id>
		<title>&gt;Zorro 2 at 14:21, 2 November 2006</title>
		<link rel="alternate" type="text/html" href="https://www.temlib.org/AtariForumWiki/index.php?title=DISK2DFI&amp;diff=12423&amp;oldid=prev"/>
		<updated>2006-11-02T14:21:07Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
Formatted Disk Image (FDI) file format version 2.0 description (1st revision) &lt;br /&gt;
&lt;br /&gt;
Words, 3-byte values and Double-words are always big-endian, that is most-significant byte stored at the lowest address. &lt;br /&gt;
&lt;br /&gt;
1. File Header &lt;br /&gt;
2. Track Description &lt;br /&gt;
3. Types 0xDn and 0xFn: raw FM/GCR/MFM data track &lt;br /&gt;
4. Type 0xCn: FM/GCR raw decoded-data track &lt;br /&gt;
5. Type 0xEn: MFM raw decoded-data track &lt;br /&gt;
6. Type 0x8n-0xBn: pulses-index streams track &lt;br /&gt;
1. File Header &lt;br /&gt;
The header is at least 512 bytes in size. &lt;br /&gt;
&lt;br /&gt;
Offset Name &lt;br /&gt;
Size &lt;br /&gt;
in &lt;br /&gt;
bytes &lt;br /&gt;
Value Description &lt;br /&gt;
+ 0 signature 27 &amp;quot;Formatted Disk&amp;quot;, &lt;br /&gt;
&amp;quot; Image file&amp;quot;, &lt;br /&gt;
0xD,0xA &lt;br /&gt;
File signature &lt;br /&gt;
+ 27 creator 30 0x20 by default Creator's signature. For example: &lt;br /&gt;
&amp;quot;ApH's Disk2FDI PC version 0.97&amp;quot; &lt;br /&gt;
+ 57 CR 2 0xD,0xA &lt;br /&gt;
+ 59 comment 80 0x1A by default Comment describing the disk image contents &lt;br /&gt;
+ 139 EOF 1 0x1A End Of File (for DOS &amp;quot;type&amp;quot; command) &lt;br /&gt;
+ 140 version 2 2,0 Image version number &lt;br /&gt;
+ 142 ltrack 2 ? Last track in image (number of tracks - 1) &lt;br /&gt;
+ 144 lhead 1 ? Last head in image (number of heads - 1) &lt;br /&gt;
+ 145 type 1 ? 0=8&amp;quot;, 1=5.25&amp;quot;, 2=3.5&amp;quot;, 3=3&amp;quot; &lt;br /&gt;
+ 146 rotspeed 1 ? Base rotation speed - 128 (in rotations/min) &lt;br /&gt;
+ 147 flags 1 0000 00?? Flags &lt;br /&gt;
=1 =&amp;gt; Disk is write protected &lt;br /&gt;
=1 =&amp;gt; Image is index-synchronized &lt;br /&gt;
Reserved for future use &lt;br /&gt;
+ 148 tpi 1 ? TPI: 0=48, 1=67, 2=96, 3=100, 4=135, 5=192 &lt;br /&gt;
+ 149 headwidth 1 ? In TPI equivalent: 0=48, 1=67, ..., 5=192 &lt;br /&gt;
+ 150 reserved 2 0 Reserved for future use &lt;br /&gt;
+ 152 &lt;br /&gt;
-XXX &lt;br /&gt;
tracks 2T See section 2 Tracks description (90 double-sided cylinders reserved &lt;br /&gt;
in first 512 bytes) &lt;br /&gt;
cylinder-ordered, then head-ordered for each cylinder &lt;br /&gt;
&lt;br /&gt;
If there are more than 180 tracks, then one or more 512-byte blocks are allocated for the extra tracks. &lt;br /&gt;
&lt;br /&gt;
ï¿½&lt;br /&gt;
2. Track Description &lt;br /&gt;
For each word in the &amp;quot;tracks&amp;quot; field of the header: &lt;br /&gt;
&lt;br /&gt;
Offset Name &lt;br /&gt;
Size &lt;br /&gt;
in &lt;br /&gt;
bytes &lt;br /&gt;
Value Description &lt;br /&gt;
+ 0 type 1 ? Track type: &lt;br /&gt;
&lt;br /&gt;
The FDI 2.0 specification features 3 levels of data representation.&lt;br /&gt;
Lower levels offer a richer representation, especially for non-standard or protected tracks.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
- High-level types:&lt;br /&gt;
0x0=blank track (size field should be 0)&lt;br /&gt;
0x1=standard Amiga double-density track&lt;br /&gt;
0x2=standard Amiga high-density track&lt;br /&gt;
0x3=standard ST double-density 9-sector track&lt;br /&gt;
0x4=&amp;quot;standard&amp;quot; ST double-density 10-sector track&lt;br /&gt;
0x5=standard PC double-density 8-sector track&lt;br /&gt;
0x6=standard PC double-density 9-sector track&lt;br /&gt;
0x7=standard PC high-density 15-sector track&lt;br /&gt;
0x8=standard IBM high-density 18-sector track&lt;br /&gt;
0x9=standard IBM extra-high-density 36-sector track&lt;br /&gt;
0xA=standard C= 1541 track&lt;br /&gt;
0xB=standard DOS 3.2.x- disk ][ track&lt;br /&gt;
0xC=standard DOS 3.3+ disk ][ track&lt;br /&gt;
0xD=standard Apple GCR 3.5&amp;quot; track&lt;br /&gt;
0xE=standard IBM single-density 10-sector track&lt;br /&gt;
0xF-0x7F=reserved for future use&lt;br /&gt;
- Mid-level types:&lt;br /&gt;
0xCn=FM and/or GCR raw decoded-data track&lt;br /&gt;
0xDn=raw FM and/or GCR data track&lt;br /&gt;
For types 0xCn and 0xDn, n=bit rate:&lt;br /&gt;
0=125Kbit/s&lt;br /&gt;
1=150Kbit/s&lt;br /&gt;
2=250Kbit/s&lt;br /&gt;
3=300Kbit/s&lt;br /&gt;
4=500Kbit/s&lt;br /&gt;
5=Apple 3.5&amp;quot; GCR, tracks 48-63 (281.25Kbit/s)&lt;br /&gt;
6=Apple 3.5&amp;quot; GCR, tracks 32-47 (312.5Kbit/s)&lt;br /&gt;
7=Apple 3.5&amp;quot; GCR, tracks 16-31 (343.75Kbit/s)&lt;br /&gt;
8=Apple 3.5&amp;quot; GCR, tracks 0-15 (375Kbit/s)&lt;br /&gt;
9=Commodore 1541 speed zone 1 (tracks 25-30)&lt;br /&gt;
10=Commodore 1541 speed zone 2 (tracks 18-24)&lt;br /&gt;
11=Commodore 1541 speed zone 3 (tracks 1-17)&lt;br /&gt;
12-14=reserved for future use&lt;br /&gt;
15=implied bit rate&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
0xEn=MFM raw decoded-data track, upward compatible with FDI version 1.0: &lt;br /&gt;
tracks imaged into type 0xEn version 2.0 will work with a software designed for type 0xEn version 1.0. &lt;br /&gt;
0xFn=raw MFM data track &lt;br /&gt;
&lt;br /&gt;
For types 0xEn and 0xFn, n=bit rate:&lt;br /&gt;
0=125Kbit/s&lt;br /&gt;
1=150Kbit/s&lt;br /&gt;
2=250Kbit/s&lt;br /&gt;
3=300Kbit/s&lt;br /&gt;
4=500Kbit/s&lt;br /&gt;
5=1Mbit/s&lt;br /&gt;
6-14=reserved for future use&lt;br /&gt;
15=implied bit rate&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ï¿½&lt;br /&gt;
- Low-level type:&lt;br /&gt;
0x8n-0xBn=pulses-index streams track&lt;br /&gt;
Offset Name &lt;br /&gt;
Size &lt;br /&gt;
in &lt;br /&gt;
bytes &lt;br /&gt;
Value Description &lt;br /&gt;
+ 1 size 1 (tracksize/256) Size of track data. &lt;br /&gt;
&lt;br /&gt;
Size of track data in image in multiple of 256 bytes. If the real size is not a multiple of 256 bytes, then it is increased &lt;br /&gt;
to the next 256-byte boundary, and the added bytes are set to 0. &lt;br /&gt;
&lt;br /&gt;
Exceptions: &lt;br /&gt;
&lt;br /&gt;
- in the case of an Amiga double-density track (type 1):&lt;br /&gt;
high 4 bits=first sector in track&lt;br /&gt;
low 4 bits=size of track data in image in multiple of 512 bytes&lt;br /&gt;
-for types 0x8n-0xBn, the size (multiple of 256 bytes) is a 14-bit value, which 6 higher bits are coded in the &lt;br /&gt;
6 lower bits of the &amp;quot;type&amp;quot; byte, and the 8 lower bits are coded in the &amp;quot;size&amp;quot; byte. &lt;br /&gt;
3. Types 0xDn and 0xFn: raw FM/GCR/MFM data track &lt;br /&gt;
Offset Name &lt;br /&gt;
Size &lt;br /&gt;
in &lt;br /&gt;
bytes &lt;br /&gt;
Description &lt;br /&gt;
+ 0 size 4 Exact size (in bits) of track until it loops &lt;br /&gt;
+ 4 indexpos 4 Offset in bits to the index signal from the beginning of &lt;br /&gt;
the data &lt;br /&gt;
+ 8 rawdata size/8(+1) Raw data, FM and/or GCR encoded for type 0xDn, or &lt;br /&gt;
MFM-encoded for type 0xFn &lt;br /&gt;
&lt;br /&gt;
4. Type 0Cxh: FM/GCR raw decoded-data track &lt;br /&gt;
Offset Name &lt;br /&gt;
Size &lt;br /&gt;
in &lt;br /&gt;
bytes &lt;br /&gt;
Description &lt;br /&gt;
+ 0 encoding 1 Type of encoding: &lt;br /&gt;
0=standard FM &lt;br /&gt;
1=Commodore GCR &lt;br /&gt;
2-0xFF=reserved for future use &lt;br /&gt;
+ 1 indexpos 3 Offset in bits to the index signal from the beginning of &lt;br /&gt;
the data, re-encoded to FM/GCR &lt;br /&gt;
+ 4 cookedata n Data descriptors, see below: &lt;br /&gt;
&lt;br /&gt;
Note that no Apple GCR was defined, because the self-synchronization process can lose some '0' bits, so an Apple &lt;br /&gt;
GCR track should be imaged as a type 0xDn. &lt;br /&gt;
&lt;br /&gt;
ï¿½&lt;br /&gt;
List of standard FM (type 0) descriptors: &lt;br /&gt;
&lt;br /&gt;
data type description &lt;br /&gt;
data &lt;br /&gt;
typebyte &lt;br /&gt;
packed data extension:&lt;br /&gt;
size in bytes-&lt;br /&gt;
description of the field &lt;br /&gt;
unpacked dataDD stands for data byte &lt;br /&gt;
one &amp;quot;0&amp;quot; bit 0x00 -0 &lt;br /&gt;
one &amp;quot;1&amp;quot; bit 0x01 -1 &lt;br /&gt;
deleted data FM sync 0x02 -1*0xF56A &lt;br /&gt;
data FM sync 0x03 -1*0xF56B &lt;br /&gt;
data FM sync 0x04 -1*0xF56E &lt;br /&gt;
standard data FM sync 0x05 -1*0xF56F &lt;br /&gt;
standard FM index sync 0x06 -1*0xF77A &lt;br /&gt;
standard FM header sync 0x07 -1*0xF57E &lt;br /&gt;
In this section, FM-decoded data is re-encoded by inserting a '1' bit before every data bit. &lt;br /&gt;
For RLE data, a size of 0 means 256 bytes. &lt;br /&gt;
RLE FM/GCR-encoded data 0x08 1-size in bytes, 1-data byte X*DD &lt;br /&gt;
RLE FM-decoded data 0x09 1-size in bytes, 1-data byte X*DD &lt;br /&gt;
FM/GCR-encoded data 0x0A 2-size in bits, &lt;br /&gt;
ceil(size in bits/8)-data &lt;br /&gt;
X*DD &lt;br /&gt;
FM/GCR-encoded data 0x0B 2-(size in bits-65536), &lt;br /&gt;
ceil(size in bits/8)-data &lt;br /&gt;
X*DD &lt;br /&gt;
FM-decoded data 0x0C 2-size in bits, &lt;br /&gt;
ceil(size in bits/8)-data &lt;br /&gt;
X*DD &lt;br /&gt;
FM-decoded data 0x0D 2-(size in bits-65536), &lt;br /&gt;
ceil(size in bits/8)-data &lt;br /&gt;
X*DD &lt;br /&gt;
reserved &lt;br /&gt;
0x0E &lt;br /&gt;
... &lt;br /&gt;
0xFE &lt;br /&gt;
---&lt;br /&gt;
end of buffer 0xFF -&lt;br /&gt;
&lt;br /&gt;
List of Commodore GCR (type 1) descriptors: &lt;br /&gt;
&lt;br /&gt;
data type description &lt;br /&gt;
data &lt;br /&gt;
typebyte &lt;br /&gt;
packed data extension:&lt;br /&gt;
size in bytes-&lt;br /&gt;
description of the field &lt;br /&gt;
unpacked dataDD stands for data byte &lt;br /&gt;
reserved 0x00 -&lt;br /&gt;
reserved 0x01 -&lt;br /&gt;
CBM GCR sync mark 0x02 2-size in bits X '1' bits &lt;br /&gt;
reserved &lt;br /&gt;
0x03 &lt;br /&gt;
... &lt;br /&gt;
0x07 &lt;br /&gt;
---&lt;br /&gt;
In this section, every GCR-decoded nibble is re-encoded by using the standard Commodore GCR &lt;br /&gt;
encoding table. For RLE data, a size of 0 means 256 bytes. &lt;br /&gt;
RLE FM/GCR-encoded data 0x08 1-size in bytes, 1-data byte X*DD &lt;br /&gt;
RLE C= GCR-decoded data 0x09 1-size in bytes, 1-data byte X*DD &lt;br /&gt;
FM/GCR-encoded data 0x0A 2-size in bits, &lt;br /&gt;
ceil(size in bits/8)-data &lt;br /&gt;
X*DD &lt;br /&gt;
FM/GCR-encoded data 0x0B 2-(size in bits-65536), &lt;br /&gt;
ceil(size in bits/8)-data &lt;br /&gt;
X*DD &lt;br /&gt;
CBM GCR-decoded data 0x0C 2-size in nibbles, &lt;br /&gt;
ceil(size in nibbles/2)-data &lt;br /&gt;
X*DD &lt;br /&gt;
reserved 0x0D &lt;br /&gt;
... &lt;br /&gt;
0xFE &lt;br /&gt;
---&lt;br /&gt;
end of buffer 0xFF -&lt;br /&gt;
&lt;br /&gt;
ï¿½&lt;br /&gt;
5. Type 0Exh: MFM raw decoded-data track &lt;br /&gt;
Offset Name &lt;br /&gt;
Size &lt;br /&gt;
in &lt;br /&gt;
bytes &lt;br /&gt;
Description &lt;br /&gt;
+ 0 encoding 1 Type of encoding: &lt;br /&gt;
0=standard MFM &lt;br /&gt;
1-0xFF=reserved for future use &lt;br /&gt;
+ 1 indexpos 3 Offset in bits to the index signal from the beginning of &lt;br /&gt;
the data, re-encoded to MFM &lt;br /&gt;
+ 4 cookedata n Data descriptors, see below: &lt;br /&gt;
&lt;br /&gt;
Please note that the following descriptors have been significantly simplified over FDI version 1.0: Types 0x00 to &lt;br /&gt;
0x0D, and 0xFF are unchanged, while all other types have been removed. &lt;br /&gt;
&lt;br /&gt;
List of standard MFM (type 0) descriptors: &lt;br /&gt;
&lt;br /&gt;
data type description &lt;br /&gt;
data &lt;br /&gt;
typebyte &lt;br /&gt;
packed data extension:&lt;br /&gt;
size in bytes-&lt;br /&gt;
description of the field &lt;br /&gt;
unpacked dataDD stands for data byte &lt;br /&gt;
In this section, MFM re-encoded data for types 0x02 and 0x03 include the first MFM synchronization &lt;br /&gt;
bit. They also include the next MFM synchronization bit if they are immediately followed by MFMdecoded &lt;br /&gt;
data of type 0x0C or 0x0D. &lt;br /&gt;
one &amp;quot;0&amp;quot; bit 0x00 -0 &lt;br /&gt;
one &amp;quot;1&amp;quot; bit 0x01 -1 &lt;br /&gt;
standard MFM sync 0x02 -1*0x4489 &lt;br /&gt;
standard Index sync 0x03 -1*0x5224 &lt;br /&gt;
one MFM sync bit 0x04 -1 if both neighboring bits are &lt;br /&gt;
0, 0 otherwise. &lt;br /&gt;
reserved &lt;br /&gt;
0x05 &lt;br /&gt;
... &lt;br /&gt;
0x07 &lt;br /&gt;
---&lt;br /&gt;
In this section, MFM re-encoded data do NOT include the 2 outter MFM sync bits. &lt;br /&gt;
For RLE data, a size of 0 means 256 bytes. &lt;br /&gt;
RLE MFM-encoded data 0x08 1-size in bytes, 1-data byte X*DD &lt;br /&gt;
RLE MFM-decoded data 0x09 1-size in bytes, 1-data byte X*DD &lt;br /&gt;
MFM-encoded data 0x0A 2-size in bits,&lt;br /&gt;
ceil(size in bits/8)-data &lt;br /&gt;
X*DD &lt;br /&gt;
MFM-decoded data 0x0B 2-(size in bits-65536), &lt;br /&gt;
ceil(size in bits/8)-data &lt;br /&gt;
X*DD &lt;br /&gt;
MFM-decoded data 0x0C 2-size in bits, &lt;br /&gt;
ceil(size in bits/8)-data &lt;br /&gt;
X*DD &lt;br /&gt;
MFM-decoded data 0x0D 2-(size in bits-65536), &lt;br /&gt;
ceil(size in bits/8)-data &lt;br /&gt;
X*DD &lt;br /&gt;
reserved &lt;br /&gt;
0x0E &lt;br /&gt;
... &lt;br /&gt;
0xFE &lt;br /&gt;
---&lt;br /&gt;
end of buffer 0xFF -&lt;br /&gt;
&lt;br /&gt;
ï¿½&lt;br /&gt;
6. Type 0x8n-0xBn: pulses-index streams track &lt;br /&gt;
Offset Name &lt;br /&gt;
Size &lt;br /&gt;
in &lt;br /&gt;
bytes &lt;br /&gt;
Description &lt;br /&gt;
+ 0 numpulses 4 Number of pulses recorded for the track &lt;br /&gt;
+ 4 averagesz 3 Size in bytes of the &amp;quot;average&amp;quot; stream in the file + &lt;br /&gt;
Compression type of this stream &lt;br /&gt;
+ 7 minsize 3 Size in bytes of the &amp;quot;minimum&amp;quot; stream in the file + &lt;br /&gt;
Compression type of this stream &lt;br /&gt;
+ 10 maxsize 3 Size in bytes of the &amp;quot;maximum&amp;quot; stream in the file + &lt;br /&gt;
Compression type of this stream &lt;br /&gt;
+ 13 indexsize 3 Size in bytes of the &amp;quot;index&amp;quot; stream in the file + &lt;br /&gt;
Compression type of this stream &lt;br /&gt;
+ 16 averagedt averagesz &amp;quot;average&amp;quot; stream data &lt;br /&gt;
+16+averagesz mindata minsize &amp;quot;minimum&amp;quot; stream data (optional) &lt;br /&gt;
+16+averagesz maxdata maxsize &amp;quot;maximum&amp;quot; stream data (optional) &lt;br /&gt;
+minsize &lt;br /&gt;
+16+averagesz indexdata indexsize &amp;quot;index&amp;quot; stream data &lt;br /&gt;
+minsize &lt;br /&gt;
+maxsize &lt;br /&gt;
&lt;br /&gt;
Each of the size fields (averagesz, minsize, maxsize and indexsize) contains the size of the corresponding data in &lt;br /&gt;
the lower 22 bits, and the compression type in the high 2 bits. &lt;br /&gt;
&lt;br /&gt;
Description of the 4 streams of data: &lt;br /&gt;
&lt;br /&gt;
The track data is represented by the pulses recorded directly from the floppy drive Read Data line. Each stream is a &lt;br /&gt;
list of sequential pulses, the last pulse directly preceding the first (data loops). Each pulse is described at the same &lt;br /&gt;
position in each stream. &lt;br /&gt;
&lt;br /&gt;
- Average stream: &lt;br /&gt;
When uncompressed, each pulse in this stream is a 4-byte data representing the average time elapsed since the &lt;br /&gt;
previous strong pulse. A pulse is detected as strong or weak using the &amp;quot;index&amp;quot; stream. &lt;br /&gt;
Additionally, the whole track &amp;quot;time&amp;quot; can be calculated by adding all data from each strong pulse in this stream. This &lt;br /&gt;
whole track time is guaranteed to fit in 32 bits. The real time of each pulse can then be calculated by dividing this &lt;br /&gt;
whole time by the real track time (0.2 sec for a standard PC 3.5&amp;quot; disk drive or low-density 5.25&amp;quot; disk drive, 1/6 sec &lt;br /&gt;
for a standard PC high-density disk drive). &lt;br /&gt;
- Minimum stream: &lt;br /&gt;
This stream is optional. When uncompressed, each pulse in this stream is a 4-byte data representing the minimum &lt;br /&gt;
time elapsed since the previous strong pulse. It is in fact encoded as (average - real minimum), so the real value &lt;br /&gt;
must be calculated from the stream minimum as (average - stream minimum). &lt;br /&gt;
When using this minimum value, keep in mind that changing the average value towards this minimum value must be &lt;br /&gt;
done according to the minimum and maximum values from the other neighboring pulses, so that the whole track time &lt;br /&gt;
is maintained and no minimum or maximum value is exceeded. &lt;br /&gt;
- Maximum stream: &lt;br /&gt;
This stream is optional. Still, it cannot exist without the minimum stream. &lt;br /&gt;
When uncompressed, each pulse in this stream is a 4-byte data representing the maximum time elapsed since the &lt;br /&gt;
previous strong pulse. It is in fact encoded as ((average - real minimum) - (real maximum - average)), so the real &lt;br /&gt;
value must be calculated from the stream minimum and maximum values as (average + stream minimum - stream &lt;br /&gt;
maximum). &lt;br /&gt;
When using this maximum value, keep in mind that changing the average value towards this maximum value must &lt;br /&gt;
be done according to the minimum and maximum values from the other neighboring pulses, so that the whole track &lt;br /&gt;
time is maintained and no minimum or maximum value is exceeded. &lt;br /&gt;
ï¿½&lt;br /&gt;
- Index stream: &lt;br /&gt;
When uncompressed, each pulse in this stream is a 2-byte data representing the average status of the index signal &lt;br /&gt;
quickly after the pulse occured. &lt;br /&gt;
The most significant byte is a count for the '1' state of the index signal. &lt;br /&gt;
The least significant byte is a count for the '0' state of the index signal. &lt;br /&gt;
Additionally, the corresponding pulse can be detected as strong or weak by the following algorithm: &lt;br /&gt;
- search in the stream for the maximum of the sum of these 2 bytes &lt;br /&gt;
- if the current sum of these 2 bytes = maximum sum =&amp;gt; pulse is strong &lt;br /&gt;
- if the current sum of these 2 bytes &amp;lt; maximum sum =&amp;gt; pulse is weak &lt;br /&gt;
Possible values (compression types) for the high 2 bits of averagesz, minsize, maxsize and indexsize: &lt;br /&gt;
0=no compression &lt;br /&gt;
1=Huffman-type compression &lt;br /&gt;
2=reserved for future use &lt;br /&gt;
3=reserved for future use &lt;br /&gt;
&lt;br /&gt;
For type 1, a stream is encoded into one or more sub-streams as follows: &lt;br /&gt;
&lt;br /&gt;
A sub-stream corresponds to a portion of the stream, from a determined low bit number to a determined high bit &lt;br /&gt;
number of each value (for example from bit number 8 to bit number 15 of each value in the stream). If more than &lt;br /&gt;
one sub-stream encodes the stream, the sub-streams are ordered from the higher orders first to the lower orders &lt;br /&gt;
last. The low bit number of the last sub-stream is always 0. &lt;br /&gt;
&lt;br /&gt;
Each sub-stream is encoded as follows: &lt;br /&gt;
&lt;br /&gt;
First byte: &lt;br /&gt;
bits 0-6: low-order bit number (included) of the stream values that is encoded into the sub-stream. &lt;br /&gt;
bit 7: &lt;br /&gt;
&lt;br /&gt;
0=decoded values must be zero-extended.&lt;br /&gt;
1=decoded values must be sign-extended, from bit 7 or bit 15.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Second byte: &lt;br /&gt;
bits 0-6: high-order bit number (included) of the stream values that is encoded into the sub-stream. &lt;br /&gt;
bit 7: &lt;br /&gt;
&lt;br /&gt;
0=8-bit values in the tree.&lt;br /&gt;
1=16-bit values in the tree.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Following bytes: Huffman tree, encoded as bits. Bit 7 to bit 0 of the first byte, then bit 7 to bit 0 of the next byte, etc. &lt;br /&gt;
&lt;br /&gt;
For each bit: &lt;br /&gt;
0=node has 2 branches. &lt;br /&gt;
1=node is a leaf. &lt;br /&gt;
&lt;br /&gt;
The bit following a 0 bit corresponds to the left branch.&lt;br /&gt;
The bit following a 1 bit corresponds to the deepest available right branch.&lt;br /&gt;
When no right branch is available after a 1 bit, then the tree is complete, and the tree leaf values begin at the byte&lt;br /&gt;
following immediately the byte containing the last 1 bit of the tree. The tree values are 8 or 16-bit values (depending&lt;br /&gt;
on bit 7 of the second byte of the sub-stream) that correspond to a path in the Huffman tree. The values are stored&lt;br /&gt;
in the same order as the 1 bits are found in the encoded Huffman tree.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The packed data immediately follow the tree leaf values, a 0 bit meaning a left branch in the tree, and a 1 bit meaning&lt;br /&gt;
a right branch. The bits are stored in bits 7 to 0 of the first byte, then bits 7 to 0 of the second byte, etc. When a leaf is&lt;br /&gt;
reached, then the corresponding tree leaf value must be zero or sign-extended, then output to the appropriate bits of&lt;br /&gt;
the decoded stream. The number of values to decode corresponds to the number of pulses recorded for the track.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
---- End of Formatted Disk Image (FDI) file format version 2.0 description ---&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Vincent &amp;quot;ApH&amp;quot; Joguin. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
PDF adress : http://www.oldskool.org/disk2fdi/files/FDISPEC.pdf&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Back to [[Disk-Imagers]]&lt;/div&gt;</summary>
		<author><name>&gt;Zorro 2</name></author>
	</entry>
</feed>