Emulation: ElectrEm

By Dave E

Originally published in EUG #65

The Acorn Electron is a fantastic machine permanently destined to suffer its peculiar curse of being 'born' later in time than the more superior BBC Micro. In this fourth article on the benefits of emulation (the process by which software written for one computer can be played on another), I am going to describe the history and current beta version of the first Acorn Electron PC Emulator, ElectrEm by Thomas Harte. Some of the advantages and disadvantages are also set out.

Unlike some of the previous and subsequent parts of this series, ElectrEm is more of a standalone utility than a PC 'tool' which can be used in some way to enhance a bona fide Electron game or program presentation. This article is therefore cast more in the mould of a review than guide but its short duration should provide a gentle introduction to this must have utility.

In the introduction to this article, I noted the Elk has always languished in the shade of the Beeb. Even PC Emulation, seemed set to exacerbate this legacy at first. For, when the programmers came along to make it happen, they found two machines which were 90% similar. But they also found the BBC had many more features than the lowly Elk and much more software available for it. Add to this the wildly different disc formats on the Electron (ADFS 1D00, ADFS E00, CDFS, DFS E00, Pegasus, SEDFS) and compare with the standard DFS 1900 on the BBC machines... You could forgive anyone for preferring to write a BBC, rather than an Electron, Emulator program, couldn't you?

Mid 1990s then saw a proliferation of BBC B, B+ and Master 128 emulators appearing out there in cyberspace. The BBC Lives website helpfully compiled all of them as they appeared at http://www.nvg.ntnu.no/bbc/emulators.php3 and a quick browse at their list as of today (June 2003) shows no less than 27 different emulators, produced by different individuals, available for download. Yet the Electron was to all appearance forgotten.

Now, if you are following this series then you will know by now where this article is going and the destination is ElectrEm, the first and best Electron emulator. Not the only one - several more have been released and met with varying degrees of praise - but certainly the only one I have complete faith in using. In over two years, and in stark contrast to some of the BBC emulators, ElectrEm has neither crashed nor corrupted a disc image. It has also become increasingly slick and 'feature-crammed' since it first appeared.

Currently we stand at ElectrEm 'Beta' release 9, which is more of a show of modesty by its creator Thomas Harte than recognition of the quality standard the emulator is of. ElectrEm can handle all ADFS discs, all DFS discs, tapes (UEF files, as described in the MakeUEF article), ROMs and even hardware expansions like the Jafa Mode 7 Display Unit. In fact, it can do almost everything a real Acorn Electron can.

Before stepping through typical uses of ElectrEm though, to return for a moment to the time it took for it to appear. If you followed the EUG news columns, you'll find its first appearance there in EUG #54, published in late 2000. At this point in time, Harte was concentrating on a utility emulating the most basic Electron system imaginable, that of an unexpanded Electron with a tape recorder attached. He wrote MakeUEF to create the images and ElectrEm Beta 3 which they could then be loaded into. Loading was at this early stage in real time - you had to watch the blocks of the game tick by, you still had to wait five minutes for Elite to appear on your screen.

Over the next three releases, and what for many probably represents the Golden Age of ElectrEm, coding to speed up the tape loading process was introduced and so too were the ACORN PLUS 1 and ACP's/Pres' AP3/4 expansions. Now while there is no doubt this was beneficial, one of the niggly points about ElectrEm for perfectionists like myself is that the 'speedup hack' of tapes causes some of the fine loading screens on tape games to be blanked and replaced with the game almost immediately. This is because originally these screens would be displayed for the two minutes it took the game code to load in. When the two minutes is reduced to half a second, the screen barely flashes up before it is removed!

Moving from bad to good though, the sidelining of the Electron for so long after emulation on its big brother Beeb began meant that, by the time ElectrEm came along, the industry had settled on standard types of disc image format. As we all know, with the Electron, you really need them. Harte programmed ElectrEm to adhere strictly to these standards which means all Electron disc images (.ssd, .dsd, .adf and .adl) work not only on his emulator but are also freely interchangeable with the established BBC ones.

Now, the emulator itself has its own website at http://electrem.emuunlim.com/. And, as noted earlier, it is jam-packed with advanced features; many more than I can possibly review in full here. Install it on your PC (a relatively fast download of a .zip file then unzip to, say C:/ElectrEm/) and double-click the .exe file and up pops the Graphical User Interface (GUI) with a brief introduction from the author.

ElectrEm is a nice emulator in that it is one which 'fills the screen' of your PC, i.e. it doesn't execute in a 320 x 256 window like BEEBEM does. Its GUI is also attractively presented with a transparent, holographic Acorn Electron on the Info page at which you will be looking before you load in a file.

At the top of the screen are five tabs, from left to right 'File', 'Hardware', 'ROMs', 'Keyboard' and 'Info'. Currently highlighted will be 'Info'. The beauty of ElectrEm is that all the operational requirements of the emulator itself are behind this 'curtain'; they are 'switched in and out' from the main Electron code itself by hitting F11. If you tap this function key now then you'll hear the familiar beep of the Elk powering up and the GUI will disappear to be replaced with the familiar:

   Acorn Electron



Loading a game is simplicity itself. In the GUI, the File menu, accessed by moving your mouse pointer to the 'File' tab and clicking once, shows a catalogue of the current directory. This can be navigated in the standard way by going up and down the hierarchy of whatever files you may happen to have stored on your PC. UEF files appear as little cassette icons, any disc images appear as (surprise, surprise) disc icons, any other files do not appear at all.

Beta 9 of the Emulator also has installed a small utility (the 'Emulator Autoload ROM') that allows 'one click loading'. When you click upon the tape or disc icon representing the file you wish to load, ElectrEm boots itself up as a tape, ADFS or DFS system automatically. If you are loading a disc game, it also executes a SHIFT-BREAK for you at the same time.

Now I appreciate many people using the emulator only to play Repton one last time think this a wonderful feature but personally, as someone used to working with the bona fide machines, it bugs me. To me, one click should merely insert the disc. This is because the user may simply just not want the disc to immediately execute.

Say for example you are copying a file from one disc system to another. On a real Electron, you insert the disc, type:


then insert the second disc, type:


and the file has been successfully moved. On ElectrEm this isn't possible as when you click to insert the disc, it is booted up at once. If there's a !BOOT file on the disc, you are immediately sent to the disc's menu, etc. You can hit BREAK (F12 on ElectrEm) then enter the first lot of commands. But if you then go to the GUI and click on the disc (eg. insert the disc) to which you want to copy the file, ElectrEm immediately !BOOTs that and the file you had loaded is lost.

If you access the 'Roms' sub-folder of C:/ElectrEm/ though, the 'Emulator Autoload ROM' can be deleted. I would suggest that for any serious uses such as those I just described, this has to be done.

The 'Hardware' folder remains a mystery to this reviewer as the emulator works well without any of its options needing to be re-configured. You need to note as well, natch, that changing some of these options has no effect whatsoever as they have not yet been implemented!

The 'ROMs' folder is where you can manually switch to ADFS or DFS if you need to do so without losing the file you have loaded. The 'Keyboard' folder where you can choose whether your keyboard is logically the same as an Electron keyboard (i.e. so you can still use the ZX*? key combinations without breaking your fingers reaching for the * on the PC keypad) or the PC keys physically 'map' to the equivalent Electron CHR$.

A big drawback in this particular release is the absence of some fairly essential keyboard functions. The cursor keys, for example, do not work hence making editing listings a long laborious process. Also, the $ key does not print in either logical or physical keyboard mode. If you want to work with strings it is therefore impossible. You cannot get the sign and you cannot copy it from elsewhere on the screen because for that you'd need the arrow keys!

What else is wrong? Well, one disc format, '.adl' is recognised by the GUI but gives a Disc Error on the Emulator. Harte ensures me this is simply an oversight on his part ('.adl' worked correctly in all previous releases) and it will be fixed for Beta 10. For the time being, however, you need to rename any '.adl' files you create or download to '.adf' ones. '.adf' files work perfectly, but the renaming process is tiresome, especially because there are such a large number of '.adl' files out there (for example, all the ADFS EUG discs are '.adl' files).

Finally, ElectrEm on my system (Admittedly not a very modern one) executes slowly. This is most apparent in Mode 2 (Watching that star appear on Kansas City's Ring Of Time takes a whole lifetime!) and it is painfully apparent that as ElectrEm has improved, its speed of execution has suffered. Betas 3 and 4 can be speeded up so as to run at almost triple-time - I played an absolutely manic game of Arcadians at such a tempo a few years back. But the latest version runs far too slowly to be fun on my PC.

Sound, which is not too hot on the Electron itself, is also currently missing.

As with many PC software reviews though, much of these later two 'faults' may depend on the performance of your own machine and for that reason I am quick to assure you not to read too much into them.

To conclude then, ElectrEm is a very able and powerful utility. Considering it is 100% free, it cannot be recommended enough. Plus, this article does not even touch on some of the bonuses it provides that would be impossible for the bona fide Electron to match (for example, multiplexed sprites) and which have caused bit twiddlers considerable delight.

Finally, as you will have gathered, it is by means of ElectrEm that the files you may have produced with FDC and MakeUEF can be checked and verified before you submit them to a website such as www.stairwaytohell.com for inclusion.

In part five of this series, we stick with the professional packages out there to assist 'Electron Under Emulation' fans with a critique of BBC Explorer, which allows 'point, click and drag' manipulation of individual files on a disc image. And finally, we'll see how both of these elements and the utility PPM2BBC will allow high quality PC images to be transferred to your little beige machine. Warning: You may never use Sketch again!