Re: "Initialize device parameter command"

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Peter Wieland [MSFT] (peterwie_at_online.microsoft.com)
Date: 09/07/04


Date: Tue, 7 Sep 2004 07:49:51 -0700

at the risk of pointing out something you already know.

C * H * S == "total Sector number"

I think it's still unclear why you can't use the total number of sectors but
instead need to calculate it yourself.

-p

-- 
This posting is provided "AS IS" with no warranties, and confers no rights.
"Mebur" <Mebur@discussions.microsoft.com> wrote in message 
news:7F853742-0632-4D2A-BEF4-AD906F82106F@microsoft.com...
>I have an HDD (DVR's HDD), there are images(jpeg) in it. I want to read
> images on pc. All formulations are given me to calculate image addresses.
> But, all formulation depends HDD size.
>
> I can find  HDD size only with using  HDD_Size = C*H*S*512, NOT USING 
> total
> Sector numbers. Designer says me ,Use IDENTIFY ATA command to obtain C,H, 
> and
> S numbers. But, with using that command, I obtained C=16383,H=16, and S=63
> for all HDDs.
>
> I need to calculate correct values of C,H,and S numbers of an HDD.
>
>
> "Maxim S. Shatskih" wrote:
>
>>     What is the need of this? All disk tools use LBA only, and all modern 
>>  >
>> (Win98) bootloaders ignore them.
>>
>> -- 
>> Maxim Shatskih, Windows DDK MVP
>> StorageCraft Corporation
>> maxim@storagecraft.com
>> http://www.storagecraft.com
>>
>> "Mebur" <Mebur@discussions.microsoft.com> wrote in message
>> news:003A7FFF-478F-4A4F-9ACC-9473854D41BE@microsoft.com...
>> > Ok. But, I have to calculate C,H,and S numbers. How can I find them?
>> >
>> >
>> >
>> > "Maxim S. Shatskih" wrote:
>> >
>> > >     No.
>> > >     On lowest ATA level, use UserAddressableSectors from IDENTIFY.
>> > >     On lowest SCSI level, use READ CAPACITY.
>> > >
>> > > -- 
>> > > Maxim Shatskih, Windows DDK MVP
>> > > StorageCraft Corporation
>> > > maxim@storagecraft.com
>> > > http://www.storagecraft.com
>> > >
>> > > "Mebur" <Mebur@discussions.microsoft.com> wrote in message
>> > > news:E7D1FDEC-E57A-4151-9B40-79226E028CCF@microsoft.com...
>> > > > I know that, the modern drives use their internal translation.But, 
>> > > > I have
>> to
>> > > > calculate
>> > > > Total Hard Disk (HD) Size with CHS mode for my current project. 
>> > > > HD_size
>> > > > =C*H*S*512. After calculating that I will use LBA mode to read HD
>> sectors.
>> > > > But firstly, I need C,H, and Snumbers.
>> > > >
>> > > >
>> > > > Mebur
>> > > > /***/
>> > > >
>> > > > "Mark Roddy" wrote:
>> > > >
>> > > > > In article <0A358F93-96DD-47F3-8958-D14A76D82CD3@microsoft.com>,
>> > > > > Mebur@discussions.microsoft.com says...
>> > > > > > Hi EveryOne,
>> > > > > >
>> > > > > > I need to  calculate Cylinders(S), Heads (H),and Sectors(S)  of 
>> > > > > > a
>> Hard
>> > > disk.
>> > > > > > I have used "Identify Device" ATA command to hard disk.I can 
>> > > > > > obtain
>> > > Cylinder,
>> > > > > > Head, and Sector numbers correctly for HardDisk_Size < 8 GB 
>> > > > > > (app.)
>> But
>> > > for
>> > > > > > all hard disks thats HD_Size >8 GB, it gives me same values
>> > > #C=16383,#H=16,
>> > > > > > #S=63.
>> > > > > >
>> > > > > > I have to use "initialize device parameter" ATA command to 
>> > > > > > obtain
>> C,H,and
>> > > S
>> > > > > > numbers for HD_Size >8.5 GB. To apply  this command, I have to 
>> > > > > > sent
>> H,
>> > > and S
>> > > > > > numbers to the  registers.
>> > > > > >
>> > > > > > My Problem is that , How Can I know the Head and Sector 
>> > > > > > numbers,when
>> I
>> > > send
>> > > > > > "Identify Device Parameter" command? What are the their values?
>> > > > > >
>> > > > > > Best Regards.
>> > > > > >
>> > > > >
>> > > > > CHS is obsolete DOS era nonsense. Modern drives is LBA addressing
>> > > > > externally and contain their own internal translation.
>> > > > > -- 
>> > > > >
>> > > > > =====================
>> > > > > Mark Roddy DDK MVP
>> > > > > Windows 2003/XP/2000 Consulting
>> > > > > Hollis Technology Solutions 603-321-1032
>> > > > > www.hollistech.com
>> > > > > markr@hollistech.com
>> > > > >
>> > >
>> > >
>> > >
>>
>>
>> 


Relevant Pages