Amiga Format
This article was originally written by Simon N Goodwin for Amiga Format magazine, and is used by permission of the joint copyright holders. It should not be copied any further without written permission. The free emulators mentioned were included on the accompanying CD with the magazine, and are generally available - often in updated form - from this site. The text is as originally submitted to the magazine - which means there are some differences, mostly extra text which was cut to fit into the pages available - with the addition of hyperlinks to new or updated information which has since become available. This approach has been taken to preserve the structure of the original series, while making new information readily available. Simon welcomes comments from readers, care of Tomas Amsrud, who has generously prepared the material for publication on the Internet.
PrevNext
Main

AER


Spectrum Emulation

Simon N Goodwin explores Amiga emulators
for the best-selling British micro of the 1980s,
Sinclair's ZX Spectrum


The Amiga has half a dozen Spectrum emulators and four of them are rather good, each with their own distinctive features. But why should anyone want to emulate a Spectrum?

The Spectrum Story

Sinclair sold millions of Spectrums, generating an unprecedented amount of home computer software. This was the key to its success. 48K Spectrum clones have been mass-produced in Brazil, Portugal, India and Eastern Europe, where they're still popular. New programs and demos come out, although the last UK news-stand Spectrum magazine closed years ago.

[] The Spectrum was introduced in 1982, the follow-up to Sinclair's 1K ZX-80 and ZX-81 models. It was the first Sinclair machine with colour and sound, and arrived just as the home computing world expanded from a clique of DIY programmers and hardware hackers into a mass market, dominated by games playing. It cost less than 200 and had a relatively fast, reliable cassette interface. Joysticks, floppy disks and Sinclair's own quirky 'microdrives' arrived soon after, in various incompatible formats.

The Spectrum hardware is simple, which has made it relatively easy to emulate. The processor is a Zilog Z80, a relatively complicated eight bit chip, originally with 16K or 48K of memory. The 48K model out-sold the 16K Spectrum by a factor of almost ten to one, and most programs expect 48K. Sound was rudimentary at first, with a single-bit output controlled by the processor, working a tiny and almost inaudible imbedded speaker.

[] In 1986, after some four million sales, Sinciar upped the memory to 128K, using a complicated bank-switching system as the Z80 can only see 64K at any time, and fitted a three channel square wave sound chip like that in the MSX and Amstrad CPC micros.

The majority of releases continued to be compatible with the 48K model, although some use the sound chip if available. There is no way of emulating full 128K games on the Amiga, but these are relatively rare and almost all the 'classic' Spectrum programs work on a 48K machine.

A year later Amstrad took over Sinclair, and continued the range with the Spectrum Plus Two, with a built in cassette recorder, followed by the CP/M compatible Spectrum Plus Three, with a built-in Hitachi three inch disk drive, like their own CPC and PCW computers. Otherwise it was just a Spectrum 128 in a new box.

Display

[] [] The Spectrum display was both a strength and a weakness. It supported 15 colours but limited their organisation to save memory. Attributes allowed 256 by 192 pixel resolution on a colour TV, using only 6.75K of memory. This meant games were fast, but limited in colour as only two colours were permitted in each 8 by 8 pixel character square.

Large areas can be re-coloured at speeds an Amiga strains to match, but ugly 'attribute flicker' appears when two differently coloured objects tried to ue the ame character square. Without hardware sprites everything must be drawn directly into the single, fixed display area.

Loading

Cassette loading is tricky, although most of the emulators have a go. You should be able to lod your own un-protected files with the ZXAM, Spectrum or Speculator interfaces - a tiny circuit, a sampler and a piece of wire respectively - but they'll all baulk at protected games and 'hyperload' files, which would need microsecond-accurate emulation to load. Spectrum tapes can be written from an Amiga with ZXAM or the Aminet utility TOOT.

[] You're better off skipping that horrid aspect of Spectrum emulation, and using files that are already on disk or the net. Most are supplied as snapshots - images of computer memory. Original Spectrum formats are MGT and Mirage, both a bit over 48K long. Emulators added Z80 and ZX82 formats, with optional compression. Speccylator, ZX-Spectrum and KGB use their own snapshot formats.

There are PD programs to convert between 'snapshot' memory image formats and read real Spectrum disks. Most use shell commands but it's more convenient to teach the Amiga to treat them like any other disk, with Frank Swift's MGT handler for SAM, Disciple and Plus D formats.

Edward Vermuelen's ZX datatype, from Aminet, lets Multiview, VT, Photogenics and Final Writer, among others, read screen images in Speculator ZX82 or raw Spectrum format. ZXAM and Speculator can save Spectrum screens in ILBM format, and ZX-Spectrum can print them.

Amiga Spectrum Emulators

ZXAM and Speculator have the most features, and unsurprisingly they're both shareware, though inexpensive and un-restricted. Spectrum and Speccylator are more basic, but sometimes a bit faster. The table compares features and compatibility.

KGB

The 'KGB' Amiga Spectrum emulator ran - slowly but reliably - on the old A500. It was written by Troels Noerdergard of Denmark and developed to version 1.3. It was impressive a decade ago, but now it's obsolete, as it wont multi-task and is incompatible with Kickstart 2, although still in some PD libraries.

Spectrum

New Zealander Peter McGavin's eponymous Spectrum is a veteran, last updated in 1993, but still strong, with few frills. The best emulator compatible with Kickstart 1.3, it can loads snapshots from Amiga disks and cassettes via a sound sampler. It stores BASIC files in two parts on Amiga drives and has rudimentary keyboard handling, emulating the original 40 keys and multiple shifts without concessions to the Amiga's advantages.

ZXAM

ZXAM, shareware from Spain, comes in five versions, including special ones for AGA and 68060 systems. It's the only emulator with AREXX support and a machine code monitor. It emulates all the popular joystick interfaces (AGF, Kempston and Sinclair) but many keyboard symbols must be typed the hard way, with Sinclair's multiple-shift scheme.

ZXAM can monopolise the Amiga for top speed, or run several copies at once on shared or separate screens. It can automatically powerpack files as it saves them in Z80 or Mirage format, and recognises KGB and PC snapshots too, although I found it rather picky in practice.

It can load cassettes via an adapter plugged into the joystick port and emulates the Spectrum 128 sound chip, as well as the basic Spectrum sound channel. The author proudly lists about fifty programs that benefit from this feature.

ZX Spectrum

ZX Spectrum 4.7 is shareware from Holland by Jerome Kwast. It's not particularly system friendly, lacking icons and crashing on 68040 or above, even with caches disabled. It doesn't like Multi-sync displays, either.

The emulator comes in four versions, with screen update performed by processor or the blitter and optional support for Sinclair's Interface 1 - an unique advantage, as long as you've already got the necessary ROM image. It uses its own snapshot format, with a converter for Mirage files, but I couldn't get that to work. It does support ZX BASIC filing and the CAT command, which shows a disk directory. Jeroen promises a Spectrum 128 version but there' been no update on this emulator for a couple of years.

Speculator

William James' Speculator is UK-developed, derived from Speculator93, a Qdos PD release, but much more powerful in its Amiga-friendly incarnation. Keyboard handling is exemplary - within the A1200's limitations - and you can enter commands and programs letter by letter, rather than wth keyword shifts - a vast improvement for all but the most seasoned ZX hacker.

The second Amiga version, Speculator97, has an improved Amigaguide over 100K long, and automatic installation. It has support for automatic scan doubling on multi-sync displays and the Amiga printing from ZX BASIC.

Speculator has a handler to read real Spectrum disks without conversion. It recognises six types of snapshot, saving in ZX82 format with optional compression. It comes with good Z80 tools but no menu to single-step Z80 code.

Speccylator

Richard Carlsson's Scandanavian Speccylator is the latest arrival on the Amiga, and an impressive debut. It is free, simple and works well, although the keyboard handling assumes a US keymap. Source is available, so this one may see rapid development and come to rival Speculator and ZXAM.

Speed tests

All these emulators need a 68030 or better to run programs at full Spectrum speed, although many programs work acceptably on a 68020 with fast memory. 16 bit Amigas will struggle to run anything but text adventures at reasonable speed, and an unexpanded A1200 is hardly equal to the task..

Simple tests in ZX BASIC suggest that Speccylator is potentially the fastest emulator around at the moment, edging just ahead of Peter McGavin's Spectrum. Both average five times the speed of a real Spectrum on a 50 MHz Cyberstorm 68060, or 18 MHz in Z80 terms.

Speculator comes close behind and takes fewer short cuts. All these must be slowed down - by running other tasks, or disabling processor caches - before most games are playable on a top-specification Amiga. ZXAM is unique on a fast Amiga, the only one that deliberately limits its speed to 100 per cent, even on machines that might go much faster.

[] Kwast's ZX Spectrum and the KGB emulator will not run on the fastest machines, but deliver reasonable although not stunning performance on older models. the KGB emulator is incompatible with Workbench 2 or 3, and ZXAM crashes on a 68000, requiring a 68020 or better.

On an original 68000 Amiga you must pull out all the stops to get even a quarter the speed of a real Spectrum. Speccylator and Spectrum include special, stripped down versions that cut corners in emulation for top speed. Most games work, but some crash, and quite a few display scores wrongly because of non-fatal errors in the tricky emulation of decimal instructions.

Speculator dynamicaly re-codes itself to suit the processor. It's the quickest of the fully-compatible emulators on a 68000, a few per cent behind McGavin's 'faster and more dangerous' Spectrum-00-special. The standard version of Spectrum comes next in speed, with ZX-Spectrum, the strict Speccylator and the KGB emulator bringing up the rear, about a sixth the speed of real Spectrum BASIC.


Web page design Copyright © Tomas Amsrud
Articles Copyright © 1996-2002 Simon Goodwin