How to select an ATA drive

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
drnono
Posts: 23
Joined: Sun Aug 09, 2015 11:54 am

How to select an ATA drive

Post by drnono »

How do I select an ATA device properly? I haven't found it after scanning through the ATAPI-ACS-8 commandset pdf.
I have some code to read the identification space of an ATA device, but it only works properly for the primary channel 0 device.

on the wiki page:
To use the IDENTIFY command, select a target drive by sending 0xA0 for the master drive, or 0xB0 for the slave, to the "drive select" IO port
I tried this and it didn't work, but I did somehow print the vendor id strings from a primary HDD and secondary CD on VMware by sending 0 for master and 1 for slave.

Now, when I tidied up the code a bit I don't get the string from the secondary channel. The actual code checks the four devices but I just have two below:
drnono
Posts: 23
Joined: Sun Aug 09, 2015 11:54 am

Re: How to select an ATA drive

Post by drnono »

Aha, it was identify_packet device.
Post Reply