[comp.sys.amiga.programmer] CMD_READ on hard drive devices.

sl87m@cc.usu.edu (The Barking Pumpkin Digital Gratification Ensemble) (06/25/91)

Hi!

I'm trying to access block directly on hard drives, but (obviously) I've got a
problem:

I OpenDevice(...) fine, but when I go to do a DoIO(...), my machine crashes. If
I do an OpenDevice(TD_NAME....), and turn on the drive motor, then do the
DoIO(), it works fine.  What could I possibly be doing wrong?  My assumption is
that  CMD_READ,CMD_WRITE are universal for all devices, trackdisk or whatever.

Thank you very much for your help in the past, people! (And for putting up with
these questions....)

James

peterk@cbmger.UUCP (Peter Kittel GERMANY) (06/25/91)

In article <1991Jun24.125808.48207@cc.usu.edu> sl87m@cc.usu.edu (The Barking Pumpkin Digital Gratification Ensemble) writes:
>Hi!
>
>I'm trying to access block directly on hard drives, but (obviously) I've got a
>problem:
>
>I OpenDevice(...) fine, but when I go to do a DoIO(...), my machine crashes. If
>I do an OpenDevice(TD_NAME....), and turn on the drive motor, then do the
>DoIO(), it works fine.  What could I possibly be doing wrong?  My assumption is
>that  CMD_READ,CMD_WRITE are universal for all devices, trackdisk or whatever.

Yes, the commands are universal, but *NOT* the device name. TD_NAME stands
for TrackDisk device. Any harddisk has its own driver. At first you must
find out the name of this driver, which you can spot in the device list,
see other thread in this newsgroup. Then take this name for your OpenDevice,
and all works ok.

-- 
Best regards, Dr. Peter Kittel  // E-Mail to  \\  Only my personal opinions... 
Commodore Frankfurt, Germany  \X/ {uunet|pyramid|rutgers}!cbmvax!cbmger!peterk