BPB of unpartitioned boot volume Offset Data Comment -------------------------------------------------------------------------------------------------------------------------- 0x000 0xC3, 0x5A, 0x50 Jump to bootloader code (assume sector loaded to 0x5000) 0x003 'ZEPHYROS' OEM Name 0x00B 0x0200 512 bytes per sector 0x00D 0x01 1 sector/cluster 0x00E 0x0006 Reserved Sectors 0x010 0x02 Number of FATs 0x011 0x0000 Reserved 0x013 0x0000 16-bit sector count, default to 0 if 2^16 or over. 0x015 0xF8 Media descriptor 0x016 0x0000 Reserved 0x018 0x0000 Sector/Track, unused in ZFAT 0x01A 0x0000 Number of heads, unused in ZFAT 0x01C 0x00000000 Hidden sectors before current partition 0x020 0x09502F90 Sector count, default to 0 if below 2^16. (80GB volume) 0x024 0x00125704 Sectors per FAT 0x028 0x0000 Active FAT flags. 0x02A 0x3031 Version number '0.1' 0x02C 0x00000002 Root directory initial cluster. 0x030 0x0001 FSINFO sector number 0x032 0x0006 Backup BPB 0x034 0x000000000000 Reserved 0x040 0x00 Drive Number 0x041 0x00 Reserved 0x042 0x29 Extended boot signature 0x043 0x00000000 Volume serial number 0x047 'ZEPHYRBOOT ' Volume Label 0x052 'ZFAT ' File system identifier, space padded 0x05A boot code Boot code 0x1FE 0xAA55 Boot signature FSINFO sector Offset Data Comment -------------------------------------------------------------------------------------------------------------------------- 0x000 0x41615252 FSINFO start signature 0x004 0 Reserved, 480 bytes. 0x1E4 0x61417272 FSINFO mid signature 0x1E8 0xFFFFFFFF Unknown count of free sectors 0x1EC 0xFFFFFFFF Unknown first free cluster 0x1F0 0 Reserved, 12 bytes 0x1FC 0xAA550000 FSINFO trail signature Root Directory Offset Data Comment -------------------------------------------------------------------------------------------------------------------------- 0x00 'ZEPHYRBOOT ' Volume Label, includes extension 0x0B 0x08 Volume Label flag set 0x0C 0x00 Reserved, set to 0. 0x0D 0x?? Creation time, tens of milliseconds 0x0E 0x0000 Creation time 0x10 0x0000 Creation date 0x12 0x0000 Last access date 0x14 0x0000 High byte of first cluster location 0x16 0x0000 Last modified time 0x18 0x0000 Last modified date 0x1A 0x0002 Low byte of first cluster location 0x1C 0x0000 File size in bytes Determining amount of nibbles(4-bit groups) needed for each cluster of a FAT filesystem: clusSiz*(2*secSiz)+nfats*fatNibls Assume a cluster size of 1, sector size of 512, number of fats as 2, and nibbles per fat of 8 1*(2*512)+2*8 = 1040 nibbles, or 520 bytes. remSects will be assumed to be 156,249,992 for an 80GB(80,000,000,000B) volume with 8 sectors reserved. numClus <= (2*remSect*SecSiz-2*nfats*fatNibls)/(2*clusSiz*secSiz+nfats*fatNibls) = 153,846,145.93846153846153846153846 or numClus <= ((remSect+2*clusSiz)*2*secSiz)/(2*clusSiz*secSiz+nfats*fatNibls)-2 = 153,846,145.93846153846153846153846 fatLen will be the size of the FAT in sectors, rounded up fatLen <= ((numClus+2)*fatNibls)/(secSiz*2) = ceil(1,201,923.0234375) = 1,201,924 sectors