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


Atari Emulators

Simon N Goodwin tests Amiga emulation
of Atari computers


This month we look at emulators for computers made by Commodore's great rival, Atari. Atari made two home computer ranges - the eight bit X00s, based on the 6502 processor and introduced in the late 1970s, and the sixteen bit STs, based like the Amiga on Motorola's 68000 and launched in 1985.

Rather surprisingly, ST emulation is more useful on old Amigas than eight bit Atari emulators on any system. I shall discuss the emulated systems in chronological order, but don't give up if you've only got an A500 - you'll get your turn!

Atari history

Atari was founded by video game pioneer Nolan Bushnell, who cleverly sold out to movie giants Warner Brothers before the eight bit bubble burst. The name comes from the Japanese board-game 'Go', where it means 'beware', a bit like the chess term 'check'. Atari made arcade machines and games consoles as well as computers, but this article concentrates on the home micros.

The eight bit Ataris are the spiritual ancestors of the Amiga. The Amiga project was started by Atari engineers, but Commodore took it over when Atari ran out of money to fund further development. This left Atari without a sixteen bit computer, so in 1985 they cobbled together the Atari ST from off-the-shelf parts.

Ironically, a year earlier the ailing company had been taken over by Jack Tramiel, former boss of arch-rivals Commodore, who had been kicked out of the company he founded. He took the helm at Atari when Warner Brothers decided to get out of the market.

Defender The Amiga hardware development team learnt their trade making Atari custom chips. The Amiga has more in common with early Atari systems than with any other computer. Jay Miner, the star Amiga hardware designer, also invented the Atari 800 hardware and custom chips used in classic arcade games like Pacman and Defender. His hand-drawn diagrams appear in the Atari 800 hardware manual, dated 1978.

The Atari project was known as 'Colleen', whereas the Amiga was called 'Lorraine'. These names were apparently chosen to confuse eavesdroppers into thinking that the inventors were discussing romantic rather than electronic efforts...

Custom hardware

The Atari 800 has three main custom chips, with very similar functions to Amiga counterparts. Rather than Paula, Agnes and Denise, the Atari has Pokey, Antic and CTIA, replaced by GTIA on later models. Pokey handles sound and miscellaneous input and output functions, while Antic and CTIA generate the display. GTIA is similar but supports up to 16 colours per display line.

Just like the Amiga, the Atari 800 has a screen co-processor which allows changes in display modes and palette settings from one line to the next. There are eight sprites, fetched in the interval between lines, with hardware collision detection, but the Atari versions - known as 'player/missile graphics' are narrower and less colourful. The eight bit processor runs at 1.79 MHz - almost twice as fast as its equivalent in rival Commodore computers, and exactly a quarter of the original Amiga's clock speed.

There are some important differences. The eight bit Atari has no blitter to copy and convert graphics, but it does support text-based displays, where each byte in memory controls a whole character on the screen. Emulation of this is tough, even with blitter assistance.

Many bytes must be manipulated for each one changed in Atari memory. Worse still, alterations to the Atari text font instantly update every corresponding character on the screen. Each font byte could affect hundreds of bytes on the emulated display.

Atari sound is based on mono four-channel square wave synthesis. I've yet to find an Atari emulator that simulates this on the Amiga, although it should be possible. As you may guess by now, Atari emulation is a tough nut to crack.

Atari 400

Atari's first home computers were the Atari 400 and Atari 800. The Atari 400 was a cut-down version with a flat membrane keyboard and limited RAM. Later 'XL' and 'XE' models had GTIA and increased ROM and RAM capacity, but essentially the same internals. There was also a keyboard-less 5200 model for games players.

Atari 400 The original model contained a 10K operating system ROM and sockets for one or two 8K ROM cartridges. Atari BASIC occupied one of these cartridges. Later versions had 16K of system ROM and BASIC built-in.

Atari peripherals daisy-chain together using a slow serial interface, copied on the Commodore VIC-20 and C64. Five and a quarter inch floppy drives were optional, with DOS loaded from disk. The original 810 model was bulky, erratic and glacially slow, with a capacity of around 100K on 40 single-density tracks. Later XL models used a double-density format.

Atari games

For many years Atari games were world leaders, combining playability, good graphics and technical excellence. It boasted excellent versions of arcade titles like Galaxians, Pacman, Defender, Donkey Kong, Millipede, Qix, and many original games.

StarRaiders Chris Crawford's Eastern Front was the first computer wargame to stand up to the scrutiny of board game veterans. Star Raiders and Miner 49er inspired later UK hits like Elite and Manic Miner.

By modern standards the display resolution is low and the sound buzzy, but in its day the Atari 800 was almost as far ahead as its rivals as the Amiga was, seven years later. Wisely, Atari mode full documentation available, so programmers could wring every ounce of performance from the hardware.

In 1983 Central TV hired me to program the graphics for an early home computer series, known (cringe) as 'Magic Micro Mission', and I insisted on using Atari 800s although other computers had already been purchased for the job. In six weeks of hacking I boiled up a title sequence with over 100 colours on screen, using sprites, palette effects, synchronised sound and thousands of interrupts every second. No other home micro could have looked so good, until the Amiga came along years later.

Amiga emulators

There are two viable ways to emulate an eight-bit Atari on the Amiga. Both require a very fast computer - at least a 68040, with a 68060 much preferred. In the absence of disk or cassette transfer software you need to transfer files from a real Atari with a rare 850 serial interface, or download them from the Internet, where they're plentiful supply.

Atari800 is the only eight bit Atari emulator that runs under Amiga's operating system. It emulates the original Atari 400 and 800, the 800XL and Atari 5200 console. The program is freely distributable, with source entirely written in C. It was originally developed by David Firth for Unix workstations running X-Windows, and converted for Amigas by his brother Stephen.

The conversion has some nice features, like Amiga menu menus and Gadtools control of start-up options, but it's only at version 0.6 and some features - like help and sound - are not yet implemented. The use of compiled C code makes it slow compared with other 6502 emulators written in assembler.

Speed could be substantially improved by re-coding. The complexity of the Atari hardware means it will inevitably require a fast Amiga, but there's a lot of scope for optimisation given that the Atari comes much closer to the Amiga than it does to the X-Windows way of doing things.

Atari800 requires Workbench 2, and prefers Workbench 3 with AGA. Atari screens can show up to 128 colours simultaneously, so palette effects soon use up the available colours on old Amiga chip-sets.

Atari800 runs as a task, and uses IXEMUL library (on the AF CD) which you can iconify to save CPU time. It requires 640K of fast memory for the task and library, and about 256K of chip RAM for its own AGA screen. It also works in a window on the Workbench, taking only half as much chip RAM but with inevitable colour restrictions.

Most of the documentation is for the Unix version, but there's a useful AmigaGuide tucked away in the source archive. Before it will run you need the Atari ROMs in a sub-directory assigned to 'object:', as well as IXEMUL version 41 or later in LIBS:.

I don't want to seem too critical of this emulator - it's system friendly, compatible and works pretty well, although slowly even on a 68060. It shows promise. But until a hacker with real knowledge of both Atari and Amiga hardware takes control of the source, it will be too slow to be usable on any current Amiga.

That's a pity because the Atari 800 is a classic micro, very much in the spirit of the Amiga. But given the difficulty of emulating the Amiga on any other platform, perhaps the cost of Atari 800 emulation should not be a great surprise.

Cross emulation

The other way to use Atari 800 software on the Amiga is by cross emulation, running the Apple Mac emulator 'Rainbow'. I tested it on Shapeshifter with a 40 MHz Warp Engine 68040 and a Picasso 2 graphics card. It was still slower than the real thing but more usable than the Amiga emulator, not least because the keyboard responded immediately.

Like the Amiga version, menu options let you set the ratio of display to processor emulation speed. I got 50 per cent CPU speed at a rather feeble 3.5 screen updates per second, or seven frames per second with one ninth the CPU power of a real Atari. Even a top-flight Cyberstorm and CyberVision set-up struggles to run games at full speed, although it might come pretty close.

The demo version 1.3 of Rainbow runs in a small 320 by 192 pixel window on the 256 colour Mac desktop. The full version has sound and can enlarge the display, although that makes it even slower. At present it's a bit better than the Amiga version, but you still need a very powerful machine to do it justice.

There's a PC emulator for the Atari 800 too, but that's unusably slow on Amigas. As I've said before, the overhead of emulating one processor (Intel 8086) to emulate another (6502) is unbearably slow. But the PC Atari emulator Xformer is still worth getting, because it's includes very useful example files and is freely distributable up to version 2.5.

Disappointingly, I've been unable to find an emulator for Atari's sixteen bit ST range on the Mac. But there are quite a few ST emulators for the Amiga, and they're our next topic.

Atari ST

The Atari ST is much more easily emulated than the eight bit models, because it used the same 68000 processor as the first Amigas, and had relatively little custom hardware. The sound chip is the three-channel one used in eight bit micros like Amstrad CPC, Spectrum 128, Oric and BBC Micro, but STs have MIDI built-in as well.

The ST runs in three display resolutions: LowRes, with 320 by 200 pixels in 16 colours from a palette of 512, mainly used for games, MediumRes, 640 by 200 pixels in four colours, and HighRes 640 by 400, which required a special monochrome monitor on a real ST and uses an interlaced display on the Amiga.

Later models like the STe, TT and Falcon had extra hardware to bring them closer to the Amiga's specification, with more colours and eight bit sampled sound. The TT and Falcon have 68030 processors but Atari went no further, so there's no support for the 68040 or 68060, even in late versions of the Atari operating system.

This stops you running ST programs on the fastes t Amigas. Even if the system was patched to make it 68040 aware, many programs would still crash because they don't expect the copyback cache.

16 bit Atari disks use a variant of the 360K, 720K and 1.44 Meg MSDOS formats, so you can read and write ST files with CrossDOS, bundled with the Amiga. Some disks have one extra sector per track, pushing the capacity to 800K or 1.6 Megs; these need a special mountlist.

ST emulators usually require you to obtain your own copy of the Atari ROM, which is inauspiciously known as TOS, for Tramiel Operating System. Much of the code inside came from seventies micro pioneers Digital Research, including a 16 bit version of CP/M and GEM (Graphics Environment Manager), a simple single-tasking windowing system, also used on some Amstrad PC clones.

Atari ST programs fall into two main categories - GEM applications, which use the operating system, and others - mainly games and demos - which hit the hardware directly. Current Amiga ST emulators only work with well -behaved GEM applications. They use operating system patches to re-direct system calls to the Amiga hardware. This means that very few ST games can be emulated, and clobbers packages that make direct access to the ST's built-in MIDI.

ST software

The main strengths of the ST are in MIDI and Desktop Publishing. MIDI emulation is problematic because of hardware differences, but DTP packages like Calamus can out-perform Amiga equivalents on 68000 machines.

I use the emulator for Autoroute, which runs on STs but never appeared on the Amiga. It knows about more roads than early Amiga equivalents, but it's getting out-of-date now and has an uncanny knack for getting people lost in Leeds - but, to be fair, GBroute has the same quirk!

Most ST games were converted to the Amiga, so the lack of games emulation is not a great drawback. Indeed, in the heyday of the ST Amiga users used to complain that games like Populous and Formula One Grand Prix were written first for the simpler ST, and converted, which is why they ended up using only 16 colours rather than the 32 or 64 which the Amiga 500 can handle.

An Aminet utility, ST2Amiga, purports to help programmers convert code from the ST to the Amiga. It helps a bit, but it's far from automatic, requiring detailed low-level knowledge of both systems.

ST emulators

Atari ST emulators abound, but most of them are very similar, written for the original 7 MHz 68000 Amiga, based on a minimally patched TOS image with scant documentation.

I've used two which include versions of TOS. The original 140K task had German menus, but an update on Scope PD disk 149 was a bit bigger and worked in English, mostly. Apart from that, they're very similar and incompatible with Workbench 2.

These tasks start by displaying a menu allowing you to pick the display mode from the three possibilities. Once you've made your choice there's no return to the Amiga, although you can reset by pressing both mouse buttons at once.

You need two floppy disk drives and at least a megabyte of memory for the emulation to start. Most GEM programs work, and you can read, write and format floppies, but disk and display handling have minor bugs; sometimes screen updates are incomplete and disk changes can cause confusion. Writing to floppies is rather slow.

Aminet's ST4Amiga comes with assembler source, a program to save the ST ROM, in Pascal and ST compiled code, and a short document which says "Q: What's the difference between ST and Amiga? A: About 14K". All the versions that I've seen require a genuine copy of TOS 1.02 and lack support for MIDI and the ST serial port. It is compatible with Workbench 2, unlike older versions.

The most advanced and well-presented ST emulator is AmTari, on the Emulators Unlimited CD. This is a 1992 demo version, with a short German document and no upgrade details, but it has impressive features.

AmTari requires Workbench 2 and a copy of Atari TOS - either version 1.6, or the improved 2.06 release - plus at least 1 Meg of Amiga RAM, with 3 Megs preferred. The full version comes on two disks - one in Amiga and one in ST format - with a printed manual.

Unlike the rest it multi-tasks with Amiga programs. You can determine the amount of memory and CPU time available to the emulator, and the Amiga gets the rest. This neat trick requires memory management, and AmTari expects the 68020 or 68030 MMU, as in Amiga 3000s, rather than the revised 68040 or 68060 hardware.

AmTari works with 720 and 1440K floppy disks as well as the original 360K single-sided format. The registered version supports hard disk via hard files, which are slower than Amiga partitions but allow dynamic extension, so you need not fix the maximum size at the start.

Conclusion

The ST emulators - more accurately, GEMulators - work best on old 68000 -powered Amigas, although 68020 and 68030 are supported by AmTari as long as you've got memory management hardware. For the foreseeable future Atari 800 emulation is strictly for power users, with a 68040 or 68060 processor vital to run programs at useful speed.

This is one area of Amiga emulation where humble A1200 owners are caught between two stools. Next month I'll look at emulators for a range of micros, compatible with all Amigas. Meanwhile, there's a clear gap in the market for budding emulator authors with Atari expertise...

Contacts:
Web pages:
http://www.signus/.demon.co.uk/david/atari/atari.html
http://www.cityscape.co.uk/users/jx91/rainbow.html
http://www.cis.ohio-state.edu/hypertext/faq/usenet/atari-08-bit/faq/faq.html
http://pmwww.cs.vu.nl/home/ipoorten/Atari.8bit.homepage/index.html

FTP servers:
ftp://wuarchive.wustl.edu/systems/atari/umich.edu/8bit/
ftp://sunsite.doc.ac.uk/computing/systems/atari/umich/
ftp://ftp.funet.fi/pub/atari
ftp://ftp.doc.ic.ac.uk/pub/aminet/misc/emu

eMail contacts:
atari@atari.archive.umich.edu
archive-server@micros.hensa.ac.uk
archive-server@Germany.eu.net

Newsgroups:
Atari 400/800/XL/XE: comp.sys.atari.8bit
Atari ST/TT/Falcon: comp.sys.atari.st
All Atari platforms: comp.sys.atari.programmer

Atari Emulators on CD:
C64 Sensations & Emulators Unlimited CDs, Weird Science, 1 Rowlandson Close, Leicester, LE4 2SE, UK.

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