Setting Up Altirra: A Practical Guide to the Most Accurate Atari 8-bit Emulator

Altirra, published at virtualdub.org, is a Windows emulator of the Atari 400/800, 1200XL, 600XL/800XL, 130XE, XEGS and 5200. It is built around cycle-exact emulation of the whole machine: ANTIC's DMA timing, mid-screen register changes, undocumented 6502 instructions and hardware bugs. That makes it the usual reference when people want to know whether a program works on real hardware. It is a system emulator and debugger first and a games machine second, so some setup pays off.

This guide covers installation, firmware (ROMs), choosing a machine configuration, loading each kind of software image, input, and fixes for the problems newcomers hit most often.

What you need: a Windows 7–11 PC (x86, x64 or ARM64). On Linux and macOS it is commonly run under Wine. You also need some Atari 8-bit software images. Original Atari ROM images are optional.

1. Download and install

  1. Get the current build from the Altirra page at virtualdub.org. At the time of writing that is 4.40, offered as an x86/x64 package and a native ARM64 package. Almost every PC should use the x86/x64 zip.
  2. Unzip it into a folder of its own. There is no installer: run Altirra64.exe (or the 32-bit Altirra.exe).
  3. Optional portable mode: Altirra normally keeps its settings in the Windows Registry. If you create an empty Altirra.ini next to the executable, or start it once with /portable, it stores everything in that INI file instead. That lets you carry a complete, configured emulator around on a USB stick.

Notes for old PCs: 3.91 is the last release that runs on Windows XP or Vista, and 2.90 is the last that runs on CPUs without SSE2.

2. Firmware: AltirraOS or real ROMs?

Altirra runs straight out of the zip. It includes its own from-scratch replacements: AltirraOS (in 400/800, XL/XE and 5200 versions) and Altirra BASIC, so you need no Atari ROMs. They are very compatible, but some programs jump into undocumented OS entry points or rely on Atari BASIC internals, and those fail. For the best compatibility, add dumps of the real ROMs.

Put them in the Altirra program folder under the standard names, or register them in the Firmware Images dialog (System > Firmware):

ROM Filename
400/800 OS revision A ATARIOSA.ROM
400/800 OS revision B ATARIOSB.ROM
XL/XE OS ATARIXL.ROM
Atari BASIC ATARIBAS.ROM
5200 BIOS ATARI5200.ROM

Things worth knowing from the help file:

  • OS-B is the best choice for 400/800 compatibility. Many ATARIOSB.ROM files floating around are actually the version patched for the old Xformer emulator: the screen-editor bell is disabled, PIA initialisation is altered, and the memory test stops at $D000. A few programs, such as the original Zaxxon, fail with it. An unmodified OS-B is better.
  • XL/XE OS version 2 is the standard XL/XE choice. The XEGS's version 4 OS is a good alternative.
  • Atari BASIC: revision A is buggy, B is buggier, and C is the one to use. At the READY prompt, ? PEEK(43234) returns 162, 96 or 234 for revisions A, B and C.
  • Changing firmware reboots the emulated machine.

3. Choose the machine

Open System and set hardware, memory, video standard and BASIC. Altirra's own rules of thumb:

  • Older (pre-1983, US) games: 800 hardware, 48K, OS-B.
  • Newer games: XL/XE hardware, 128K (130XE), XL/XE OS.
  • European demos and games: XL/XE hardware and OS, 320K, PAL.
  • No ROM images: use AltirraOS.

BASIC: enable it only for BASIC programs. On XL/XE machines BASIC is built in and switched on unless OPTION is held at power-up. A lot of disk software crashes if it loads with BASIC enabled. Altirra can hold OPTION for you at boot, and briefly shows "Option" on screen while it does. On the 400/800 and 1200XL, BASIC is a cartridge: use File > Attach Special Cartridge > BASIC.

NTSC or PAL. The original 800 was NTSC, and much early commercial software was written for it. Later software, especially demos, was mostly made in Europe for PAL. NTSC software on PAL runs about 16% slow. PAL software on NTSC runs about 20% fast and may crash, because the frame is shorter. If in doubt choose PAL, since NTSC programs that break on PAL are rare. Pick NTSC when you want the authentic speed of an American title.

Memory options go well beyond the stock sizes. There are the 52K and 8K–40K oddities of the 800, 64K XL, and 128K 130XE with separate CPU/ANTIC banking. There are also 256K (RAMBO XL style, where 4 of the 16 banks alias main memory), 320K, 576K and 1088K, plus emulation of the Ultimate1MB and VBXE expansions. While Ultimate1MB is enabled, memory size, OS and BASIC are chosen in the U1MB's own BIOS (Help+Reset), not in Altirra's menus.

Profiles (System > Profiles) keep groups of settings apart. Altirra ships with profiles for the computer types and a separate 5200 profile, so console controllers and cartridges don't leak into your XL setup. A temporary profile lets you experiment without saving the changes.

4. Load software

Most images load with File > Boot Image… (or drag-and-drop). It unmounts everything else, mounts the new image and cold-boots. Altirra handles disk images (ATR, ATX, DCM, XFD, PRO, and ARC archives mounted as virtual disks), executables (XEX/EXE/OBX), cartridges (CAR, BIN, ROM), tapes (CAS, WAV, FLAC, Ogg) and BASIC files (BAS).

  • Disks mount in one of four write modes. Read only. Read/write writes changes back to the file. Virtual read/write keeps changes in memory until you save them. Virtual read/write safe is the same but blocks format commands, which defeats protection checks that try to format the disk at boot. Altirra defaults to VRWSafe. Some programs (Castle Wolfenstein, Zebuland, The Newsroom) need a writable disk.
  • Folders as disks. In the Disk Drives dialog, any drive can mount a host folder as a virtual DOS 2 (up to 64 files) or SpartaDOS disk. Virtual folder disks are read-only.
  • Tapes are covered in our cassette guide. In short, machine-language tapes need System > Cassette > Auto-boot on startup, and BASIC tapes need CLOAD.
  • BASIC programs: use Boot Image with BASIC enabled, or go through the H: device (below).

The H: host device

For moving files in and out, the H: device is simpler than editing disk images. Add Host device (H:) under the High-level Emulation devices in System > Configure System > Devices, and point it at a folder. Then, from BASIC:

LOAD "H:MYPROGRM.BAS"
RUN
LIST "H6:MYPROG.LST"

H1:–H4: pass bytes through unchanged. H6:–H9: map to the same folders but convert line endings: CR/LF in host files becomes the ATASCII EOL ($9B) on reads, and back again on writes. That makes LIST "H6:..." and ENTER "H6:..." ideal for editing BASIC listings in a PC text editor.

H: is a CIO device. It works with DOS 2.0S, and with MyDOS 4.5 and SpartaDOS 3.2 (with some wildcard bugs), but not under SpartaDOS X, which bypasses CIO. For SDX, use the PCLink device (System > PCLink).

5. Keyboard and joystick

Altirra maps keys by symbol, so Shift+2 types @ as it does on a PC, not " as it would on the Atari. The less obvious keys:

Atari PC key
START / SELECT / OPTION F2 / F3 / F4
RESET (warm) / Power (cold) F5 / Shift+F5
HELP / BREAK F6 / F7 or Pause
Clear (Shift+<) Home
Insert char / line Insert / Shift+Insert
Delete char / line Delete / Shift+Delete
Inverse (Fuji key) End or `
Ctrl+Esc Ctrl+\

Other emulator keys: F1 warp speed, Alt+Enter full screen, Alt+Shift+C / Alt+Shift+V copy screen / paste text, and F8–F11 the debugger (run/break, breakpoint, step over, step into).

Joystick: enable one of the input maps in the Input menu. The default "arrow keys → joystick (port 1)" map uses the arrows plus left Ctrl for fire. Once arrows are mapped to a joystick the Atari no longer sees them as cursor keys. Hold Alt to send them as keys, or switch the map off. PC game controllers bind in the Input Maps dialog, where the Rebind button walks through each control in turn.

If a game misses quick key presses, switch Input > Keyboard from cooked to raw mode, so the program sees keys held down rather than single queued characters.

6. Speed: acceleration options

Altirra can SIO-patch disk (D:) and cassette (C:) I/O, which makes loading near-instant. It also has burst transfers for custom loaders that bypass the OS. "Fast boot" skips the XL OS's startup delays and the grinding device poll you hear when no disk is attached. These are grouped as the Acceleration options in Altirra's settings (see "Options: Acceleration" in the help file).

Hearing the classic beep-beep-beep while a disk loads means the load is not being accelerated.

Troubleshooting

  • Game crashes at once on an XL/XE setup: disable BASIC. If it is an early title, try 800 hardware with OS-B and 48K.
  • Program runs too fast or too slow, or music is off: wrong video standard. Swap NTSC/PAL.
  • Protected disk fails to boot: copy protection often measures sector timing. Turn off the disk SIO patch and burst I/O, and if needed enable Accurate sector timing. Protected originals need ATX (or PRO) images: ATR, DCM and XFD cannot hold protection data. Specific titles, including unmodified Fort Apocalypse, Gruds in Space, Mr. DO!, Transylvania and Twerps, that must boot with the SIO patch off because they check RTCLOK during the load.
  • "Works on everyone else's machine": check the help file's Program-specific issues list. For example, Missile Command, Ultima I, Protector II and The Wizard and the Princess need OS-B. Parsec XL, Adebar and 1st Top Demo 1989 need the real XL/XE OS. Crownland needs illegal-opcode emulation on a plain 6502C.
  • Crackly sound: raise the latency in System > Audio > Options. For less input lag, lower it.
  • Part of the picture is cut off: change the overscan mode in the View menu.
  • PAL looks jittery: a 60 Hz monitor shows a small judder ten times a second with 50 Hz video. Set the PC display to 50 Hz if it supports it.

Further reading

Credits