Electron User


E2P

Author: Roland Waddilove
Publisher: Permanent Memory Systems
Machine: Acorn Electron

 
Published in Electron User 4.01

Perhaps the best way to increase the power of a computer is to add a second processor. This can be made to work in conjunction with the one already present and the workload shared.

It's like the old saying "Two heads are better than one" when it comes to sorting out a tricky problem.

When Acorn designed the Electron way back in 1982 they built in to it the ability to add a second processor. In 1984, two second processors were released - a Z80 and 6502, named after the microprocessors they were based on.

Unfortunately, these are expensive and can only be used with the BBC Micro because they use the Tube interface only present on that machine.

You could in fact plug one of these second processors into the Electron if you made your own interface. However, they would still be too costly compared with the basic Electron.

Because of this, PMS has brought out its own 6502 second processor E2P-6502 at less than half the price of Acorn's, and you won't need a Tube interface to use it either.

Let's go into more detail about what a second processor is, and how it works. It can be thought of as a separate computer complete with 64K of RAM connected to the Electron. There aren't any plugs, sockets or keyboard though, just an edge connector which plugs into the Electron.

Unlike the Electron, it does not have any of the usual methods of input or output, which means that it can't load, save, print on the screen or even read a keyboard.

With two processors the workload can be shared so these relatively time-consuming tasks are handled by the Electron which acts as an Input/Output or I/O processor gets on with the business of actually running the program.

What happens when you load a program is that the Electron loads it and passes it over to be stored in the second processor, not the Electron itself.

When you subsequently run that program it is run in the second processor. However when you pint something on the screen, the characters are passed to the Electron and it is the Electron that prints them.

Of course while the Electron is busy printing, the second processor can get on with the task of running the program and it doesn't need to wait for the Electron to finish.

So you can see that while the Electron is carrying out one task, the second processor is busy with the next and the whole program runs much faster.

Well, that's the theory anyway. What is a seond processor like in practice?

The E2p, Electron 2nd Processor, is a fairly large but slim cartridge which plugs into either of the Plus 1 cartridge slots.

It contains its own 64K of RAM plus a few odd chips here and there to handle input and output to the Electron through the edge connector.

The Tube operating system is required before the second processor can be used otherwise its presence simply won't be acknowledged. The version I had for review was on disc and the second processor could be initialised with SHIFT-BREAK. After a slight pause, the current language is copied across to the E2p since all you get is 64K of RAM - no BASIC, no Operating System.

Normally this language will be BASIC, but it could be VIEW, VIEWSHEET, LOGO or whatever. This occupies &8000 to &BFFF in the memory map.

The Operating System for the second processor is tiny since the Electron does all the hard work and only occupies &F800 to &FFFF, which means that 14K from &C000 is free for data or machine code.

The Electron handles all screen output and contains the screen memory. Consequently HIMEM - don't forget your program is in the second processor, and not the Electron - is permanently fixed at &8000, whatever the mode.

It means an extra 20K of memory in Modes 0, 1 and 2, and about half this in Modes 3 to 6.

Similarly the Electron handles all loading and saving, so the input and output buffers and disc workspace are contained in the Electron, not the second processor.

So, even with a Plus 3, PAGE is firmly set at &800. No, that's not a typing error, you get around 30K of memory free in any mode, even with discs!

Machine code programmers can use the spare 14K at &C000 as well.

For instance, using View in 80-column Mode 0 with a Plus 3 on a standard Electron there is enough memory for around 4.5K of text, whereas with the second processor you get a massive 30K.

PMS also supplies HI-BASIC, a version of BBC Basic which sits at &B800 giving around 44K of memory free for BASIC or machine code regardless of mode.

This is ideal for large databases, adventures and programs which handle large amounts of data.

With two processors running in parallel, there can be quite significant speed increases, so I carried out a few simple tests. Table 1 shows the results for a standard Electron, Electron plus E2p and BBC Micro.

Test Electron E2p BBC
1 (Mode 6)
2 (Mode 1)
3 (Mode 6)
4 (Mode 1)
5 (Mode 2)
6 (Mode 2)
8.13
18.96
15.68
37.82
18.91
119.10
5.72
5.62
10.72
10.53
15.78
28.58
5.29
5.29
9.91
9.91
4.36
30.22
Table 1: Results of the speed tests
Test 1 is a simple loop counting up to 30,000 in Mode 6 and test 2 is the same text in Mode 1.

Notice that a normal Electron slows down in high resolution modes and that the second processor actually speeds up. It runs over three times as fast and is nearly the same as a BBC Micro.

Tests 3 and 4 are maths programs calculating SIN, COS and TAN in Mode 6 and Mode 1.

Again notice that the second processor version runs just as fast in either mode and almost as fast as the BBC.

Test 5 is a graphics program running in Mode 2. This is quite interesting since the Electron and second processor are both fairly slow, with the BBC Micro streets ahead. The reason is that the Electron handles all output to the screen whether you've got a second processor or not, so it makes little difference.

Test 6 really shows what the second processor is capable of. It's a short program with a lot of maths and graphics, so while the Electron is busy drawing on the screen the second processor is racing ahead and working on the calculations.

Here the second processor is faster than a BBC Micro and over four times faster than a standard Electron.

Speed tests do not tell the whole story though and a second processor isn't quite as useful as it may at first appear.

The problem is that nearly all software is designed to run on a standard Electron and it simply won't work with a second processor, though it's a simple matter to unplug it.

The trouble is that all the best software uses illegal methods to achieve its aims.

For instance, arcade games write directly to the screen memory for speed and colour. However, the screen memory simply isn't contained in the second processor so you can see the problem - or should I say, you can't!

So for the vast majority of software, the second processor is effectively redundant. Of course you can write your own software taking advantage of the great speed and memory but not everyone is an expert programmer.

What you get when you buy a second processor is a superb piece of equipment - which is offset by an almost total lack of software to take advantage of it!

It's great for word processing, spreadsheets and databases, but apart from these you'll have to write your own programs.

It's the same old problem. A computer or peripheral is useless without software and software houses won't write software unless there is a large user base.

The solution is, as always, in your hands. If enough Electron owners buy second processors, the software houses will start producing software for it.

Roland Waddilove