Hello all,
I've started work on an BBC Model B implementation for the myStorm BlackIce board. I'm sure most of you will be familiar with the BBC. It was my second computer, back in about 1985, replacing the Acorn Atom.
The history of Beeb FPGA implementations is quite interesting. I believe the first version was written by Mike Stirling in about 2011:
https://www.mike-stirling.com/retro-fpga/bbc-micro-on-an-fpga
This is no longer maintained, but pretty much all current versions are derived from it. In fact, there are now several actively developed BBC "cores", including:
- Mist (here)
- Zx Uno (here)
- Beeb Fpga (which I maintain here)
Most of the work in getting a Beeb Core running on IceStorm has been porting the VHDL code into Verilog. In this case, I started with the Mist code as it was already mostly Verilog, and then manually ported several more recent bug fixes from Beeb Fpga VHDL. It took about two days.
Here's a link to the top level IceStorm design:
This port it actually quite complete. Some highlights include:
- VGA or SRGB output
- an SAA5050 that accurately implements character rounding
- an SN76849 that gives the classic Beeb power-on beep and works with Speech!
- an M6522 with a working shift register (most don't). This is used for the file system.
- an SD card based file system
- the Stairway to Hell Collection (comprising nearly 1000 games)
Here's a few pictures:
The SD Card filesystem is called MMFS:
This uses a FAT32 formatted SD card with a set of disk images packaged in a BEEB.MMB file.
There is a sample BEEB.MMB file in the release that contains the Stairway to Hell games archive. To boot this just press shift print-screen (print-screen is the BREAK key on the Beeb):
Here's a few screen shots of classic Beeb Games running on the myStorm board:
Here's a BBC Basic benchmark running:
Here's a teletext test card - none of the other BBC implementations will render this correctly.
To use this on your IceStorm board, download the release files from here:
Then do the following:
Make sure the four DIP switches are in the off position.
Program the icebootbeeb.raw file into the ARM using dfu-util (or similar)
Format a SD card (as FAT32) and unzip the BEEB.MMB file onto this card. Put this in the SD card slot.
Connect a VGA monitor to PMOD 7/8/9/10
Connect a PS/2 keyboard to the lower pins on PMOD 11/12
The PMOD connections are the same as for the Atom project, and match the Digilent VGA and PS2 PMOD boards. The audio output is on PMOD 11/12 pin 9 (that's the top row). See the Atom thread for more details.
Switch SW4 is dual function:
- a short press emulates a power up reset
- a long press toggles the video output between VGA and SRGB
The LEDs are:
- LED1 (blue) - indicates SRGB mode enabled
- LED2 (green) - indicates the BREAK key is pressed
- LED3 (orange) - indicates shift lock is active
- LED4 (red) - indicates caps lock is active
It's also worth mentioning that I've been using the iverilog simulator, and I still find it amazing that you can simulate the complete booting of the Beeb, starting off with:
Wr: 01xx = xx
Wr: 01xx = xx
Wr: 01xx = xx
Wr: 01xx = 30
Rd: fffc = cd
Rd: fffd = d9
Rd: d9cd = a9
Rd: d9ce = 40
Rd: d9cf = 8d
Rd: d9d0 = 00
Rd: d9d1 = 0d
Wr: 0d00 = 40
Rd: d9d2 = 78
Rd: d9d3 = d8
Rd: d9d3 = d8
Rd: d9d4 = a2
Rd: d9d4 = a2
Rd: d9d5 = ff
and ending up 10 minutes later with this:
BBC Computer 32K
Model B MMFS
BASIC
>
and a 2GB waveform dump file.
So what's next? Well, there's still plenty of space available:
After packing:
IOs 58 / 107
GBs 0 / 8
GB_IOs 0 / 8
LCs 4149 / 7680
DFF 1404
CARRY 298
CARRY, DFF 73
DFF PASS 913
CARRY PASS 47
BRAMs 20 / 32
WARMBOOTs 0 / 1
PLLs 0 / 2
After placement:
PIOs 41 / 107
PLBs 817 / 960
BRAMs 20 / 32
It might just be possible to squeeze in a 6502 Co Processor for the playing of Tube Elite!
Or even an OPC6 second processor for educational purposes.
Dave