Getting the source code
The BeebSCSI source code, schematics and PCB design are available on GitHub; a link to the repository is given below:
Current build status
The current version of BeebSCSI available on github should be considered experimental as this is still a work in progress. Currently the build is tested against a BBC Micro model B (with ADFS) and a BBC Master 128. Further revisions are planned before BeebSCSI reaches a full ‘release’ status.
The repository is in five parts; the AVR boot-loader, the AVR firmware, the Xilinx CPLD firmware, the Eagle CAD schematic and board files and the BeebSCSI ROM. The following versions of software should be used to compile the source code:
- Atmel Studio 7 for the AT90USB1287 GCC code (Boot-loader and firmware)
- Xilinx ISE 14.7 (nt64) Application version P20131013 for the XC9672XL-7-VQ64 Verilog code
- Eagle CAD 7.7.0 for the schematic and board files
- BeebASM for the BeebSCSI ROM
Each of the parts includes a complete project file; compilation requires loading the project file in the IDE stated above and following the usual build process for the IDE. The AVR firmware now produces a BEEBSCSI.BIN image that is to be used to program the BeebSCSI board using the bootloader (see below) – however the BeebSCSI board must first be programmed directly using an AVR programmer (note: this is only required in order to program the bootloader – once the bootloader is in place all subsequent firmware programming does not require a dedicated programmer).
Programming a BeebSCSI board
Programming the BeebSCSI board requires 3 stages:
- Programming the CPLD
- Programming the AVR Bootloader
- Boot-loading the AVR firmware from an SD Card
Note: The BeebSCSI board must be powered in order to program. Ensure that the BeebSCSI board has a regulated 5V supply.
Programming the CPLD
Programming the CPLD requires the use of a Xilinx compatible JTAG programmer as shown in the following picture:
Please note that there is an error in the 7_5 PCB silkscreen for the CPLD header, the connections are the reverse of those marked and the 3V3 output from the 6 pin SIL goes to the pin closest to the IDC ribbon connector.
Once connected (and a green status light is shown on the programmer) use ISE iMPACT to program the CPLD in the usual manner.
Programming the AVR boot-loader
The BeebSCSI github repository contains both the AVR firmware and an AVR boot-loader. The AVR boot-loader allows the firmware to be flashed using only an SD card (containing the BEEBSCSI.BIN firmware image). This is to allow in-field upgrade of BeebSCSI without the need for programming equipment or technical knowledge of the AVR. However, before the boot-loader can be used to update the firmware, it must first be flashed to the AVR.
In order to flash the AVR, first connect a JTAG compatible AVR programmer to the BeebSCSI board as shown in the following picture:
Once connected load the AVR Studio IDE and the supplied boot-loader project from GitHub. Before flashing the AVR it is important to ensure the fuse settings are correct. The following picture shows the fuse settings for the boot-loader within the AVR Studio device programming dialogue:
Once the fuses are set, program the device. Once programming is complete the status LED on the BeebSCSI board should be flashing on and off slowly. This indicates that the boot-loader is active, but is unable to boot the main firmware (as it hasn’t been programmed yet).
Programming and upgrading the AVR firmware
In order to program the AVR firmware you will need a micro SD card formatted using FAT32 (i.e. 32GBs or less and formatted using FAT32 on a Windows or Linux PC). It is preferable to use a blank card.
You will need a copy of the latest firmware. This is available from the project Github in the zip file containing the release files:
Copy the BEEBSCSI.BIN file from the zip file to the SD card.
Power down the BeebSCSI board and insert the SD card containing the firmware image. Once powered up the status LED will remain off during programming. When programming is complete the status LED will flash rapidly to indicate success. To complete programming power down the BeebSCSI board and remove the SD card. If you want to reuse the SD card, simply delete the BEEBSCSI.BIN file from the card and reinsert. During the next power up, the BeebSCSI boot-loader will load the new firmware image and boot normally.
Note that the boot-loader does not provide any CRC checking of boot loader images. BeebSCSI boards can be upgrade and downgraded using the same procedure; it is even possible to load completely custom firmware images using the same technique. Boot-loading from an SD card cannot overwrite the boot-loader’s own code, so there should be no risk of corrupting the AVR during the boot-loader firmware upgrade process.
The BeebSCSI ROM
The BeebSCSI ROM source can be compiled with BeebASM and produces a BBC Micro and BBC Master compatible paged ROM image. This image can either be soft-loaded (using a command such as *SRLOAD BSROM 8000 4 on the Master), or the image can be programmed onto a real EPROM that is then inserted in to the appropriate ROM slot in the Acorn computer.