Hello, >> Maybe the file simply doesn't use contiguous clusters. I would say, the files are stored in contiguous clusters. But the question is, are clusters stored in contiguous sectors? >> You'll have to analyze the FAT. Okay, that is what i've try to do. > According to FAT, IO.SYS is in clusters 2,3,4 and > MSDOS.SYS in 5,6,7,8. That's right. And the length of IO.SYS is 0x00001400 and of MSDOS.SYS is 0x00001840. So i would say, a cluster is 0x0800 bytes or 8 sectors. The sectors per track are between 23 and 29 depending the track number. When a cluster is stored in one track, only the minimum of 23 sectors are useable. This would be sector 0 to 22. So the end of a track were the gaps filled by zero. In the D80 file here the offsets: Track 1 $00000000-$00001CFF (Sector 0-28) with Gap $00001700-$00001CFF (Sector 23-28) Track 2 $00001D00-$000039FF (Sector 0-28) with Gap $00003400-$000039FF (Sector 23-28) Track 3 $00003A00-$000056FF (Sector 0-28) with Gap $00005100-$000056FF (Sector 23-28) Track 4 $00005700-$000073FF (Sector 0-28) with Gap $00006E00-$000073FF (Sector 23-28) Track 5 $00007400-$000090FF (Sector 0-28) with Gap $00008B00-$000090FF (Sector 23-28) Track 6 $00009100-$0000ADFF (Sector 0-28) with Gap $0000A800-$0000ADFF (Sector 23-28) Track 7 $0000AE00-$0000CAFF (Sector 0-28) with Gap $0000C500-$0000CAFF (Sector 23-28) Track 8 $0000CB00-$0000E7FF (Sector 0-28) with Gap $0000E200-$0000E7FF (Sector 23-28) All gaps are filled by zero! One starting cluster is identifed at offset $00009300. This must be the cluster 14 of the file REVC.EXE. It has the length of one cluster and ends at $00009AFF. After that cluster the next file DEBUG.COM starts at $00009B00 with cluster 15. Offset $00009300 is Track 6 Sector 2 for Cluster 14 Offset $00009B00 is Track 6 Sector 10 for Cluster 15 But when we calculate backward, i think there is an additional gap for every next track. Cluster $08/ 8 at offset ($00005700) is Track 4 Sector 0 Cluster $09/ 9 at offset $00005F00 is Track 4 Sector 8 starting COMMAND.COM Cluster $0A/10 at offset ($00006700) is Track 4 Sector 16 Cluster $0B/11 at offset ($00007500) is Track 5 Sector 1 Cluster $0C/12 at offset $00007D00 is Track 5 Sector 9 starting FORMAT.COM Cluster $0D/13 at offset ($00008600) is Track 5 Sector 17 Cluster $0E/14 at offset $00009300 is Track 6 Sector 2 starting RECV.EXE Cluster $0F/15 at offset $00009B00 is Track 6 Sector 10 starting DEBUG.COM Cluster $10/16 at offset ($0000A300) is Track 6 Sector 18 Cluster $11/17 at offset ($0000B100) is Track 7 Sector 3 Cluster $12/18 at offset $0000B900 is Track 7 Sector 11 starting CHKDSK.COM Cluster $13/19 at offset $0000C100 is Track 7 Sector 19 starting FILCOM.COM Cluster $14/20 at offset ($0000CF00) is Track 8 Sector 4 Cluster $15/21 at offset ($0000D700) is Track 8 Sector 12 Cluster $16/22 at offset ($0000DF00) is Track 8 Sector 20 Cluster $17/23 at offset ($0000ED00) is Track 9 Sector 5 Cluster $18/24 at offset $0000F500 is Track 9 Sector 13 starting EDLIN.COM Cluster $19/25 at offset ($0000FD00) is Track 9 Sector 21 Cluster $1A/26 at offset $00010B00 is Track 10 Sector 6 starting LINK.EXE Okay, i think this is so going on. But where does this start? We remember the IO.SYS starts at cluster 2. The MSDOS.SYS at cluster 5. Cluster $02/ 2 at offset ($00001500) is Track 1 Sector 21 starting IO.SYS Cluster $03/ 3 at offset ($00002300) is Track 2 Sector 6 Cluster $04/ 4 at offset ($00002B00) is Track 2 Sector 14 Cluster $05/ 5 at offset ($00003300) is Track 2 Sector 22 starting MSDOS.SYS Cluster $06/ 6 at offset ($00004100) is Track 3 Sector 7 Cluster $07/ 7 at offset ($00004900) is Track 3 Sector 15 But where are the boot sector? Is it empty? BOOT offset ($00000000) is Track 1 Sector 0 empty? FAT1 offset $00000100 is Track 1 Sector 1 (max 2 Sectors contains 220 cluster entries in 330 Bytes) FAT2 offset $00000300 is Track 1 Sector 3 (max 2 Sectors contains 220 cluster entries in 330 Bytes) ROOT offset $00000500 is Track 1 Sector 5 (max 16 sectors with 8 entries per sector is 128 entries totally) When we define virtual Cluster Cluster $00/ 0 at offset $00000500 is Track 1 Sector 5 starting ROOT Cluster $01/ 1 at offset $00000D00 is Track 1 Sector 13 We see there is an offset of 5 at the begining of the clusters. Is this right? Who want to check and expand? Greetings Martin Message was sent through the cbm-hackers mailing listReceived on 2011-01-18 23:00:08
Archive generated by hypermail 2.2.0.