Recognize hard drives

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
User avatar
d4n1l0d
Member
Member
Posts: 42
Joined: Sat Dec 02, 2006 4:12 pm

Recognize hard drives

Post by d4n1l0d »

How to recognize hard drives of my PC? ( How much they are, if they are ATA, SCSI, etc... )
pcmattman
Member
Member
Posts: 2566
Joined: Sun Jan 14, 2007 9:15 pm
Libera.chat IRC: miselin
Location: Sydney, Australia (I come from a land down under!)
Contact:

Post by pcmattman »

Find the ATA specification, and read through it. It has everything you need to know about hard drive access (unless it's SCSI... I have no idea about them).

I'd also suggest looking at the "LBA HDD access" tutorial on osdever.net. Don't use it for code, but look at the ports it references and match them with the ones in the specification. For instance, 0x1F0 is (usually) the data register for the primary controller.
exkor
Member
Member
Posts: 111
Joined: Wed May 23, 2007 9:38 pm

Post by exkor »

you do scan of all pci devices first, sample code is here http://www.osdev.org/phpBB2/viewtopic.php?t=14204

then read specs about controller/device that you found
User avatar
d4n1l0d
Member
Member
Posts: 42
Joined: Sat Dec 02, 2006 4:12 pm

Post by d4n1l0d »

OK, thanks
User avatar
Brynet-Inc
Member
Member
Posts: 2426
Joined: Tue Oct 17, 2006 9:29 pm
Libera.chat IRC: brynet
Location: Canada
Contact:

Post by Brynet-Inc »

It's easy to differentiate between a "hard drive" and a "soft drive", if you open your computer case and see a device that's soft and squishy, you can conclude it's not a "hard drive".

On a slightly more serious note lol.. PATA and SATA..
EDIT: Removed 2015: Imageshack replaced all links with spam.
Last edited by Brynet-Inc on Fri Aug 28, 2015 8:58 pm, edited 2 times in total.
Image
Twitter: @canadianbryan. Award by smcerm, I stole it. Original was larger.
pcmattman
Member
Member
Posts: 2566
Joined: Sun Jan 14, 2007 9:15 pm
Libera.chat IRC: miselin
Location: Sydney, Australia (I come from a land down under!)
Contact:

Post by pcmattman »

Brynet-Inc wrote:It's easy to differentiate between a "hard drive" and a "soft drive", if you open your computer case and see a device that's soft and squishy, you can conclude it's not a hard drive.
How on earth does this relate at all to the topic of discussion?
User avatar
Brynet-Inc
Member
Member
Posts: 2426
Joined: Tue Oct 17, 2006 9:29 pm
Libera.chat IRC: brynet
Location: Canada
Contact:

Post by Brynet-Inc »

pcmattman wrote:How on earth does this relate at all to the topic of discussion?
I was considerably bored, let me have my fun... :wink:
Image
Twitter: @canadianbryan. Award by smcerm, I stole it. Original was larger.
earlz
Member
Member
Posts: 1546
Joined: Thu Jul 07, 2005 11:00 pm
Contact:

Post by earlz »

...(lol)
I once bought a C++D drive....it wasn't what I was hoping for though
Post Reply