BLib.LVFS - Control Laser Video Disks ===================================== File: LVFS - Update: 1.00 Author: J.G.Harston - Date: 12-Dec-2010 The LVFS library contains functions for controlling and reading data from Laser Video Disks with the LVFS filing system. Requirements and Dependancies ============================= The library requires a global control block large enough to hold the data required for the calls accessible with X% holding the address of this block, and Y% holding X% DIV 256. A control block size of 128 bytes is sufficient for most calls, and is the largest than can be used with the Tube. This can easily be set up with DIM ctrl% 127 near the start of the program and X%=ctrl%:Y%=X%DIV256 at the begining of the major program code and at the start of any main program loop. Laser disk sector access ======================== err%=FNlvfs(addr%,cmd%,drv%,sect%,num%) FNlvfs() passes a LaserDisk SCSI command to the disk controller. It takes the same parameters as an ADFS SCSI command, with the obvious difference that you cannot write data to disks. addr% is the address to memory to read or write data cmd% is the SCSI command to perform drv% is the LVFS drive to use - usually there is only drive 0 sect% is the start sector to transfer data num% is the number of sectors to transfer, &0001 to &FFFF FNlfvs() returns the SCSI result code after completing. This will be zero for Ok and non-zero for an error. Commands -------- &00 - test drive ready &01 - seek to track zero &08 - read data &0B - seek to track &1B - park heads; park if num%=0, unpark if num%=1 Results ------- &00 - ok &04 - drive not ready &10 - sector not found Send LVFS and return result string ================================== result$=FNlvfs_fcode(command$) FNlvfs_fcode() sends an f-code command to the Laser Disk player and returns the result string. Send LVFS command ================ err%=FNlvfs_cmd(command$) FNlvfs_cmd() sends a LVFS command string to the Laser Disk player. Read LVFS result ================ result$=FNlvfs_rd FNlvfs_rd reads the result string from a previous FNlvfs_cmd() command. See also ======== See beebwiki.mdfs.net/OSWORD_62 for more detailed command and results.