Raw Disk Image File =================== The disk image consists of: ... etc ... The tracks can be stored in any order, but /should/ be stored in physical track order, either interleaved or noninterleaved, ie: ie 0:00, 0:01 .. 0:78, 0:79, 1:00, 1:01 .. 1:78, 1:79 or 0:00, 1:00, 0:01, 1:01 .... 0:78, 1:78, 0:79, 1:79 Each physical track can be a different density, a different logical track to the physical track, and a different logical side to the physical side. This allows oddball formats such as dual 40/80 track disks and Challenger CPM disks (track 0/1/2=FM, track 3+=MFM) to be imaged. Track Data ========== Each track consists of the following: Track density ------------- &xx : Physical track &xx : Physical side &xx : Density &00=FM, &01=MFM DD, &02=MFM HD, &03=MFM OD : Density=&00 - track length=3125 bytes (eg 400k DFS) : Density=&01 - track length=6250 bytes (eg 640k/800k ADFS) : Density=&02 - track length=12500 bytes (eg 1600k ADFS) : Density=&03 - track length=25000 bytes (eg 3800k ADFS) &xx : Spare Track header ------------ &FC : Index mark &FF * gap1 : gap1 Each sector ----------- &00 * sync1 : Sync bytes &FE : ID mark &xx : logical track &xx : logical head &xx : logical sector &xx : sector size 0=128, 1=256 2=512 ... 7=16384 &xx &xx : Sector ID CRC &FF * gap2 : gap2 &00 * sync2 : Sync bytes &FB : Data mark &xx * size : bytes of data &xx &xx : Sector data CRC &FF * gap3 : gap3 Track tail ---------- &FF * gap4-gap3 : gap4 without duplicate gap3 &FF * gap5 : gap5 Padding ------- &00 * pad : padding in disk image file to next track Total bytes: Density 1 Track header 3+gap1 Sectors num*(sync1+gap2+sync2+size+gap3+10) Track tail gap4+gap5 Padding pad 3+gap1+gap4+gap5+pad+num*(gap2+gap3+sync1+sync2+size+10)-gap3 For Acorn DFS (ADUG) this is: 3+16+30+0+pad+10*(11+21+6+6+256+10)-21 28+pad+10*(310) 28+pad+3100 3128+pad 3125 (pad=-3!) - this is why slightly dodgy For Acorn DFS (optimised) this is: 3+16+30+0+pad+10*(11+16+6+6+256+10)-16 33+pad+10*(308) 33+pad+3080 3113+pad 3125 (pad=22) For Watford DDFS this is: 3+60+45+0+pad+16*(22+43+12+12+256+10)-43 65+pad+16*(355) 65+pad+5680 5745+pad 6250 (pad=505) For Acorn ADFS 640k this is: 3+42+40+0+pad+16*(22+57+12+12+256+10)-57 28+pad+16*(369) 28+pad+5904 5932+pad 6250 (pad=318) For Acorn ADFS 800k this is: 3+303+40+0+pad+5*(22+90+12+12+1024+10)-90 256+pad+5*(1170) 256+pad+5850 6106+pad 6250 nominal (pad=144) 3+gap1+gap4+gap5+pad+num*(gap2+gap3+sync1+sync2+size+10)-gap3 For Acorn ADFS 1600k this is: 3+50+30+0+pad+10*(22+90+12+12+1024+10)-90 -7+pad+10*(1170) -7+pad+11700 11693+pad 12500 nominal (pad=807) For DOS 720k this is: 3+50+50+0+pad+9*(22+90+12+12+512+10)-90 13+pad+9*(658) 13+pad+5922 5935+pad 6250 (pad=315) For DOS 1440k this is: 3+50+50+0+pad+18*(22+90+12+12+512+10)-90 13+pad+18*(658) 13+pad+11844 11857+pad 12500 (pad=643) For Acorn ADFS 3800k this is: 3+40+30+0+pad+3*(22+80+12+12+8192+10)-80 -7+pad+3*(8328) -7+pad+24984 24977+pad 25000 nominal (pad=23)