User Guide - simoninns/BeebSCSI GitHub Wiki
BeebSCSI User Guide
Using BeebSCSI as an ADFS SCSI Hard drive
Connecting BeebSCSI
BeebSCSI requires two connections. The primary connection is to the 1 MHz bus via a 34-pin ribbon cable. Simply connect the ribbon cable to the BeebSCSI board and then connect the other end of the cable to the 1 MHz bus underneath the BBC Micro or Master computer. The ribbon cable connectors should both have a notch to prevent reversal of the cable.
Additionally, the BeebSCSI board requires a 5V regulated supply. This can be sourced in several different ways; you can connect a DC jack to the 3-pin power header and then connect a 5V regulated supply to the jack. You can also make an adapter to take 5Vs from the computers own supply internally. Typically this involves making a splitter cable to take 5Vs and 0Vs from one of the computers internal power leads. The final option is to use the BBC Micro's/Master's external power connector located on the front of the power supply (underneath the machine); again there are both 5Vs and 0Vs available.
The 3 pin power header is to prevent damage from reversal and has a symmetrical pin-out of 0V, 5V and 0V. Only one of the 0V pins needs to be connected. Please see the BeebSCSI hardware guide for more details.
Upgrading the BeebSCSI firmware
If you would like to upgrade the BeebSCSI firmware to the latest version, please see the following section of the source code guide for instructions:
How to upgrade the BeebSCSI firmware
Quick-start
If you don't want to prepare your own SD card from scratch then you can simply download the zip file below and copy the contents onto a blank (FAT formatted) micro SD card. The zip contains a blank formatted LUN image along with a copy of the SuperForm utility (which you can use to create more LUN images), the BeebSCSI FAT file transfer application and a copy of the BeebSCSI ROM image:
Copy the BeebSCSI0 directory (including the directory itself) to the root of your SD card. Insert the card into BeebSCSI and boot your Acorn machine - as simple as that. For details of how to use the SuperForm utility as well as the required BBC Master configuration commands, please see the full details below. Please note that you will require an original version of the Acorn ADFS ROM for BeebSCSI to work; it will not function with 'patched' IDE versions.
Please note that 4 Gbytes is the recommended minimum micro SD card size. It is possible (and fully supported) to use smaller SD cards, however, a normal configuration of 4x512Mb LUNs (images) will exceed 2Gbytes due to the overhead of the FAT filling system.
Preparing an SD Card for use with BeebSCSI
To prepare an SD Card for use with BeebSCSI you will require the following:
- A BBC Microcomputer/Master with BeebSCSI connected to the external 1 MHz bus
- ADFS ROM – This must be the original ADFS ROM (not a patched IDE version!
- Superform on ADFS floppy (either 5.25” or 3.5” depending on your floppy drive)
- A floppy drive suitable for reading the Superform disc
- A FAT32 or exFAT formatted Micro SD Card (you will need a minimum of 2Gbytes of free space on the card for all 4 supported LUNs). Note that 4x512Mbyte LUNs will not fit on a 2Gbyte SD card due to the FAT filesystem overheads. A 4Gbyte card is recommended.
Insert a FAT32 or exFAT formatted Micro SD Card into the card socket on the BeebSCSI board and power up BeebSCSI and the host computer.
If the host computer is a BBC Micro the BeebSCSI board will be automatically detected. For a BBC Master ensure that the following configurations are performed (these commands assume a standard MOS image with ADFS in ROM slot 13):
*CONFIGURE FILE 13
*CONFIGURE HARD
*CONFIGURE NOBOOT
*CONFIGURE NODIR
Once configured the BBC Master should be reset with a CTRL-BREAK.
Now enter the following command:
*.
This should cause the BeebSCSI status LED to flash and, after a short delay, the computer should report an error such as:
Disc Error 2C at :0/000000
This indicates that the host can talk to the SCSI device, but the SCSI device is returning an error (since no LUNs are currently available).
Now insert the ADFS floppy containing Superform into your floppy drive and mount it and load Superform:
*MOUNT 4
CHAIN “SUPERFORM”
If successful, you should see the main Superform screen as shown in the following screenshot:
Superform: main screen
Now press C to change drive and enter N when prompted (to change drive number only). Superform will prompt you to enter the geometry of the drive. It is recommended that you use the following geometry (unless you know what you are doing!):
- Heads = 16
- Cylinders = 3971
- Step rate code = 1
- RWCC = 128
- Landing zone = 0
This specifies a drive with 511.9 Mbytes of space (536,752,128 bytes or 2,096,688 sectors) which is just below the maximum supported size of 512 Mbytes. Once complete you should be returned to the ‘Action:’ prompt as shown in the following screenshot:
Superform: change drive geometry
Now you are ready to format the drive (which takes BeebSCSI only a few seconds!). Press F and enter ‘Yes’ when prompted, then hit return for the default fill pattern. Superform will perform a series of actions to format the drive and then return you to the ‘Action:’ prompt as shown in the following screenshot:
Superform: Formatting complete
At this point you can enter Q to quit and then CTRL-BREAK the host. The new SCSI LUN should now be available. To test it enter the following commands:
*.
*FREE
Your screen should look similar to the following screenshot:
Testing a newly formatted LUN
As can be seen, Superform automatically copies itself to a newly formatted LUN. To format the other LUNs (1, 2 and 3 under ADFS) simply reload the Superform program and use the C command to change LUNs before performing the same procedure as before. Superform can be loaded using the following commands:
*DIR FORMAT
CHAIN “SUPERFORM”
Once you have finished formatting the LUNs you can remove the Micro SD Card and insert it into a Windows PC card reader to see how BeebSCSI has organised your LUN images (you can even copy the LUN images over to BeebEm and boot them as BeebSCSI images are compatible with BeebEm’s SCSI support). In the top-level directory of the card you should see a directory called “BeebSCSI0”:
Top level directory of a BeebSCSI Micro SD Card
Opening the directory will show the individual LUN images (DAT files) and the corresponding LUN descriptor files (DSC) that describe the formatted geometry of the drive:
BeebSCSI LUN images and descriptors
Note that the time-stamps of the files created by BeebSCSI will always read 9th April 2016; this is due to the fact that BeebSCSI does not have a real-time clock and cannot write the actual time of file creation.
You can now copy over the LUN images to BeebEm and use the emulator to load floppy drive images (or other hard drive images) to copy files, games and the like over to your BeebSCSI LUNs. Once done simply copy the LUN images back to the SD Card (in the BeebSCSI0 directory) and place the SD card back in the BeebSCSI board. After a CTRL-BREAK your new LUNs will be available from the host computer as real SCSI drives. You can also use the closed-source ADFS explorer utility to add files to the LUN images if required.
Since BeebSCSI is completely compatible with the original Acorn ADFS there is nothing new for you to learn; all other BeebSCSI functions are accessed using the normal ADFS commands. If you wish to have multiple SD Cards (for example, to have LUN image sets for different purposes) then it’s a good idea to type *BYE before swapping cards (this ensures you don’t remove a card during a write operation). Then you simply swap the card and *MOUNT the required LUN (a CTRL-BREAK is generally recommended, but not required).
Transferring FAT files to ADFS using BeebSCSI
BeebSCSI supports the transfer of FAT files (normal PC files) from the SD card to ADFS drive partitions (including both hard drive LUNs and floppy drives). In order to perform transfers you will need a copy of the transfer application (designed to run on both Acorn BBC Micro model B and the Acorn BBC Master). The application is included in an .adl (ADFS L format) floppy image available from the project Github repository. Note that this feature requires release V2.3 and above.
To transfer files simply remove the SD card from BeebSCSI and insert it into a PC card reader (no special software is required on the PC for this as FAT is natively understood by Linux, Windows and Macs). If a 'Transfer' directory does not exist on the SD card, simply add a new folder and name it "Transfer". The top-level directory of the SD card should look similar to the following image:
Top-level of a BeebSCSI SD Card
Open the Transfer directory and copy the files you wish to transfer into it:
The BeebSCSI Transfer directory
Once the required images are copied onto the SD card simply remove the SD card from the PC and insert it into the BeebSCSI board. On the Acorn computer load the 'BSTrans' using either LOAD "BSTrans" or CHAIN "BSTrans". Before running the application ensure that ADFS is selected as your filing system (*ADFS) and a valid BeebSCSI LUN image is mounted (*MOUNT 0).
When the application is running you should see a list of the files available from the "Transfer" directory on the SD card (note: The transfer application will run in Mode 7 to save memory if your machine does not support shadow RAM. If you run the application with a machine that has a 6502 copro or on a Master, the application will run in an 80 column mode and select a bigger transfer buffer to speed up file operations):
BeebSCSI FAT Directory Listing
If there are many available files you can page through the list using N and P for next and previous. Select the file you wish to transfer by pressing T and then entering the number of the file you want. The application will then ask for the file destination, this should be specified as a valid ADFS path and file name such as ":0.$.myTrans1" (i.e. destination is ADFS LUN 0, root directory, filename "myTrans1"). Once you have entered the destination path the transfer will start and the application will show the number of remaining bytes. After the transfer is complete you will be returned to the FAT file listing.
BeebSCSI FAT Transfer
The transfer application should be viewed as an example of how to communicate with the BeebSCSI and manipulate FAT files. If you would like to modify the application for other purposes, the source code for the application is open-source and you are free to change it and publish your own versions. Details of the SCSI commands used to access FAT files are provided in the BeebSCSI Technical Guide.
Physical mounting of a BeebSCSI board
Overview
The BeebSCSI board is designed to be both internally and externally mounted. The two mounting holes in the PCB align with the screw holes inside a BBC Master where the original AIV SCSI board was located.
BBC Master Turbo with two BeebSCSI Prototype boards
External mounting
For external mounting, it is recommended that the board is placed inside a small plastic box and held in place using self-adhesive mounting stands as used for motherboards and other types of circuits. For general use, it is possible to seal the PCB in a box (enclosing the PCB and the SD card) as there is no need to change SD cards for normal use. If you intend to regularly swap SD cards, it’s better to leave the top part of the plastic case off.
Internal mounting
For internal mounting simply align the BeebSCSI PCB with the internal screw holes of the BBC Master and fix in place with two screws. To connect the BeebSCSI board to the internal bus you will require the optional internal bus adapter board which connects directly to the BeebSCSI 1 MHz IDC connector and provides a 20 pin SIL connection to the BBC Master’s motherboard (this adapter is described in the BeebSCSI Hardware Guide).
You can also connect an internally mounted BeebSCSI board to the external 1 MHz bus connector by routing an appropriate length ribbon cable under the Master’s PCB. This is also possible in the BBC Micro by mounting the BeebSCSI board to the underside of the top part of the case and routing a ribbon cable under the motherboard.
Internal mounted BeebSCSI connected to the external 1 MHz bus
File read and write speeds
Overview
BeebSCSI provides extremely fast read and write speeds (considering the host hardware is from the 1980’s!). This section shows the measured speeds of BeebSCSI on various Acorn hardware with and without a second 6502 processor installed.
The speed test was performed using a simple BASIC program running in screen mode 7 (teletext); whilst there are ways to measure just the read or write part of the overall operation such tests do not give a practical measurement of the device in real day-to-day usage.
The BBC BASIC program used is as follows:
10 REM ****************************************
20 REM ** Simple Read and Write speed tester **
30 REM ** Simon Inns 20161123 **
40 REM ****************************************
50 :
60 PRINT "Writing..."
70 TIME = 0
80 *SAVE FILE16 2000 + 4000
90 PRINT TIME
100 :
110 PRINT "Reading..."
120 TIME = 0
130 OSCLI "LOAD FILE16 2000"
140 PRINT TIME
150 GOTO 60
As can be seen from the code, the program simply writes 16K of RAM to the disc and then reads it back; the BBC BASIC TIME command is used to measure the amount of time the *SAVE and *LOAD commands use to execute. The result of the TIME command is the execution time in hundredths of a second.
Results
Host | Co-processor | Read | Write |
---|---|---|---|
BBC Master 128 | None | 23 (70Kbytes/sec) | 34 (47Kbytes/sec) |
BBC Master 128 | 65C102 internal | 28 (57Kbytes/sec) | 38 (42Kbytes/sec) |
BBC Model B | None | 20 (80Kbytes/sec) | 33 (48Kbytes/sec) |
BBC Model B | 6502 | 25 (64Kbytes/sec) | 38 (42Kbytes/sec) |
These results were from BeebSCSI 7 using a Sandisk Ultra (class 10) 8 Gbyte SDHC card.