Hello
I have currently spent my days trying to understand FAT16 and formatting of a disk, and lots of other stuff related to this. Thus, naturaly for me, there has arised some questions close to the end of my spine (back-bone). Hopefully some of you can share some light.
Here goes...
MBR - Master boot record
My first concern is related to the MBR when formating a device (yes I know, mmc and sd memory card is delivered pre-formatted, however in our case we need the format function for several purposes, including changing MBR sector, please do not ask why :) ). Aboute the boot code located in MBR, can this be copied from any "DOS/Windows" formatted memory card and be used in any mmc and sd memory cards which is formatted by our system to be used between our system and PC or Mac/Linux based systems? Does the Linux systems require different master boot code (cant beleive this to be true)?
The partition table will under any circumstances be built each time a format command is executed, and we do not suport GUID partition table for those which is familiar with this thingy, thus we are dealing with a "standard" MBR. Each partition (normaly only one) is to be FAT16, however, for FAT16 there is several partition types/ID's available like 0x06 for DOS 3.31 compatibility with CHS mapping or Win95 compatibility using LBA mapping. Question is, if setting partition ID to 0x0e, can I then drop setting the start and end CHS address in partition table and only use LBA mapping (0ffseth 0x08 and 0x0c (nr. of sectors in partition) in partition table)? Or would a win95 or higher version of Win OS say that partition is dead if CHS is missing.? what aboute Mac and Linux distros which supports LBA mapping (which I beleive should be any distroes available), does they read wind95 Fat16 formatted sd/mmc cards correctly?
(I ask these questions since there is some time before we can try it in real product).
Is it possible to format a memory card without any MBR on top at all (skip it) and use the whole memory for one partition where first physical sector in memory is the boot record for FAT16, and still atleast a windows enviroment will read the memory correctly?. Had to ask...
FAT16 - Boot record (BR)
The BR is not ment to contain any boot code (i.e. not a bootable partition) and, if using MBR above, the "bootable"-flag in the partition table is set to 0x00 = "partition have no boot code", thus question is, is it enough to set offset 0x00 (BR jump vector) to 0x000000, will OS ignore it?
What should the media descriptor (offset 0x15) be set to. For some memory cards (128MB MMC) it was set to 0xf8 giving "Single sided disk, 80 tracks per side, 9 sectors per track". The card was formatted using winXP sp4 format command from cmd prompt.Offset 0x18 (nr. of tracks) said nr. of tracks is 63 and as far as I know 63 is not like 80... Any comments?
What should the correct media descriptor and track/head values in BR be?
I guess i later will dig up more questions but I leave this for now, Hopes anyone can contribute into this.
Thanks in advance