Linux Format

Acorn Electron

Les Pounder takes us back to a time when bedroom coders ruled the world and playground battles were fought for your micro.

-

Les Pounder recalls when bedroom coders ruled the world and playground battles were fought for your micro.

The BBC Micro, made by Acorn Computers, may have been its most famous machine, but for most 1980s home users the price tag was just a little too high. A budget alternativ­e was needed to compete against the Spectrum. In August 1983 the Acorn Electron was introduced to the world, with 32KB of RAM and a Synertek SY6502A CPU clocked at 2MHz, specificat­ions similar to the BBC Micro Model B.

The Acorn Electron was a successful machine, selling around 200,000 units over its lifetime, but it never really put up much of a challenge. But to many devoted fans the Acorn Electron was their route into computing.

The BBC Micro dominated the 1980s education, semi-profession­al and hobby markets. This author remembers being introduced to the “Beeb” by their father’s friend who was an electronic­s engineer. But the price of the BBC Micro meant that they had to “make do” with a Commodore 64 instead.

The Acorn Electron was unofficial­ly announced in 1982, by Acorn co-founder Hermann Hauser responding to a question in an issue of Popular Computing Weekly. The question asked was if the ZX Spectrum was hurting sales of the BBC Micro. Hauser’s response was that the company was already working on a new machine, saying that, “Later this year Acorn will release a new computer, priced under £200 that will compete and outperform our competitio­n.”

The idea of the Acorn Electron came from Chris

Curry, who saw that Acorn was missing out on the gaming market, which was dominated by Sinclair and Commodore. The Acorn Electron saw Acorn reduce the number of chips used inside the machine, from 102 to just a dozen. An example being the single chip that powered the audio, video and IO ports. The Electron is also missing Mode 7 graphics, a high-resolution mode for text that was used with CEEFAX to transmit live data from the BBC. Ultimately the smaller chip count meant a smaller mainboard, which reduced its costs and the size of the machine. This also meant that the Acorn Electron was missing many of the expansion features present on the BBC Micro. There was no Econet networking, expansion slots, RS423, analogue, printer and user port. Extra features could be added, but you had to pay a little extra for the Plus 3 add-on that introduced a 3.5-inch floppy disk drive.

Emulator options for the humble Acorn Electron are limited. We searched for a few and the top search was Elkulator (www.elkulator.acornelect­ron.co.uk), which seemed to meet our needs, but then a chance encounter with a Snap package lead us to Clock-Signal, which was easy to install and covered more than just the “Elk”.

To install Clock-Signal, you’ll need to have Snap packages enabled. This is done by default in Ubuntu 16.0 and onwards, but if not already enabled there’s a great guide to follow at https://snapcraft.io/docs/ installing-snap-on-ubuntu, which will get you up and running. Open a terminal and run the following command to install Clock-Signal:

$ sudo snap install cl

We can then run Clock-Signal from the terminal by typing the following:

$ clock-signal

Clock-Signal’s user interface is simple and clean. Click on the Electron tab and you’ll be prompted to drop two files on to the tab. These files are the BASIC ROM and OS ROM. These are images taken from real Electrons and can be easily sourced online.

BBC Basically

“It [Acorn Electron] speaks the same language as most school children, BBC BASIC”. This advertisem­ent for the Acorn Electron, which was shown on UK television in 1984, was a clever means for parental approval for a home computer. If the children can use the same software at home as they do in school, but for less money, then parents would be more inclined to buy it. The Acorn Electron ran BBC BASIC just as well as the BBC Micro. So let’s get into some BASIC code to warm up our skills.

Start the emulator and you’ll see the BASIC prompt. If you’re not familiar with this, we can type lines of BASIC code in the prompt. A line can start with a number, indicating that it’s part of a larger program. Alternativ­ely, we can just type a line of code and see an immediate response.

Our test code will print a message to the screen, in a random colour, chosen from a maximum of eight available colours for Mode 2.

We start with line 10, setting the graphics mode to 2, which has a resolution of 160x256 pixels:

10 MODE 2

Line 20 is where we start a loop, in this case it’s similar to Python’s “while True” loop.

20 REPEAT

Line 30 and we use the COLOUR keyword to set the colour of the text from one of 15 options. This includes black, which can be used to create a flashing effect.

30 COLOUR RND(15)

On line 40 we see the message that we wish to print. This can be anything you want.

40 PRINT “Linux Format Roolz”

The final line is 50 and this completes the loop, forcing it to stay running and our code repeats at line 20.

50 UNTIL FALSE

When ready type RUN and press Enter to start the code. You should see your message scroll up the screen, in any of the available colours. When done, press ESCAPE to stop the code (on a real Electron this would be the BREAK key). To change the message, retype line 30 and change the text.

We’re back in the BASIC groove, so let’s make things a little harder? This next project will draw vectors on the screen using the Mode 2 graphics mode, a for loop and random numbers.

We start with line 10, which sets the graphics to mode 2

10 MODE 2

We then create a for loop that will iterate four times.

20 FOR I = 0 TO 4

Lines 30 and 40 create variables, HIGH and LOW that contain a random number between 0 and 400 (HIGH) and 100 (LOW)

30 HIGH = RND(400) 40 LOW = RND(100)

Lines 50 to 80 use the DRAW keyword to draw lines from X and Y coordinate­s. In our case these values are randomly generated each time the for loop iterates.

50 DRAW HIGH,LOW

60 DRAW HIGH,HIGH

70 DRAW LOW,HIGH

80 DRAW LOW,LOW

The final line, 90, sees the for loop iterate until it’s complete.

90 NEXT

Run the code and you’ll see vectors drawn across the screen.

Let’s tweak that code a little. This time we won’t generate a random LOW number. Instead, the lowest value is always zero. This will give us rectangles of varying sizes.

10 MODE 2

20 FOR I = 1 TO 10

30 HIGH = RND(400)

40 DRAW HIGH,0

50 DRAW HIGH,HIGH

60 0,HIGH

70 DRAW 0,0

80 NEXT

Type RUN and watch the boxes appear! But those boxes are boring, seriously, so we need colour and to do that we’re going to sneak a line between 20 and 30 that will give us multi-colour boxes.

GCOLis used to set the foreground colour. Using 0 to indicate that we want to draw in our chosen colour, we then use RND to randomly choose a colour from the 15 available in mode 2. 25 GCOL 0,RND(15)

Run the code and watch for the rainbow!

For the final BASIC project we’ll draw lines on the screen, using all 15 colours on offer, which are chosen randomly. The line pattern will look like a colourful star exploding on the screen.

As ever, we start with line 10, setting the mode to 2, giving us 15 colours and a small 160x256 resolution to draw upon.

10 MODE 2

We then start a loop on line 20.

20 REPEAT

Line 30 and we set the foreground colour to a randomly chosen colour from the 15 that we can use.

30 GCOL 0,RND(15)

Next we need to move the starting point to the centre of the screen.

40 MOVE 640,512

On line 50 we tell the code to draw lines between two randomly chosen X and Y coordinate­s. This will give us lines of random length, colour and position.

50 DRAW RND(1280),RND(1024)

The final line keeps the loop running.

60 UNTIL FALSE

Type RUN and press Enter. Then sit back and watch the explosion of colour!

Playing a game

The Acorn Electron may have come from the same people as the BBC Micro, but at its heart it was a crippled machine that required clever programmin­g from bedroom coders. It ran a little slower and this meant that games designed for the BBC Micro had to be ported for the Electron. That doesn’t mean that the Electron was a bad games machine, far from it. The restrictio­ns imposed on developers forced them to be creative with what they had. An example of this is the seminal Elite, the space trading and combat game by David Braben and Ian Bell. The BBC Micro version used both modes 4 and 5 together for a better overall appearance, but the Acorn Electron was only able to manage mode 4: black and white graphics. But Elite on the Electron was still a joy to play. Sure, we had fewer ships (five versus the BBC Micro’s six on tape and 18 on floppy disk) to choose from and a bug on the first batch of copies that prevented hyperspace, but it was a solid conversion of the BBC Micro’s perfect version.

If you fancy a little fiendish exploring and puzzle action then Repton 2 is a solid, if difficult game. You need to find all of the pieces, visit every transporte­r and kill all 18 enemies to finish the game. Don’t be deceived by the cute eight-bit sprites – they’re out to kill you!

As ever, these games are stored in a ROM format, and despite their age, are still under copyright. The best way to enjoy them is via the original hardware, but if that isn’t possible then you’ll be pleased to know that there’s a JavaScript emulator that comes with the top games, all playable in our browser. Visit https://elkjs. azurewebsi­tes.net and spend some time with these great games.

Demoscene

You wouldn’t guess that the Acorn Electron had enough “poke” to run complex demos, well guess again! We went looking for demos and found plenty on www.

stardot.org.uk. The first that stood out to us was 0xC0DE’s plasma egg demo, which has no audio but features a repeating pattern of glowing eggs in a plasma like sequence. But the better demo is Racing the Beam (https://bit.ly/lxf279-racing-beam), that uses Mode 2, flowing text all at 50fps! There are two versions – one with a pinch at the centre of the screen and text/sprites that flow to the centre, pinch then expand as they leave. The other version expands the sprites/text as they approach the centre. This is an exceptiona­lly impressive demo for such an underpower­ed machine.

The Acorn Electron 2021

Finding floppy disks and tapes from the 1980s is becoming harder. The media is prone to rot and damage while also succumbing to the ravages of time. More enthusiast­s are turning to SD cards to load their games, often with entire collection­s stored to a single thumbnail-sized card. With that in mind, makers and companies are giving enthusiast­s what they want. For example, Ramtop Retro (http://ramtop-retro.uk) has a range of devices that provide a micro SD card interface along with an extra 64 to 128KB of RAM – quite an upgrade for the humble Elk! Other sites, such as New Stuff for Old Stuff (https://newstufffo­roldstuff.com) has similar devices, and a tape drive emulator that can load tape images of games.

Popping on to eBay and we can see that there are many machines on offer, but as always buy with caution. Most machines will need some cosmetic work. Some deep scratches and dirt can be polished out with damp baking powder and after a good clean a machine can be retro-brighted using a mixture of water, hydrogen peroxide and sunlight. Obviously when using chemicals take the appropriat­e safety measures to protect yourself and your eyes!

Looking inside the Acorn Electron and while there are only a few electrolyt­ic capacitors – some of which may not need to be replaced – it’s best practice to make a note of their values should they expire. If these capacitors have a bulging top, that means they’re about to or have already leaked. Replace any dodgy caps! This applies to the power board (right side of the case) and care should be taken when removing them, as the larger capacitors can hold a decent “surprise!”

The Acorn Electron legacy

It may live in the shadow of its older brothers, but the Acorn Electron is a great machine. It had a much larger game library, it’s cheaper to buy (it fluctuates a little) and we have a much smaller computer that offers BBC BASIC – the best BASIC of that era. It didn’t sell very well, though, and the home computer crash led Acorn to be sold to Olivetti in 1985 and for the BBC to waive 50 per cent of its royalty payments that Acorn had to make to them for the BBC Micro. But for a short few years in the 1980s, UK home computer users were spoiled with a plethora of choices. Commodore, Sinclair and Amstrad were the computers that every kid had or wanted. But the plucky Acorn Electron had a core community, enough for their own magazine, who wanted to explore all that this machine could offer.

 ??  ?? BBC MicroBot is an awesome resource of knowledge and inspiratio­n for BBC BASIC projects, and writing BASIC via a tweet is a worthy challenge.
BBC MicroBot is an awesome resource of knowledge and inspiratio­n for BBC BASIC projects, and writing BASIC via a tweet is a worthy challenge.
 ??  ?? The Acorn Electron may have been Acorn’s attempt to fight back against Sinclair, but to many people it’s where they cut their teeth in programmin­g.
The Acorn Electron may have been Acorn’s attempt to fight back against Sinclair, but to many people it’s where they cut their teeth in programmin­g.
 ??  ?? The coloured star effect is a sight to behold. Using all 15 colours will create a twinkle effect and animate the project.
The coloured star effect is a sight to behold. Using all 15 colours will create a twinkle effect and animate the project.
 ??  ?? By setting the screen to mode 2 we lost the high-resolution graphics, but gain a digital canvas that we can use to create all manner of geometric shapes.
By setting the screen to mode 2 we lost the high-resolution graphics, but gain a digital canvas that we can use to create all manner of geometric shapes.
 ??  ?? On the face of it, Repton 2 looks simple, right? Wrong! It’s a fiendish puzzle game that will test your skills and fray your nerves.
On the face of it, Repton 2 looks simple, right? Wrong! It’s a fiendish puzzle game that will test your skills and fray your nerves.
 ??  ?? Racing the Beam is a clever demo that shows off what’s possible with this budget machine.
Racing the Beam is a clever demo that shows off what’s possible with this budget machine.

Newspapers in English

Newspapers from Australia