Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!emory!ogicse!pdxgate!eecs!bairds From: bairds@eecs.cs.pdx.edu (Shawn L. Baird) Newsgroups: comp.sys.amiga.programmer Subject: Re: Direct hardware drive access Message-ID: <2171@pdxgate.UUCP> Date: 1 Apr 91 10:51:43 GMT References: <2147@pdxgate.UUCP> <20215@cbmvax.commodore.com> <20221@cbmvax.commodore.com> Sender: news@pdxgate.UUCP Lines: 77 jesup@cbmvax.commodore.com (Randell Jesup) writes: >In article mykes@amiga0.SF-Bay.ORG (Mike Schwartz) writes: >>motor_wait btst.b #5,CIAA_PRA ; check READY line >> bne.s motor_wait ; busy wait until drive is ready >> rts >> >>When I tried this on an A500 at EA, it didn't work at ALL. > Bug report??? It seems to work ok for us currently (2.0 trackdisk >checks ready every .1 seconds up to .5, a compromise). What drives didn't >that code work on? Did you tell bryce? This code works perfectly fine on my A500. In fact, it's what I'm using now. Of course, when taking over the machine it may not matter that this is a busy loop. Checking every .1 seconds seems like a good compromise. But you say it checks up to .5 seconds. Does it return an error if the drive is not up to speed within .5 seconds? I modified most of my routines to use constants as you mention. Like you say, it's a good idea. I have my own include file that I have been adding to since starting my assembler projects. I never quite figured out where the common constants are listed so I just pick a suitable name and use it from there on out. It is, of course, much easier than trying to memorize bit numbers. > I've never heard of left/right for disks. It's always in/out. Left/right just doesn't seem to make any sense. On one side of the spindle it's left and on the other it's right. In/out however, make perfect sense. >>PEOPLE NOTE THIS! There might not be a drive that requires it yet, but there >>might be in the future. EA has had ZERO returns or reports of any problems >>with these routines, but it is always a good idea to do it right. > This sort of thing might not come to the attention of EA unless there >were a lot of them out there. And as he says, there is no guarantee that >the code above will work with the drives that leave the factory tomorrow or >any other day. The Chinon timing diagrams in the Hardware Reference Manual explicitly show that the direction should be set prior to stepping the drive. However, they don't show how long, so I'm assuming just doing it in two different instructions is the main thing. That is, using two different instructions would still work on a 68030 machine? >>The original poster asked how to step the heads, not how to read/write >>to the disk. > Actually he seemed to be recalibrating the heads to track 0. You are both correct in essence. I was trying to figure out how to step the heads of the disk to get to track 0. It seems to be the only way to know exactly what track you are on. I assume from then on that you keep the value of the track and modify it every time you step in or out. >>Another word of advice. Do not use the book "Amiga Disk Drives: Inside >>and Out" by Abacus. I was told by Commodore when I was writing my routines >>that the book is full of misinformation and was likely to cause people >>to have disk driver problems. Okay, what book should you use when accessing the drives at such a low level? The Hardware Reference Manual is a good reference, but is somewhat lacking in detail when it comes to such a low level of drive operation. Oh, by the way Mr. Jesup, could you possibly send me some email with the address to C.A.T.S. or somesuch? One final thing. A third party manufacturer is producing a high density 3.5" drive for the Amiga. Does anyone know what ID string it uses? Was this ID string assigned by Commodore? Also, will the high density 3.5" drives in the 3000UX be compatible with this third party drive? Is Commodore going to set a standard for high density 3.5" drives? --- Shawn L. Baird, bairds@eecs.ee.pdx.edu, Wraith on DikuMUD The above message is not licensed by AT&T, or at least, not yet.