Utilities ROM - simoninns/BeebSCSI GitHub Wiki
BeebSCSI Utilities ROM
Overview
The BeebSCSI Utilities ROM is an optional add-on to the BeebSCSI system and provides access to additional feature of BeebSCSI from the BBC Micro and Master command line. The ROM provides 5 additional star commands:
- SCSIDSC - Show the SCSI drive geometry for the currently selected drive
- SCSISTATUS - Show status information about the BeebSCSI device
- SCSITRACE - Control the tracing and debugging features of BeebSCSI
- SCSIJUKE - Control the LUN jukeboxing feature of BeebSCSI
- FCODER - Display the last received F-Code response
Information about the available commands and their parameters can be viewed at any time by issuing a *HELP BeebSCSI command. The output from this command is shown in the screen shot below:
*HELP BeebSCSI output
Supported commands
*SCSIDSC
The *SCSIDSC command shows the SCSI LUN geometry for the current mounted drive. This is checked using a SCSI Mode Sense command. With BeebSCSI the displayed result is based on the LUN's .dsc file (that contains the 22 byte descriptor). This command will work with any SCSI device that supports Mode Sense. Please note that the SCSI descriptor is the SCSI controller's view of the drive geometry and this may vary from the ADFS view (that is based on the ADFS partition created upon the SCSI LUN). The output from the command is shown in the following screen shot:
Output from the *SCSIDSC command
*SCSISTATUS
The *SCSISTATUS command shows the current status of the BeebSCSI device. Note that this is not necessarily the same as the ADFS or VFS view of the SCSI drives. The returned status information includes the following information:
- LUN status (for LUNs 00-07) - This indicates if the SCSI LUN is 'mounted' (i.e. in the started state) or 'unmounted' (in the stopped state). Note that, for ADFS, only the first 4 LUNs are available (VFS can mount all 8 LUNs).
- Current Jukebox number - The Jukebox number indicates which directory BeebSCSI is using currently to read and write LUN images. For example, if the jukebox number is 003, the current LUN directory is 'BeebSCSI3' on the SD card. The jukebox number can be from 0 to 255.
- Emulation mode - This indicates if BeebSCSI is in the 'fixed' emulation mode (connected to the external 1 MHz bus and in ADFS mode) or 'LV-DOS' mode (connected to the internal 1 MHz bus and in VFS mode with F-Code support). For readability the command reports the emulation mode as 'Winchester' or 'Philips VP415'.
- BeebSCSI firmware - This reports the major and minor revision numbers of the firmware running on the BeebSCSI device.
Example output from the *SCSISTATUS command (executed from ADFS) is shown in the following screen shot:
*SCSISTATUS command output
*SCSITRACE
The *SCSITRACE command allows the user to turn on and off the various SCSI trace and debug functionality provided by BeebSCSI. The command is automatically sent to either the external or internal BeebSCSI board based on the currently selected file system (in VFS the command is sent to the internal bus and for ADFS the command is sent to the external bus). The command requires a numeric parameter between 0 and 255. The meaning of the value is based on the provided trace and debug levels supported by the BeebSCSI firmware. These levels are shown in the following list:
- 0 = All debug output off
- 1 = All debug output on (except blocks)
- 10 = File system debug on
- 11 = File system debug off
- 12 = SCSI Commands debug on
- 13 = SCSI Commands debug off
- 14 = SCSI Blocks debug on
- 15 = SCSI Blocks debug off
- 16 = SCSI F-codes debug on
- 17 = SCSI F-codes debug off
- 18 = SCSI state debug on
- 19 = SCSI state debug off
- 20 = FAT FS debug on
- 21 = FAT FS debug off
*SCSIJUKE
The *SCSIJUKE command allows the user to set the current jukebox number. The Jukebox number indicates which directory BeebSCSI is using currently to read and write LUN images. For example, if the jukebox number is 003, the current LUN directory is 'BeebSCSI3' on the SD card. The jukebox number can be from 0 to 255.
When the user issues the *SCSIJUKE command the BeebSCSI firmware will look for the correct directory on the SD card. If the directory does not exist, BeebSCSI will automatically create a new directory with the correct name. A newly created directory will not contain any valid LUNs; in order to use a new jukebox number the user must first switch to the jukebox number and then format the required LUNs using a SCSI formatting utility such as SuperForm (please see the BeebSCSI user guide for details).
The following screen shot from Windows 10 shows an SD card with 4 jukebox directories (0, 1, 2 and 255):
BeebSCSI SD card showing jukebox LUN directories
The *SCSIJUKE command will only work successfully if there are no currently mounted drives. You can check the current status of all drives by issuing a *SCSISTATUS command. In ADFS and VFS you must issue a *BYE command before performing a *SCSIJUKE as shown in the following screen shot:
Example of using the *SCSIJUKE command
*FCODER
The *FCODER command displays the last received F-Code response (and is therefore a VFS only command). This command is to complement the VFS ROM that provides commands for sending F-Codes but does not provide a command to view the response. An example of *FCODER use is shown in the following screen shot:
Example of use of *FCODER
Error messages
The BeebSCSI ROM can produce the following error messages:
- "Unsupported filing system in use - Only VFS and ADFS are allowed" (&F8) - You must select either ADFS or VFS as the filling system before issuing the command
- "Missing or invalid parameter" (&FC) - The command required a parameter which was either missing or not a valid value
- "Supplied parameter is out of range" (&FC) - The supplied parameter was not within the expected range for the command
- "Filing system reported SCSI error" (&C7) - The SCSI communication resulted in an error
- "Filing system must be VFS" (&F8) - You must select VFS as the filing system before issuing the command
- "Juke failed - did you *BYE?" (&C7) - A *SCSIJUKE command was issued but one or more LUNs were still mounted.