Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!att!lzaz!hcj From: hcj@lzaz.ATT.COM (HC Johnson) Newsgroups: comp.sys.atari.st Subject: Re: AHDI (Was: GDOS, AHDI, FONTWID?) Summary: ahdi is just a TSR program Keywords: ahdi Message-ID: <627@lzaz.ATT.COM> Date: 13 Jun 89 14:52:08 GMT References: <18600014@uxh.cso.uiuc.edu> <1543@atari.UUCP> <1257@pkmab.se> Organization: AT&T ISL Lincroft NJ USA Lines: 43 In article <1257@pkmab.se>, daniel@pkmab.se (Daniel Deimert) writes: > > Talking about AHDI - what does it do exactly? It installs some kind of > driver, but what does that driver consist of. Is it possible for me to > write my own driver? AHDI (generic) is not a mystical program. It is a Terminate-Stay-Resident program that when loaded does these things: a. Attempt to read from each disk on the system. b. For each partition labeled GEM, store its starting sector (and size). c. TOS does all disk (floppy and hard) io thru low memory vectors (address) called hdv_rw, hdv_media, hdv_bpb. At boot time, these addresses are in the kernel, floppy disk handler. d. AHDI substitutes its own address for the kernel ones at these location (and remembers the old ones). e. TOS references a drive as 0-15. 0 and 1 are floppies, so AHDI passes these calls to the saved vector addresses. 2-15 may be hard drives, and if a starting sector, and drive address are saved for the number referenced, then it will do the disk operation. f. note that if a ram disk is added, it does the same thing in substituting its addresses, so first its called (last one first), then passes control to (presumedly) AHDI, which will do the work, or pass control to the floppy driver in the kernel. When AHDI scans for active disk drives it can do several things. Atari Brand: The Atari host adapter is a little sick and will not indicate whether drive 1 is present. It does OK on drive 0. SO, Atari's AHDI program only tests for drive 0 on each SCSI address from 0-7. As soon as it finds no drive, it stops looking, and the only drives letters that can be accessed are those partitions it found. BMS/ICD/SUPRA: These allow 2 or more drives on each controller. The Adaptec 400x series only support 2 drives. Each drive is tested on each controller until a drive 0 is not found. Howard C. Johnson ATT Bell Labs att!lzaz!hcj hcj@lzaz.att.com