<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Thu, 02 May 2013 17:54:50 +0100
From   : jgh@... (J.G.Harston)
Subject: Updated IDEPatch/OSWORD &72 documentation

The BBC ADFS device drivers are SCSI drivers. The OSWORD &72 call takes 
a SCSI command block and returns SCSI error codes, and translated the 
SCSI command to the appropriate floppy code for floppy access.

When I wrote the patch for ADFS to use IDE drives I found it hard to 
track down documentation as to what the SCSI disk errors the API should 
return. Various documentation was inconsistent, and I had to translate 
several of the IDE errors to &7F "Unknown SCSI error". Some of the codes 
I was able to work out from disassembling ADFS itself.

I recently managed to track down the reference manuals for the Xebec 
and Apadec controllers, and more Acorn ADFS documentation, but this just 
added to the confusion. For example, the Acorn Winchester manual lists:
&20 Bad command
&21 Bad disc address
&25 Bad drive

but the Master Reference Manual lists
&60 Bad command
&61 Bad disc address
&65 Bad drive

and from disassembling the code there is
&40 Write protected
&48 CRC error
&50 Sector not found

But the Xebec and Apadec manuals only list errors in the &00-&3F range.

It suddenly clicked that what none of Acorn's documentation state is 
that ADFS adds &40 to the disk error number if it is the floppy drivers 
that are the source of the error - which explains the Winchester manual 
listing, eg &21 for Bad disk address and the Master manual listing &61 
for Bad disk address. The Winchester manual is documenting ADFS as a 
Winchester (hard drive) filing system, the Master Reference Manual is 
listing the results normally got from using floppies, forgetting about 
the existence of hard drives.

Anyway, that has allowed me to update IDEPatch to translate the IDE 
error numbers into the correct SCSI disk error numbers, and in the range 
&00-&3F as they are from the hard drive controller.

I've also found some more spare SCSI code in the ADFS ROM (the code 
that reads the SCSI error), so I'm tempted to see if I can squeeze in a 
device driver for drive 6/7. The Master hardware supports three 
floppies, so I could implement selecting the third floppy.

IDEPatch: http://mdfs.net/Info/Comp/BBC/IDE/ADFS
Translating disk errors: http://mdfs.net/Docs/Comp/Disk/Errors
Updated OSWORD &72 documentation: 
http://beebwiki.mdfs.net/OSWORD_%2672

-- 
J.G.Harston - jgh@...      - mdfs.net
<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>