https://discferret.com/w/index.php?title=Apple_DiskCopy_4.2&feed=atom&action=historyApple DiskCopy 4.2 - Revision history2024-03-28T12:33:07ZRevision history for this page on the wikiMediaWiki 1.30.0https://discferret.com/w/index.php?title=Apple_DiskCopy_4.2&diff=430&oldid=prevLord Nightmare: remove all mentions of the nonexistent gcr-on-hd format, since this format apparently never existed in the first place. Same with HD20 images in DC42 files.2022-11-24T01:34:28Z<p>remove all mentions of the nonexistent gcr-on-hd format, since this format apparently never existed in the first place. Same with HD20 images in DC42 files.</p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr style="vertical-align: top;" lang="en">
<td colspan="2" style="background-color: white; color:black; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: white; color:black; text-align: center;">Revision as of 01:34, 24 November 2022</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l64" >Line 64:</td>
<td colspan="2" class="diff-lineno">Line 64:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>The algorithm for this is: start with a 32-bit accumulator value of 0x00000000, and for each big-endian 16-bit word in the section:</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>The algorithm for this is: start with a 32-bit accumulator value of 0x00000000, and for each big-endian 16-bit word in the section:</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>* add that word to the accumulator (ignoring any overflows)</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>* add that word to the accumulator (ignoring any overflows)</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>* rotate the 32 bit accumulator right by 1 bit</div></td><td class='diff-marker'>+</td><td style="color:black; 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;"><div>* rotate the 32<ins class="diffchange diffchange-inline">-</ins>bit accumulator right by 1 bit</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>=== 0x4c-0x4F: Tag Checksum ===</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>=== 0x4c-0x4F: Tag Checksum ===</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>The algorithm for this is the same as for the data, however the first 12 bytes of the tag section, if present, are skipped (<del class="diffchange diffchange-inline">probably </del>due to a bug in an older disk copy version and kept for compatibility).</div></td><td class='diff-marker'>+</td><td style="color:black; 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;"><div>The algorithm for this is the same as for the data, however the first 12 bytes of the tag section, if present, are skipped (due to a bug in an older disk copy version and kept for compatibility).</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>* Tag Checksum is 00 00 00 00 if no tag data is present.</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>* Tag Checksum is 00 00 00 00 if no tag data is present.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l76" >Line 76:</td>
<td colspan="2" class="diff-lineno">Line 76:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>  02 = MFM CAV dsdd (720k)</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>  02 = MFM CAV dsdd (720k)</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>  03 = MFM CAV dshd (1440k)</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>  03 = MFM CAV dshd (1440k)</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>  Other encodings <del class="diffchange diffchange-inline">may </del>exist<del class="diffchange diffchange-inline">, </del>as <del class="diffchange diffchange-inline">DC42 was originally designed to be able to image HD20 disks</del>.</div></td><td class='diff-marker'>+</td><td style="color:black; 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;"><div>  Other encodings <ins class="diffchange diffchange-inline">might </ins>exist as <ins class="diffchange diffchange-inline">well</ins>.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>=== 0x51: Format Byte ===</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>=== 0x51: Format Byte ===</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>This byte has one of two meanings, depending on whether the disk is GCR format 400k or 800k, or MFM format<del class="diffchange diffchange-inline">. The byte is completely ignored for the rare GCR-on-HD format (which always has a 1:1 interleave and is always 2 sided)</del>.</div></td><td class='diff-marker'>+</td><td style="color:black; 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;"><div>This byte has one of two meanings, depending on whether the disk is GCR format 400k or 800k, or MFM format.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>* If disk is GCR format 400k or 800k:</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>* If disk is GCR format 400k or 800k:</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>  This byte is a copy of the GCR format nybble (6 bits),</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>  This byte is a copy of the GCR format nybble (6 bits),</div></td></tr>
</table>Lord Nightmarehttps://discferret.com/w/index.php?title=Apple_DiskCopy_4.2&diff=429&oldid=prevLord Nightmare: clarify the checksum algorithm2022-11-24T01:31:27Z<p>clarify the checksum algorithm</p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr style="vertical-align: top;" lang="en">
<td colspan="2" style="background-color: white; color:black; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: white; color:black; text-align: center;">Revision as of 01:31, 24 November 2022</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l62" >Line 62:</td>
<td colspan="2" class="diff-lineno">Line 62:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>=== 0x48-0x4B: Data Checksum ===</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>=== 0x48-0x4B: Data Checksum ===</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>The algorithm for this is: start with <del class="diffchange diffchange-inline">00000000</del>, <del class="diffchange diffchange-inline">add </del>each <del class="diffchange diffchange-inline">consecutive </del>16 bit <del class="diffchange diffchange-inline">Big Endian </del>word <del class="diffchange diffchange-inline">of </del>the section<del class="diffchange diffchange-inline">, then </del>rotate the 32 bit <del class="diffchange diffchange-inline">result </del>right by 1 bit<del class="diffchange diffchange-inline">.</del></div></td><td class='diff-marker'>+</td><td style="color:black; 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;"><div>The algorithm for this is: start with <ins class="diffchange diffchange-inline">a 32-bit accumulator value of 0x00000000</ins>, <ins class="diffchange diffchange-inline">and for </ins>each <ins class="diffchange diffchange-inline">big-endian </ins>16<ins class="diffchange diffchange-inline">-</ins>bit word <ins class="diffchange diffchange-inline">in </ins>the section<ins class="diffchange diffchange-inline">:</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; 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;"><div><ins class="diffchange diffchange-inline">* add that word to the accumulator (ignoring any overflows)</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; 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;"><div><ins class="diffchange diffchange-inline">* </ins>rotate the 32 bit <ins class="diffchange diffchange-inline">accumulator </ins>right by 1 bit</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>=== 0x4c-0x4F: Tag Checksum ===</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>=== 0x4c-0x4F: Tag Checksum ===</div></td></tr>
</table>Lord Nightmarehttps://discferret.com/w/index.php?title=Apple_DiskCopy_4.2&diff=422&oldid=prevBalrog at 05:59, 21 January 20182018-01-21T05:59:41Z<p></p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr style="vertical-align: top;" lang="en">
<td colspan="2" style="background-color: white; color:black; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: white; color:black; text-align: center;">Revision as of 05:59, 21 January 2018</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l82" >Line 82:</td>
<td colspan="2" class="diff-lineno">Line 82:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>  which appears in the headers of every GCR sector.</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>  which appears in the headers of every GCR sector.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>  $02 = Mac 400k</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>  $02 = Mac 400k</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>  $12 = (documentation error claims this is for mac 400k disks, but this is wrong)</div></td><td class='diff-marker'>+</td><td style="color:black; 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;"><div>  $12 = <ins class="diffchange diffchange-inline">Lisa 400k </ins>(<ins class="diffchange diffchange-inline">observed, </ins>documentation error claims this is for mac 400k disks, but this is wrong)</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>  $22 = Disk formatted as Mac 800k</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>  $22 = Disk formatted as Mac 800k</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>  $24 = Disk formatted as Prodos 800k (AppleIIgs format)</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>  $24 = Disk formatted as Prodos 800k (AppleIIgs format)</div></td></tr>
</table>Balroghttps://discferret.com/w/index.php?title=Apple_DiskCopy_4.2&diff=271&oldid=prevPhilpem at 19:35, 12 June 20112011-06-12T19:35:08Z<p></p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr style="vertical-align: top;" lang="en">
<td colspan="2" style="background-color: white; color:black; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: white; color:black; text-align: center;">Revision as of 19:35, 12 June 2011</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l1" >Line 1:</td>
<td colspan="2" class="diff-lineno">Line 1:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>[[Category:Disc image files]]</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>[[Category:Disc image files]]</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>'''Attribution: This article was sourced from the 68kMLA Wiki at http://68kmla.org/wiki/DiskCopy_4.2_format_specification. Permission was given in IRC by Balrog and <del class="diffchange diffchange-inline">Lord_Nightmare </del>to copy the article here for safe-keeping.'''</div></td><td class='diff-marker'>+</td><td style="color:black; 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;"><div>'''Attribution: This article was sourced from the 68kMLA Wiki at http://68kmla.org/wiki/DiskCopy_4.2_format_specification. Permission was given in IRC by Balrog and <ins class="diffchange diffchange-inline">Lord Nightmare </ins>to copy the article here for safe-keeping.'''</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>This article describes the '''file format for Apple Disk Copy 4.2''' .image files</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>This article describes the '''file format for Apple Disk Copy 4.2''' .image files</div></td></tr>
</table>Philpemhttps://discferret.com/w/index.php?title=Apple_DiskCopy_4.2&diff=270&oldid=prevPhilpem at 19:34, 12 June 20112011-06-12T19:34:02Z<p></p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr style="vertical-align: top;" lang="en">
<td colspan="2" style="background-color: white; color:black; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: white; color:black; text-align: center;">Revision as of 19:34, 12 June 2011</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l1" >Line 1:</td>
<td colspan="2" class="diff-lineno">Line 1:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>[[Category:Disc image files]]</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>[[Category:Disc image files]]</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>'''Attribution: This article was sourced from the 68kMLA Wiki at http://68kmla.org/wiki/DiskCopy_4.2_format_specification. Permission was given by Balrog to copy the article here for safe-keeping.'''</div></td><td class='diff-marker'>+</td><td style="color:black; 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;"><div>'''Attribution: This article was sourced from the 68kMLA Wiki at http://68kmla.org/wiki/DiskCopy_4.2_format_specification. Permission was given <ins class="diffchange diffchange-inline">in IRC </ins>by Balrog <ins class="diffchange diffchange-inline">and Lord_Nightmare </ins>to copy the article here for safe-keeping.'''</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>This article describes the '''file format for Apple Disk Copy 4.2''' .image files</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>This article describes the '''file format for Apple Disk Copy 4.2''' .image files</div></td></tr>
</table>Philpemhttps://discferret.com/w/index.php?title=Apple_DiskCopy_4.2&diff=268&oldid=prevPhilpem at 19:28, 12 June 20112011-06-12T19:28:58Z<p></p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr style="vertical-align: top;" lang="en">
<td colspan="2" style="background-color: white; color:black; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: white; color:black; text-align: center;">Revision as of 19:28, 12 June 2011</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l1" >Line 1:</td>
<td colspan="2" class="diff-lineno">Line 1:</td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>[[Category:<del class="diffchange diffchange-inline">Disk </del>image <del class="diffchange diffchange-inline">formats</del>]]</div></td><td class='diff-marker'>+</td><td style="color:black; 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;"><div>[[Category:<ins class="diffchange diffchange-inline">Disc </ins>image <ins class="diffchange diffchange-inline">files</ins>]]</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>'''Attribution: This article was sourced from the 68kMLA Wiki at http://68kmla.org/wiki/DiskCopy_4.2_format_specification. Permission was given by Balrog to copy the article here for safe-keeping.'''</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>'''Attribution: This article was sourced from the 68kMLA Wiki at http://68kmla.org/wiki/DiskCopy_4.2_format_specification. Permission was given by Balrog to copy the article here for safe-keeping.'''</div></td></tr>
</table>Philpemhttps://discferret.com/w/index.php?title=Apple_DiskCopy_4.2&diff=266&oldid=prevPhilpem: Created page with "Category:Disk image formats '''Attribution: This article was sourced from the 68kMLA Wiki at http://68kmla.org/wiki/DiskCopy_4.2_format_specification. Permission was given b..."2011-06-12T19:28:05Z<p>Created page with "<a href="/w/index.php?title=Category:Disk_image_formats&action=edit&redlink=1" class="new" title="Category:Disk image formats (page does not exist)">Category:Disk image formats</a> '''Attribution: This article was sourced from the 68kMLA Wiki at http://68kmla.org/wiki/DiskCopy_4.2_format_specification. Permission was given b..."</p>
<p><b>New page</b></p><div>[[Category:Disk image formats]]<br />
<br />
'''Attribution: This article was sourced from the 68kMLA Wiki at http://68kmla.org/wiki/DiskCopy_4.2_format_specification. Permission was given by Balrog to copy the article here for safe-keeping.'''<br />
<br />
This article describes the '''file format for Apple Disk Copy 4.2''' .image files<br />
<br />
Much information comes from the [[CiderPress]] and [[Mini vMac]] source codes. More authoritative information comes from [http://www.nulib.com/library/FTN.e00005.htm nulib.com]. Some info on tags from [http://www.pagetable.com/?p=50 Inside Macintosh, 1st ed. page II-212]. This format is also used in DiskCopy 4.1. DiskCopy 6.3.3 uses a variant with tags omitted. DART is a variant which adds compression.<br />
<br />
==Resource fork notes==<br />
Disk Copy 4.2 files have a [[resource fork]], but it only contains a copy of the data and tag checksums and can be safely ignored; files without the fork will still work perfectly.<br />
<br />
* Disk copy 4.2 images have a type of 'dImg' and creator of 'dCpy', without these the program will not recognize the file; they can be easily added to images missing them with resedit.<br />
<br />
{| border="1" cellpadding="2"<br />
|+DC42 File format Overview<br />
|-<br />
!offset !! type/size !! contents<br />
|-<br />
|0x00||byte||Length of image name string ('Pascal name length')<br />
|-<br />
|0x01-0x3F||63 bytes||Image name, in ascii, padded with NULs<br />
|-<br />
|0x40-0x43||BE_UINT32||Data size in bytes (of block starting at 0x54)<br />
|-<br />
|0x44-0x47||BE_UINT32||Tag size in bytes (of block starting after end of Data block)<br />
|-<br />
|0x48-0x4B||BE_UINT32||Data Checksum<br />
|-<br />
|0x4C-0x4F||BE_UINT32||Tag Checksum<br />
|-<br />
|0x50||byte||Disk encoding<br />
|-<br />
|0x51||byte||Format Byte<br />
|-<br />
|0x52-0x53||BE_UINT16||'0x01 0x00' ('Private Word') AKA Magic Number<br />
|-<br />
|0x54-...||variable||Image data<br />
|-<br />
|...-EOF||variable||Tag data<br />
|}<br />
<br />
== Specifics of data fork sections ==<br />
=== 0x00: Length of image name string ===<br />
Technically this is part of the 0x01-0x3f area, as pascal strings apparently store their length as their first byte. Effectively the address of the last non-NUL byte of the image name. bytes after the end address are ignored, and sometimes are used to hold extra information, or hold garbage (in the case of the 1.44mb system 6.0.8 startup disk, this is leftovers in memory from the System Additions disk, so the string ends up being System Startupns)<br />
* Note: A special (bug) case happens when the disk name is "-not a Macintosh disk", which the name is set to when using dc42 on non-mac diskettes. In that case, the length is set one byte too high; this is probably a bug in dc42 that was just never fixed.<br />
<br />
=== 0x01-0x3F: Image name ===<br />
This is the image name string. It is copied from the volume name of the disk or diskette being imaged.<br />
<br />
=== 0x40-0x43: Data block size in bytes ===<br />
This has one of 4 values on most diskettes:<br />
00 06 40 00 (409600 bytes) for 400k GCR disks<br />
00 0c 80 00 (819200 bytes) for 800k GCR disks<br />
00 0b 40 00 (737280 bytes) for 720k MFM disks<br />
00 16 80 00 (1474560 bytes) for 1440k MFM disks<br />
<br />
=== 0x44-0x47: Tag size in bytes ===<br />
This is typically 12 bytes for every 512 bytes in the image, apparently stored in the data mark in each sector on the media. The format for Tag data is described at the bottom of the document, and is important for repairing damaged disks using disk doctor. It is also very important on Lisa Diskettes (according to LisaEM source).<br />
00 00 25 80 (9600 bytes) for 400k disks w/tags<br />
00 00 4b 00 (19200 bytes) for 800k disks w/tags<br />
00 00 00 00 for diskettes with no tags<br />
<br />
=== 0x48-0x4B: Data Checksum ===<br />
The algorithm for this is: start with 00000000, add each consecutive 16 bit Big Endian word of the section, then rotate the 32 bit result right by 1 bit.<br />
<br />
=== 0x4c-0x4F: Tag Checksum ===<br />
The algorithm for this is the same as for the data, however the first 12 bytes of the tag section, if present, are skipped (probably due to a bug in an older disk copy version and kept for compatibility).<br />
* Tag Checksum is 00 00 00 00 if no tag data is present.<br />
<br />
=== 0x50: Disk encoding ===<br />
This byte describes the encoding used for the disk the data was imaged from, from a 'what type of disk is this?' perspective.<br />
00 = GCR CLV ssdd (400k)<br />
01 = GCR CLV dsdd (800k)<br />
02 = MFM CAV dsdd (720k)<br />
03 = MFM CAV dshd (1440k)<br />
Other encodings may exist, as DC42 was originally designed to be able to image HD20 disks.<br />
<br />
=== 0x51: Format Byte ===<br />
This byte has one of two meanings, depending on whether the disk is GCR format 400k or 800k, or MFM format. The byte is completely ignored for the rare GCR-on-HD format (which always has a 1:1 interleave and is always 2 sided).<br />
* If disk is GCR format 400k or 800k:<br />
This byte is a copy of the GCR format nybble (6 bits),<br />
which appears in the headers of every GCR sector.<br />
$02 = Mac 400k<br />
$12 = (documentation error claims this is for mac 400k disks, but this is wrong)<br />
$22 = Disk formatted as Mac 800k<br />
$24 = Disk formatted as Prodos 800k (AppleIIgs format)<br />
$96 = INVALID (Disk was misformatted or had GCR 0-fill (0x96 which represents data of 0x00)<br />
written to its format byte)<br />
Values for bitfield:<br />
76543210<br />
||||||||<br />
|||\\\\\- These 5 bits are sector interleave factor:<br />
||| setting of 02 means 2:1 interleave: 0 8 1 9 2 10 3 11 4 12 5 13 6 14 7 15<br />
||| setting of 04 means 4:1 interleave: 0 4 8 12 1 5 9 13 2 6 10 14 3 7 11 15<br />
||\------ This bit indicates whether a disk is 2 sided or not. 0 = 1 sided, 1 = 2 sided.<br />
\\------- always 0, as GCR nybbles are only 6 bits<br />
*If disk is MFM format:<br />
This byte is used to define MFM sector size and whether the disk is<br />
two sided or not.<br />
Interleave is ALWAYS 1:1 for these formats.<br />
$22 = double-sided MFM diskettes with 512 byte sectors<br />
Values for bitfield:<br />
76543210<br />
||||||||<br />
|||\\\\\- These 5 bits are sector size as a multiple of 256 bytes<br />
||| i.e. 02 = 2*256 = 512 bytes per sector<br />
||\------ This bit indicates whether a disk is 2 sided or not. 0 = 1 sided, 1 = 2 sided.<br />
\\------- unused, always 0<br />
<br />
=== 0x52-0x53: Private Word/Magic Number ===<br />
This is more or less the 'magic number' of any DC42 format file; if it is not $01 $00, it is not a DC42 format file.<br />
<br />
=== 0x54-...: Image data ===<br />
The size in bytes of the data stored here is the value at 0x40-0x43.<br />
<br />
=== ...-EOF: Tag data ===<br />
The size in bytes of the data stored here is the value at 0x44-0x47.<br />
<br />
== Tag Data format ==<br />
The tag data is 12 bytes per 512-byte disk sector, and is stored, like the Image data, in sector order.<br />
The actual format for each 12-byte block of the Tag data differs for Lisa, MFS and HFS disks,<br />
and for MFS or HFS any of them may be wrong or absent! be warned!<br />
* The Tag format for Lisa 400k or 800k disks is currently unknown, but without tags the disks will not function.<br />
*For MFS filesystems the Tag format is as follows:<br />
BE WARNED: when reading tag data, if the bit at 00 40 00 00 of any of the 3 32 bit words of the tag is set, the tag<br />
data for the sector it is part of is trashed and can be ignored. There IS a puprose to the data written when 0x40 is set, I'm just not sure what it is.<br />
offset type/size contents<br />
0x00 BE_UINT32 File number on disk, within MFS filesystem<br />
0x04 BE_UINT16 Flags bitfield:<br />
FEDCBA98 76543210<br />
|||||||| ||||||||<br />
|||||||| |||\\\\\- unknown, seems unused<br />
|||||||| ||\------ If set, Tag for this sector is not valid.<br />
|||||||| \\------- unknown<br />
|||||||\---------- sector content type: 0: system file; 1: user file (guessed)<br />
||||||\----------- sector is part of a: 0: data fork; 1: resource fork<br />
|\\\\\------------ unknown<br />
\----------------- unknown, sometimes set on the last few sectors of a data or resource fork<br />
0x06 BE_UINT16 Logical block number within the file<br />
0x08 BE_UINT32 Time of last modification, in seconds since 0:00:00, 1/1/1904<br />
Note that the last mod time may be different on the final sector of a file; this may indicate something special.</div>Philpem