Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!spool.mu.edu!uunet!mcsun!unido!ira.uka.de!news From: S_ASCHMIDT@iravcl.ira.uka.de (|S| Angela Schmidt) Newsgroups: comp.sys.amiga.programmer Subject: Re: HD CMD_READ solved - solution and question Message-ID: <1991Jun27.111625.9945@ira.uka.de> Date: 27 Jun 91 11:33:43 GMT Article-I.D.: ira.1991Jun27.111625.9945 References: <1991Jun24.125808.48207@cc.usu.edu> <1410@cbmger.UUCP> <1991Jun26.133654.48232@cc.usu.edu> Sender: news@ira.uka.de (USENET News System) Organization: University of Karlsruhe, FRG (Informatik Rechnerabteilung) Lines: 52 In-Reply-To: sl87m@cc.usu.edu's message of 26 Jun 91 19: 36:54 GMT X-News-Reader: VMS NEWS 1.11 In <1991Jun26.133654.48232@cc.usu.edu> sl87m@cc.usu.edu writes: > > Curiosity yes/no question: > > CMD_READ seems to be taking an absolute block number, ignoring any partitioning > of the drive. Is this true? (I have to convert partition block numbers into > absolute block numbers to access the correct block. e.g. DH0: goes from track > 2 to track 445 with 26 sectors/track, 7 heads/cylinder -- I have to add 2*26*7 > = 364 to DH0's block number to get at it.) > Yes, that's true! Only the filesystem knows about your partitions. The device doesn't know anything about it. But some programs - like sectorama - don't know this. To get infos about the mounted partitions you have to read the devicelist. I posted an article how to do this 2 days ago. If you don't read the devicelist your program will only run on Amigas with the same harddisks and harddisk-partitions like yours. (If you coded your program to run on _your_ Amiga). That's no good solution... In some harddisk the partition-information is also contained in the Rigid-Disk-Blocks (on the first cylinders of the harddisk). If you're interessted I see your Rigid-Disk-Blocks (I think you use some, since your partition begins at cylinder 2), you can read them using the device. It also makes fun to find non-coded passwords in there (like in ALF2.0 :-). You even can get information about the Rigid-Disk-Blocks using a simple diskmonitor (for harddisks): Mount the Rigid-Disk-Block as an own partition (without using a standard filesystem, instead take somethink like a dummy-handler) and you can use the diskmonitor to look into these blocks. Or just take sectorama. :-) > > James > Hope it helps Angela ---------------------------------------------------------+--------------------- Angela Schmidt Internet: S_ASchmidt@iravcl.ira.uka.de | // (Nessy in IRC) BITNET: UK8B@DKAUNI2.BITNET | Amiga // Phone: +49 731 712316 & 721 6904-263 | \\ // only 1000 MEZ: (10am-9pm) (12pm-10pm) | \X/ the real one! ---------------------------------------------------------+---------------------