- ADFS_ControllerType
-
Returns the controller type of a disc
On Entry:
On Exit:
- R0 = controller type
- 0 => disc not present
- 1 => 1772
- 2 => 765
- 3 => ST506
- 4 => IDE
- ADFS_PowerControl
-
Controls the power-saving features of the ADFS system
It can be dangerous to use the drive spin control SWIs on drives that do
not fully support them: the controllers on at least two drives tested hang
up when autospindown is enabled and a reset does not recover the situation
(power-on reset does).
R0 is reason code on entry:
- 0 => read drive spin status
-
On Entry:
On Exit:
- R2 = 0 => drive is not spinning
- R2!= 0 => drive is spinning
- 1 => set drive autospindown
-
On Entry:
- R1 = drive (4..7)
- R2 = 0 => disable autospindown and spinup drive
- R2!= 0 => set autospindown to R2*5 seconds
On Exit:
- R3 = previous enable value
- 2 => manual control of drive spin without affecting autospindown
-
On Entry:
- R1 = drive (4..7)
- R2 = 0 => spin down immediately
- R2!= 0 => spin up immediately
- ADFS_SetIDEController
-
Gives the IDE driver the details of an alternative controller.
On Entry:
- R2 -> IDE controller
- R3 -> interrupt status of controller
- R4 = AND with status, NE => IRQ
- R5 -> interrupt mask
- R6 = OR into mask enables IRQ
- R7 -> data read routine (0 for default)
- R8 -> data write routine (0 for default)
- SB -> static workspace
On Exit:
- VS => error
- VC => no error
All other registers preserved
- ADFS_IDEUserOp
-
Direct user interface for low-level IDE commands.
Must not be called in background.
On Entry:
- R0:
- bit 0 = action
- 1 => reset controller
- 0 => process command
- bit 24..bit 25 = transfer direction
- 00 => no transfer
- 01 => read
- 10 => write
- 11 reserved
- R2 -> parameter block for command and results
- R3 -> buffer
- R4 = length to transfer
- R5 = timeout in centiseconds (0 = default)
- SB -> static workspace
- MODE: SVC
- IRQ state: unknown
On Exit:
- VS => error
- VC => no error
- R0 = command status (0 or a disc error number)
- Parameter block updated
- R3 updated
- R4 updated
- R5 undefined
- All other registers preserved
- IRQ state: preserved but IRQs enabled during call