This article is copied from page 18 of the November 1997 edition of Archimedes World. Reproduced with kind permission. The text on this page is copyright Nexus Special Interests Ltd. 1997.


Emulators
The sincerest form of flattery?

For those completely in the dark, modern computers are fast. Very fast compared to, say, ten years ago. They are capable of emulating, in software alone, the hardware that made up some older computers: this, then, is an emulator, a program which will make one computer or operating system function as another.

The emulator which has been around for years is Acorn's own 65Host, which did a rough job of making old ARM2/3 machines behave as a BBC Micro running OS 1.2. It was created solely for the purposes of compatibility with 'serious' BBC software. This was ten years ago, when the Archimedes would still run quite a lot of BBC programs. My father, for many years, ran a payroll program: first on our BBC Master, then under emulation on an A3000, and thus the emulator served its purpose.

For similar reasons PCEm was born - a more ambitious project which pretended to be a 286 PC, and ran DOS with a VGA display ... if you were lucky. The most impressive thing I think I managed with this was getting Battle Chess to run, albeit without the sound.

The problem with both these emulators was that they were never designed to be 'perfect' clones of the machines they feigned: they did the job of running serious software but didn't emulate some of the more intricate machine aspects very well. Far from being a picky academic consideration, a near-perfect emulation is required for trying to run games, which in those days were notorious for exploiting every tiny feature of the hardware in order to achieve more speed.

Sinclair lives!

The first emulator I remember using for my A3000 (equipped with a state of the art 35MHz ARM3 processor) was MZX, released in 1994, which still works on the latest Risc PCs. Jet Set Willy finally reared his head again.

However, being public domain, it brought to the attention of the public some of the legal problems with using emulators. THe first was the operating system present in these old machines. Although there are no problems in writing a piece of software to do the same job as a microchip, Clive Sinclair still had to sit down and write an operating system for his first Spectrum, and operating systems are copyrighted pieces of code.

So, in this case, somebody had to sit down and dump the Spectrum's 16K, ROM-based operating system into a file for an emulator to work with. You can find this file inside the !MZX application as 'zxrom'. It contains the code for the Spectrum's BASIC interpreter. As it happens, Amstrad (who own all of Sinclair's old hardware) have released all of their old ROMs into the public domain on the condition that they are used unchanged; emulator writers are safe here. Amstrad is the exception here, though.

Warm Silence Software have had curious problems marketing their BBC emulator 6502Em, which does a far better (nearly perfect) job of emulating the whole BBC range including the Electron, Master and Compact. Acorn's fee for licensing the BBC OS was not cheap, but they did allow WSS to distribute 65Host for free with 6502Em, which contained a copy of the BBC B ROMs. 6502Em then 'rips' the ROMs out of 65Host and uses it for its own purposes. Acorn are apparently happy with this convoluted method, and it is still convenient for users since it only needs to be done once.

Hypocrisy on the high seas

Once you've got an OS for your emulator, if you need one (most consoles don't), you'll need to get some software for it. Individual emulators make their own arrangements for this: for small machines like the Spectrum, a piece of hardware can make a copy of the machine's RAN to a file, and the same memory dump slotted into an emulator. A few 48K snapshots of this sort don't take up much hard drive space. ROM dumps (using equipment not generally available) do the same for cartridge-based consoles, which are effectively incomplete pieces of hardware without a cartridge inserted. Where some games need to load things off disc or tape as they go, byte by byte copies of the original media can be made into single files, which are broadly agreed on by emulator: UAE, the Amigo emulator, is in particular need of these, since Amiga disc drives are somewhat freakish and no other machine can read an Amiga's floppy discs.

Just because these machines are old, however, doesn't mean that we're not breaking copyright by using copies of software found around the Internet. Nearly all of the web sites which hold vast quantities of disc and ROM images for old machines have the pitiful disclaimer that you shouldn't download any copies unless you own the original disc or cartridge. Yes officer, of course they're purely for backup purposes. Evidently these game archives seem to keep their head above choppy legal water, though using these copies without owning them definately constitutes a breach of copyright. And most old games are far from being commercially dead: less that a year ago, HMV held a vintage games exhibition in Oxford street, and since then most high-street retailers sell a number of officially licensed games for modern computers such as Joust, Robotron and Bubble Bobble.

Worse than the piracy is the amount of transparent hypocrisy surrounding emulators, with people posting to newsgroups that of course they own such-and-such a game and have an original copy of something, but could somebody please send them a copy of it anyway. Most of the time, if anyone cared, prate ROM and disc sites would be removed immediately. At this juncture I would like to state that in the process of testing these emulators, every single screenshot was obtained entirely legally: every ROM was copied from boards bought direct from the manufacturer, appropriate license fees were paid, and we do of course own original machines for everything we emulate.

Games for nearly all 8-bit machines can be found at the FTP site ftp.nvg.unit.no, and there is a vast range containing everything that I've heard of and far more. Gameboy games are scattered around, though I've seen no large central resource. Amiga discs are jealously guarded, though a few popular titles are easily available.

Speed freak

Even though we have 200MHz processors under the bonnet, some comparitively primitive machines need great care to emulate properly: the 'accurate' version of Frodo, the C64 emulator, works at 25% speed on a Risc PC with StrongARM. The Gameboy, BBC and Spectrum emulators seem to work on an ARM3, but everything else needs a StrongARM or ARM7 at the least. This usually marks the difference between elegant (or at least small) hand-coded emulators and those ported from other platforms, which are usually written in C or C++.

It's worth looking at a couple of DOS-based emulators if you have a PC card, since some work surprisingly well: PacifiST is an Atari ST emulator which runs at around half to a third speed on my SX33. Genecyst is a Genesis (Mega Driver) emulator which achieves a just-about playable 10fps on the same setup. A good place to start hunting for these is at the Archaic Ruins site: http://archaic-ruins.parodius.com/. It is the best resource I've found for downloading and finding out about emulators, their various authors and homepages, but due to its high profile contains no information about sourcing ROMs or disc images. It has information on some extremely obscure consoles, and details the seeds of some PlayStation emulators which are being developed.

The state of the Acorn emulator scene is such that there are now thousands more games available to run under emulation that there ever will be for RISC OS. However, we lag behind in certain areas: a Mega Drive emulator would go down well, and I've heard from several people that such a product is on its way. Super Nintendo emulators have made some headway on the PC (though they are nowhere near perfect yet), but nobody has come forward yet with one for RISC OS.

If your conscience can accommodate it, emulators open up a free library containing thousands of games, sadly far more than RISC OS will ever have written for it, but there's inspiration for new and better work to be done.

  • Matthew Bloch

  • The Acorn Emulation Page - David Sharp