Root/
| 1 | mbr structure. Size: 200. |
| 2 | |
| 3 | 000 1b8 code or fat: |
| 4 | 00 3 jump instruction |
| 5 | 03 8 OEM name |
| 6 | 0b 2 bytes per sector |
| 7 | 0d 1 sectors per cluster |
| 8 | 0e 2 reserved sectors (incl. boot sector, from boot sector) |
| 9 | 10 1 number of fats |
| 10 | 11 2 non fat32: number of entries in root directory |
| 11 | 13 2 total number of sectors on disk if < 32MB |
| 12 | 15 1 media descriptor (bit 2 set means removable) |
| 13 | 16 2 non fat32: sectors per fat |
| 14 | 18 2 sectors per track |
| 15 | 1a 2 heads |
| 16 | 1c 4 number of sectors before boot sector |
| 17 | 20 4 number of sectors on disk, if > 32MB |
| 18 | 24 xx 4 sectors per fat |
| 19 | 28 xx 2 bit 0-4: active fat, bit 7 set: write to all fats. |
| 20 | 2a xx 2 file system version number |
| 21 | 2c xx 4 cluster number for root directory |
| 22 | 30 xx 2 sector number for FSInfo structure |
| 23 | 32 xx 2 boot sector backup sector |
| 24 | 34 xx c reserved |
| 25 | 40 24 1 drive number |
| 26 | 41 25 1 current head (dos internal) |
| 27 | 42 26 1 boot signature (with 0x29, the next 3 fields are valid) |
| 28 | 43 27 4 volume id |
| 29 | 47 2b b volume label |
| 30 | 52 36 8 file system type "FAT16 " / "FAT32 " / ... |
| 31 | |
| 32 | 1b8 004 disk signature |
| 33 | 1bc 002 null |
| 34 | 1be 010 partition 0 |
| 35 | 1ce 010 partition 1 |
| 36 | 1de 010 partition 2 |
| 37 | 1ee 010 partition 3 |
| 38 | 1fe 002 mbr signature: 55 aa. |
| 39 | |
| 40 | Partition structure. Size: 10. |
| 41 | |
| 42 | 0 1 bootable flag 00=no; 80=yes. |
| 43 | 1 3 first sector in partition, chs |
| 44 | 4 1 partition type |
| 45 | 5 3 last sector in partition, chs |
| 46 | 8 4 first sector in partition, lba |
| 47 | c 4 number of sectors in partition, for lba |
| 48 | |
| 49 | CHS address. Size: 3. |
| 50 | head = chs[0] |
| 51 | sector = chs[1] & 0x3f |
| 52 | cylinder = (chs[1] & 0xc0) << 2 | chs[2] |
| 53 | |
| 54 | Fat filesystem information sector. Size: 200. |
| 55 | 000 4 signature: 52 52 61 41 |
| 56 | 004 1e0 unused |
| 57 | 1e4 4 fsinfo signature: 72 72 41 61 |
| 58 | 1e8 4 number of free clusters |
| 59 | 1ec 4 most recently allocated cluster |
| 60 | 1f0 c reserved |
| 61 | 1fc 2 unknown |
| 62 | 1fe 2 boot record signature: 55 aa |
| 63 | |
| 64 | Directory entry. Size: 20. |
| 65 | 00 8 name |
| 66 | 08 3 extension |
| 67 | 0b 1 attributes (00arshdv) |
| 68 | 0c 1 0 |
| 69 | 0d 1 creation time: (milli?)seconds |
| 70 | 0e 2 creation time: hour and minute |
| 71 | 10 2 creation date |
| 72 | 12 2 last accessed date |
| 73 | 14 2 cluster[31:16] |
| 74 | 16 2 time |
| 75 | 18 2 date |
| 76 | 1a 2 cluster[15:0] |
| 77 | 1c 4 file size |
| 78 | |
| 79 | long file name: stored in directory entries immediately before the 8.3 name (last entry is first part of name) |
| 80 | 00 1 ordinal field, bit 6 set means highest. |
| 81 | 01 a 5 unicode characters. |
| 82 | 0b 1 attribute: 000rsh0v. |
| 83 | 0c 1 0 |
| 84 | 0d 1 checksum of short filename. |
| 85 | 0e c 6 unicode characters. |
| 86 | 1a 2 0 |
| 87 | 1c 4 2 unicode characters. |
| 88 | |
| 89 | checksum is name[0] rotated 11 times, name[1] 10 times, etc and all added up. |
| 90 |
Branches:
master
