hello,
Plz need help how i can determine a value in FAT16 for some Media. Here is the example for 256Mb flashdisk i've got from windows formater.
FAT16 Boot structure: (256Mb Flashdisk)
JMP instruction: '0xEB 0x3C 0x90'
OEM: 'MSDOS5.0'
Bytes per Sector: '0x0200' (512 dec)
Sectors per cluster: '0x08' (8 dec)
Reserved Sectors: '0x0004' (4 dec)
Number of FATs: '0x02'
Max root entries: '0x0200' (512 dec)
Small sectors: '0x0000' (0 dec)
Media type: '0xF8'
Sectors per FAT: '0x00FA' (250 dec)
Sectors per track: '0x003F' (63 dec)
Number of heads: '0x00FF' (255 dec)
Hidden sectors: '0x00000000' (0 dec)
Large sectors: '0x0007D200' (512512 dec)
Disk number: '0x00'
Current head (not used): '0x00'
NT signature: '0x29' (41 dec)
Volume serial number: '0xDC7F521A' (3699331610 dec)
Volume label: 'NO NAME '
System ID: 'FAT16 '
My question is.. How we calculation the large sector? and determine heads and track?
I have count the large sector in bytes :512512*512bytes = 262406144 bytes
And compare with this 256*1024*1024 = 268435456 bytes
Not Same...! How it can be?
Plz need help some the algorithm or clue here...
Best Regards,
Raddel
FAT16 BPB Calculation
Re: FAT16 BPB Calculation
You may want to check out the official FAT documents.
Microsoft at your service.
Microsoft at your service.
Programming is not about using a language to solve a problem, it's about using logic to find a solution !
Re: FAT16 BPB Calculation
I have already reading about FAT16, and i don't found how to determine the value inside the FAT16 BPB, i want make some formater program for some media, so i must determine the BPB value right? Is there any site link or information about that...
Many Thanks.
Best Regards,
Raddel
Many Thanks.
Best Regards,
Raddel
Re: FAT16 BPB Calculation
FAT16 BPB is same as that of FAT12. The major difference is that FAT16 uses 16 bit cluster entry whereas FAT12 uses 12 bit cluster entry in the File Allocation Table.
Programming is not about using a language to solve a problem, it's about using logic to find a solution !
Re: FAT16 BPB Calculation
Yap.. i agree that FAT16 is same with FAT12, but my question how i can determine a value inside BPB. It's mean different media size have different value right? example Media 256Mb have N sector.. and 512Mb have M sector and 1GB have R sector.. Now my question how the way calculate the sector on base media size?
I'have try to calculate, but it's not match..? or i have a wrong calculation.. i need help and suggestion..
Thank you.
Best Regards,
Raddel
I'have try to calculate, but it's not match..? or i have a wrong calculation.. i need help and suggestion..
Thank you.
Best Regards,
Raddel
- DavidCooper
- Member
- Posts: 1150
- Joined: Wed Oct 27, 2010 4:53 pm
- Location: Scotland
Re: FAT16 BPB Calculation
It's 1001*1024*256 rather than 1024*1024*256, so the mismatch is the result of differing opinions as to what qualifies as a megabyte. I can't see how it affects your calculation of track and head - they should be the same as if it was 1024*1024*256 up to the point where you hit the 512512th sector.Raddel wrote:My question is.. How we calculation the large sector? and determine heads and track?
I have count the large sector in bytes :512512*512bytes = 262406144 bytes
And compare with this 256*1024*1024 = 268435456 bytes
Not Same...! How it can be?
Plz need help some the algorithm or clue here...
Help the people of Laos by liking - https://www.facebook.com/TheSBInitiative/?ref=py_c
MSB-OS: http://www.magicschoolbook.com/computing/os-project - direct machine code programming
MSB-OS: http://www.magicschoolbook.com/computing/os-project - direct machine code programming
Re: FAT16 BPB Calculation
1) A formatter never formats the entire space. There will always be some left unformatted at the end.
2) You must get the heads and tracks values from the BIOS using INT0x13/ah=8. The values in the BPB are often wrong and can not be trusted.
2) You must get the heads and tracks values from the BIOS using INT0x13/ah=8. The values in the BPB are often wrong and can not be trusted.
Re: FAT16 BPB Calculation
So i can determine how many sector reserved right? and i can have my own value right, it doesn't have a standart value for formating disk? Am i correct?bewing wrote:1) A formatter never formats the entire space. There will always be some left unformatted at the end.
Re: FAT16 BPB Calculation
Right. But don't go way off as you'll lose the compatibility with other Operating systems.The media formatted by your OS will be identified as a RAW media if you don't use standard values where possible.Raddel wrote:So i can determine how many sector reserved right? and i can have my own value right?bewing wrote:1) A formatter never formats the entire space. There will always be some left unformatted at the end.
Programming is not about using a language to solve a problem, it's about using logic to find a solution !