From avison@argonet.co.uk Mon Feb 3 19:17:11 2003 Path: ewrotcd!feed-ewrotcd!pegasus.csx.cam.ac.uk!server1.netnews.ja.net!fu-berlin.de!uucp.muenster.de!dnewsfeed03.dtm.ops.eu.uu.net!dnewsifeed00.dtm.ops.eu.uu.net!bnewsifeed03.bru.ops.eu.uu.net!lnewspost00.lnd.ops.eu.uu.net!emea.uu.net!not-for-mail Newsgroups: comp.sys.acorn.programmer Date: Sat, 1 Feb 2003 19:30:27 +0000 From: Ben Avison Subject: Re: Buggering about with hard-disks Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII Organization: None References: <3e3ace1d$0$29913$fa0fcedb@lovejoy.zen.co.uk> <317794bd4b.druck@druck.freeuk.net> <3e3adfbf$0$29923$fa0fcedb@lovejoy.zen.co.uk> X-Newsreader: ANT RISCOS Marcel [ver 1.46] Lines: 25 NNTP-Posting-Host: userfw57.uk.uudial.com X-Trace: 1044128555 news.dial.pipex.com 233 62.188.28.119 X-Complaints-To: abuse@uk.uu.net Xref: news.chiark.greenend.org.uk comp.sys.acorn.programmer:7230 In article , Theo Markettos wrote: > Ben Avison wrote: > > It sounds to me like you need to get hold of a copy of the ATA spec, and > > do everything using SWI ADFS_IDEUserOp. > > Is this documented properly anywhere? The version in the PRM is vague > enough to be useless - for example what is the structure of 'parameter > block for command and results'? No, I agree the PRM entry is hopeless, and not having them handy I can't comment on the StrongHelp manuals. In practice, the seven bytes in the parameter block correspond to the seven ATA command registers - the SWI reads from the parameter block and writes to the registers on entry, and after command completion, the seven registers are read and the results written back to the parameter block. The flags in R0 determine whether the data block is read or written to, if at all. One other thing that's not made obvious is that the SWI can return a RISC OS error block pointer on exit, this can de distinguisehd from a disc error number by the state of the V flag (set for an error block, clear for a disc error number). You may notice a similarity with SWI SCSI_Op - I'm sure it's deliberate. Ben