Re: BPB_HiddSec
- From: "David Craig" <drivers@xxxxxxxxxx>
- Date: Mon, 31 Mar 2008 22:44:31 -0700
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@xxxxxxxxxxxxxxxxxxxxxxx
for 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: Norman Diamond
- 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
- Prev by Date: Re: problem punting in GDI
- 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
|