News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

how to identify master/slave drive directly

Started by algernon, December 20, 2004, 06:26:18 AM

Previous topic - Next topic

algernon

hello ppl.
I wrote a simple C program ( don't shoot  toothy ) to display info about IDE devices. It basically sends the "identify drive" command to both IDE channels and then parses the 512 bytes of info received. Problem is: if i have 2 devices on the same cable, how can I tell which one is master and which one is slave and how can I access them?
thanks and, btw, the new forum is lookin' great ;)

MichaelW

#1
Hello Algernon,

The attachment contains the main module of a QuickBASIC program that reads (and displays, but none of the support modules required to do that are included) the Identify Device data from the ATA/ATAPI devices on the standard ATA channels. IIRC I coded the first version in the late 1980's and this is from the final version that I did a few years ago. At the time I completed it the code worked OK on every system that I tested. I actually did do a C version, but it is probably too old to be of any use to you. I included the compiled EXE as a reference. Note that it will not return useful information when run under any version of Windows other than Windows 98 First Edition.

Correction, the first version was in the early 1990's, using a technical reference manual from Conner Peripherals, Inc.


[attachment deleted by admin]
eschew obfuscation

algernon

Hi MichaelW, thanks a lot! I thought that it would be somethin' more complicated :) I use Yariv Kaplan's winio lib for direct access in win9x/nt so if u're interested you may visit www.internals.com
Prior finding winio, I somehow managed to write a vxd for 9x but when it camed about w2k decided to go Google :)
Again, thanks and good luck!