SCSI commands

From BeebWiki
Revision as of 05:46, 16 March 2017 by Jgharston (talk | contribs) (Initial page.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Notes on SCSI commands called with OSWORD &62 and OSWORD &72
============================================================

SCSI &04 - Format drive
X%?0=0
X%!1=data%
X%?5=command
X%?6=drive*32+&1E
X%?7=fill byte
X%?8=0 - sector=<drive>&1Eff00
X%?9=5 for MFM or 8 for RLL
X%?10=0


SCSI &0F - Write Sector Buffer (Translate) (Read Reverse)
Reads data in reverse order



SCSI &12 - Read device identity string
X%?9=45
$(data%+16) includes eg "ST225N", "ST125N", etc.


SCSI &15 - Write drive characteristics (Mode Select)
X%?9=36 (36 bytes of data?)
data%!0  = &08000000
data%!4  = &00000000
data%!8  = &00010000
data%?12 = 1
data%?13 = cylinders high
data%?14 = cylinders low^1
data%?15 = heads
data%?16 = rwcc high
data%?17 = rwcc low
data%?18 = rwcc high
data%?19 = rwcc low
data%?20 = landing zone
data%?21 = step
...
data%!24=1
data%!28=0
data%!32=128


SCSI &1A - Read drive characteristics (Mode Sense)
Reads:
data%?13 = cylinders high
data%?14 = cylinders low
data%?15 = heads
data%?16 = rwcc high
data%?17 = rwcc low
data%?20 = landing zone
data%?21 = step


SCSI &2F - Verify drive
X%?0 =0
X%!1 =0
X%?5 =command
X%?6 =drive*32
X%?7 =start sector DIV &1000000
X%?8 =start sector DIV &10000
X%?9 =start sector DIV &100
X%?10=start sector DIV &1
X%!11=0
Appears to verify &10000 sectors.
When error occurs, use OSWORD &73 to find the sector the error occured at,
continue verifying at the next sector