The venerable BBC micro celebrates its 40th anniversary this year.
We have one in working condition in the Centre for Applied Computer Science. The University’s Head of Networks stuck his head around our office door and casually mentioned they had found a BBC Micro in a store cupboard and asked whether we wanted it. My inner teenager who had wanted a BBC since 1981 immediately said “yes please”. A few power supply capacitors needed changing and a TV with analogue input was found. The beeb made a happy chime and we were ready to go. Now what?
For those of you too young to remember the 8-bit home computer revolution in the 1980s, the BBC Micro was an important computer for home users. Most of us could not afford one, they cost almost £400 in 1981; adjusted for inflation that is a shade under £1600 today. That’s Apple money! The contemporary ZX Spectrum was a quarter of the price so most of us had those instead. It is difficult to explain just how limited the early 8-bit home computers were in modern terms.
The BBC Micro was a beast for its time. It had a full keyboard, plenty of expansion interfaces and was built without the cost saving compromises of the Spectrum. We have to remember that as an 8-bit system it was very limited. Even with 16 bits for addressing that only gives you an address space of only 64Kb. That’s right, kilobytes – not gigabytes or megabytes: 65536 memory locations. Actually it is worse than that, only half that space was available to programmers. The other 32Kb was used by the system. The 1980s gave us a special breed of programmer trying to wring every last shred of performance from these relatively limited computers.
A great example of creative programming is the renowned Elite space trading (and shooting) game. Legend has it that the game used every single byte of available memory. The legend isn’t quite true, according to the dedicated BBC Elite Wiki there were actually 66 bytes of unused memory! There is a famous hack used in this game which is very impressive. The BBC micro had a number of graphics modes with different capabilities. One mode allows (relatively) high resolution graphics with a limited number of colours. Another offers more colours at much lower resolution. Elite wanted both! The above picture shows a high res, low colour spaceship in wireframe view in the top part of the screen and a low res full colour console at the bottom.
As detailed in the Elite Wiki the programmers exploited the way screens refresh faster than our eyes can follow. On a UK screen running at 50Hz the image is drawn from top to bottom. The programmers calculated how many clock ticks it would take to get 3/4 of the way down the screen. They set a timer running at the start of each screen load and put the graphics into the high res low colour mode. When the timer expired 3/4 of the way through drawing the screen it generated an interrupt and the graphics mode was switched to the high colour mode for the rest of the screen before switching back and resetting the clock for the next frame.
Andrew Holland who regularly writes here is a big fan of the current Elite Dangerous game (available on Steam if you are interested). It has all the high end graphics and performance that the original lacked. In every way it is a better game. You could not squeeze it in to 32k of memory though.
We did a quick audit, among the Computing team we have a Commodore 64, a ZX Spectrum 128 and a ZX81 all in working order.
Having been a Commodore fan boy for the past 35 years, I recently decided to start learning machine language for the C64, as well as programming music using the SID chip. Unfortunately I’ve not had the time to dive deep into the subject as of yet.