SWI interface to Cumana's CDFSSoftISLCD

  • Home
  • Academic
  • RISC OS
  • Electronics

I've done some basic investigations into the two SWIs (software interrupts) provided by Cumana's CDFSSoftISLCD module, which drives their Panasonic CR-562 in an Acorn Risc PC via a small daughterboard. This should be used in conjunction with my CR-562 protocol page. All information is given to the best of my knowledge - however, there are very likely to be mistakes in what is outlined below. Standard disclaimers apply - I cannot be held responsible for any information given here, etc, etc.

SLCD_Op (&47580)

On entry:

R0 = possibly flags. Meaning unknown
R1 = number of bytes of command to write
R2 = pointer to buffer holding command to write
R3 = pointer to buffer to hold data returned
R4 = number of bytes to read into R3 buffer
R5 = timeout value (in centiseconds?)

On exit:

(Apparently) all registers preserved

This command performs an SLCD command by performing a series of writes to the drive. The command set is as outlined here. For example, to eject the drive tray, the following Basic can be used:

DIM in% 100, out% 100
in%?0=&06   : REM Tray out command byte
in%?1=&00   : REM command tail - bytes 1-6 all zeros
in%?2=&00
in%?3=&00
in%?4=&00
in%?5=&00
in%?6=&00
SYS "SLCD_Op",%0000, 7, in%, out%, 1, 1000

REM %0000 = flags 
REM 7     = no of bytes to write 
REM in%   = pointer to bytes to write
REM out%  = pointer to buffer to store read bytes
REM 1     = no of bytes to read
REM 1000  = timeout

Reading data from CD in the drive can be performed using the Read command, and the data will be put into the buffer pointed to by R3. Note that accessing the drive directly with this SWI may well confuse CDFSSoftISLCD or the drive, so the machine may hang if you access the drive using CDFS after calling SLCD_Op. If you reset the machine before trying to use CDFS, the problem shouldn't arise.

The above description seems to bear more than a passing resemblance to the parameters passed in R0-R5 to SCSI_Op, or at least those taken by the version on my Morley SCSI card. If this is the case, the flags may also be similar to those taken by SCSI_Op:

bit 0-7    device id
bit 24-25  00 = no data transfer, 01 = read, 10 = write, 11 reserved
bit 26     Scatter bit if set, R3 is the pointer to scatter list
bit 27     If clear poll escape during transfer and abort if escape pressed
bit 28     If set, repeatedly retry on timeout
bit 29     Set if background transfer (possible zero length)

Background transfer and scatter lists don't appear to be supported in the SLCD version, although I haven't looked into this very much.

SLCD_Drives (&47581)

On entry:

No registers used

On exit:

R0 = number of SLCD drives present in system. This is hardcoded to one for the Risc PC module.

Page by Theo Markettos (email at theo [at@] markettos.org.uk), last modified 2001-01-09

Return to my electronics pages or my RISC OS pages.