Re: BPB_HiddSec
- From: "Norman Diamond" <ndiamond@xxxxxxxxxxxxxxxx>
- Date: Tue, 1 Apr 2008 15:41:32 +0900
At present I am concerned with cards _and_ hard drives _and_ floppies. At present I haven't noticed a difference between flash memory cards and USB flash drives, so I guess you've warned me that I'd better find it, thank you.
I don't have access to those associations. I can't use GPL'ed code so I understand intuitively the importance of avoiding read-modify-write cycles in flash memory but haven't read the details. Thank you for advising that these specs might be available publicly without reading GPL'ed code.
For some reason I had expected flash cards to be unpartitioned, but the one that I examined closely enough (so far) has a partition table and one primary partition.
Regarding the main question, now I'm no longer certain if Windows 98 neglected to count the MBR. I was sure that I saw 3E 00 00 00 in that field yesterday but now see 3F 00 00 00 (in little endian storage order). I'm wondering if Windows XP fixed it when I assigned a drive letter to it in XP, or if my eyes were defective yesterday.
"David Craig" <drivers@xxxxxxxxxx> wrote in message news:OrEO2t7kIHA.3876@xxxxxxxxxxxxxxxxxxxxxxx
First, you mention cards and I suspect may mean flash memory cards and not mass storage devices such as hard drives or USB Flash Drives. Do you have access to the private associations that support the various flash memory card formats? I remember from a while back that SmartMedia had a SSFDC Association that provided detail documentation for that media. It included the information about block sizes and recommended logical formats to be used to keep logical clusters aligned with the physical blocks that make up flash memory. This keeps cluster writes from spanning multiple physical blocks to reduce wear on the media since flash memory has a limited number of erase cycles that can be used. It also documented how many 'extra' blocks were present to allow them to replace worn blocks when required either due to wear or manufacturing defects. Normally flash memory will be formatted with only one partition since Windows doesn't support multiple partitions on removable media.
The above information is considered confidential and normally only shared with partners and others who pay to join such associations such as camera makers. I don't know if this applies to any of the current flash memory devices, but I would suspect it may apply to the current Toshiba xD Picture card especially since it does not contain a controller, AFAIK, just as did Toshiba's SmartMedia. Not having a controller means embedded controllers in readers or in some cases drivers need to know about those contraints. I use 'reader' to include writers too, including the firmware in cameras.
The main question about reserved sectors in the MBR's partition table includes sector zero. You can just add that value to the current sector value (zero at the beginning of the drive) and read the partition boot record where the BPB resides for FAT12/16/32. I do not know about the new exFat format since it is new with Vista SP1 and Server 2008. It has never been documented and may resemble NTFS more than traditional FAT since transactions are supported on it. It just has the added feature of supporting removable media as well as being usable in removable drives. Just for the uninformed, a USB Floppy is both while the traditional floppy is just removable media.
If you are consulting for a company involved in this business ask about any documentation on the items mentioned. The SmartMedia docs had very specific detailed layouts for each sector in the system areas beginning with sector zero and all the way through the FATs.
"Norman Diamond" <ndiamond@xxxxxxxxxxxxxxxx> wrote in message news:O8ZstZ7kIHA.1208@xxxxxxxxxxxxxxxxxxxxxxx"Maxim S. Shatskih" <maxim@xxxxxxxxxxxxxxxx> wrote in message news:ed6z2Q6kIHA.1744@xxxxxxxxxxxxxxxxxxxxxxxfor HiddenSectors. I should call DeviceIoControl and ask
IOCTL_DISK_GET_PARTITION_INFO to tell me the correct value that I'm going to write?
This is simplest.
Thank you but I'm still trying to figure that out.
Maybe IOCTL_DISK_GET_PARTITION_INFO can work because I should rewrite the MBR first, then call DeviceIoControl, IOCTL_DISK_GET_PARTITION_INFO will read the new partition table from the MBR even though the partition isn't ready yet, and then IOCTL_DISK_GET_PARTITION_INFO will tell me some of the values to write into the BPB.
Maybe IOCTL_DISK_GET_PARTITION_INFO is more reliable than Disk Administrator's command to rescan disks, because IOCTL_DISK_GET_PARTITION_INFO reads the current MBR.
OK, but what do card vendors do? When they manufacture cards and preformat the cards, surely they're not running Windows just to do the preformatting?
And as for why Windows 98 sets the value wrong, is it because IOCTL_DISK_GET_PARTITION_INFO doesn't exist in Windows 98?
.
- Follow-Ups:
- Re: BPB_HiddSec
- From: Maxim S. Shatskih
- Re: BPB_HiddSec
- References:
- Re: BPB_HiddSec
- From: Norman Diamond
- Re: BPB_HiddSec
- From: Maxim S. Shatskih
- Re: BPB_HiddSec
- From: Norman Diamond
- Re: BPB_HiddSec
- From: David Craig
- Re: BPB_HiddSec
- Prev by Date: Re: app can't open ioctl handle to driver
- Next by Date: Re: Rescan disks doesn't rescan disks?
- Previous by thread: Re: BPB_HiddSec
- Next by thread: Re: BPB_HiddSec
- Index(es):
Relevant Pages
|