Armour-Geddon 64bit

Armour-Geddon 64bit is a native 64-bit Windows port of the DOS game Armour-Geddon, featuring an enhanced mode and the ability to switch between VGA and EGA versions.

README

Armour-Geddon 64bit

A native 64-bit Windows port of the DOS game Armour-Geddon (Psygnosis, 1992), made by static recompilation: the game's original 16-bit DOS programs are translated to C once, and that C code is compiled together with a small runtime that stands in for DOS, EMS, the VGA and EGA cards, the AdLib, the Sound Blaster and the Roland MT-32. No emulator runs underneath; it is the original game logic as a native program, with a few additions: an enhanced mode that draws the 3D view at the window's resolution, and switching between the game's VGA and EGA versions while it runs.

All pictures are of the program's window on Windows 11.

The introduction filmThe options screen
The introduction filmThe options screen
The headquartersChoosing a vehicle
The headquartersChoosing a vehicle
A tank in the enhanced modeThe same in the original 320x200 picture
A heavy tank in the enhanced mode (the 3D view at the window's resolution)The same in the original 320x200 picture
The EGA version
The game's EGA version, switched to while it runs (Ctrl+Shift+V)

This repository contains no part of the game. You need your own copy of the DOS game Armour-Geddon: the 1992 retail release (three floppies, installed), whose folder holds the files ARMOUR, FILM and PSYG. The program reads them from that folder and never changes it.

Playing on Windows

  1. Download armour-geddon-Windows.zip from the latest release and unpack it anywhere.
  2. Start armour-geddon.exe. The first time it asks for the folder of your copy of the game: the one with ARMOUR, FILM and PSYG. It is remembered afterwards. (No question is asked when armour-geddon.exe is in the game's folder itself.) After the introduction the game asks whether you use an analogue joystick (N for no), as the original does.

What the game writes (saved games and SOUND.CFG, the sound card choice) goes to a Save folder next to armour-geddon.exe, or to %APPDATA%\Psygnosis\Armour-Geddon\Game when that place is not writable. The settings (enhanced mode, graphics mode, aspect ratio, scanlines, game folder) are in settings.ini in %APPDATA%\Psygnosis\Armour-Geddon.

Key
Alt+Enterfull screen on and off
Ctrl+Shift+Genhanced mode on and off: the 3D view drawn at the window's resolution (on at first, remembered)
Ctrl+Shift+Vswitch the running game between its VGA (256 colours) and EGA (16 colours) versions (remembered)
Ctrl+Shift+Mlet the mouse go (a click in the window gives it to the game again)

The window's menu (Alt+Space, or a right click on the title bar) has these too, and 4:3 aspect ratio for 320 x 200 screens (on at first: the picture at 4:3, as on a monitor of 1992; off: square pixels, 16:10), CRT scanlines (off at first: the dark gaps between a CRT's lines, the same at every window size) and About (the version, this page's link and the licences).

CRT scanlinesThe About box
CRT scanlines with the enhanced modeThe window's About box

armour-geddon.exe also takes --game-dir <folder>, --fullscreen, --mode 0|1|2|3 (the original's graphics modes: 0 VGA, 1-3 EGA, 2 without the logo and the introduction), --enhanced on|off, --aspect on|off and --scanlines on|off. It ends with exit code 1 when the game folder has no ARMOUR, FILM and PSYG, and with 3 when the game stops with an error.

In a vehicle: S starts the engine, = and - set the throttle, the arrow keys are the stick, Enter fires, the keypad keys choose the view. Game controllers work too (see docs/PLAYING.txt, also in the zip).

Sound

The game plays on an emulated AdLib, Sound Blaster (the default) or Roland LAPC-I / MT-32, as SOUND.CFG chooses (0 AdLib, 2 Sound Blaster, 4 Roland; the original's SOUND.EXE is not needed). The Roland is emulated by Munt's mt32emu and needs the ROM files of a Roland CM-32L (CM32L_CONTROL.ROM, CM32L_PCM.ROM) or MT-32 (MT32_CONTROL.ROM, MT32_PCM.ROM), which are not included: put them into a ROMS folder next to the program or in the game folder. When there is no SOUND.CFG yet, the Roland is chosen if its ROMs are there, else the Sound Blaster.

Playing through a launcher

Two launchers can install and start the program for you. Neither contains or downloads the game: both ask for the folder of your own Armour-Geddon (the one with ARMOUR, FILM and PSYG).

  • RecompLauncher: install Armour-Geddon 64bit there, pick your game folder once and press Play. It starts armour-geddon.exe --game-dir <folder> as recomplauncher.json (in this repository and in the release's zip) says; its page for the game has the full screen, graphics mode and enhanced mode settings and opens the saves folder.
  • sp00nznet's recomp-launcher (Windows): it runs this repository's launcher\setup.ps1, which you can also start by hand in a checkout, launcher\setup.ps1 -Game "<folder>": it downloads the newest Windows release into play\ and writes Armour-Geddon (recomp).cmd, which starts it with your game folder.

Building it yourself

The recompiled game is generated from your copy, so it is not in this repository. You need Windows 10 or 11 (x64), Visual Studio 2022 or later with the C++ tools, CMake 3.28+, Ninja, Python 3 and your copy of the game.

git clone https://github.com/Buyukcaglar/armour-geddon
cd armour-geddon
python -m venv .venv
.venv\Scripts\python -m pip install -r requirements.txt

Copy the game's files into _references\armour-geddon\dos\install-dosbox\ (the folder tools/ reads the original programs from), then unpack them, record which code runs, and translate:

.venv\Scripts\python tools\extract_all.py
.venv\Scripts\python tools\emu\run_game.py ...        (see docs/PROGRESS.md: coverage)
.venv\Scripts\python tools\recomp\lift.py build\recomp\armour_blocks.c build\cov_v0.txt build\cov_e1.txt
.venv\Scripts\python tools\recomp\lift.py --program film build\recomp\film_blocks.c build\cov_film.txt
.venv\Scripts\python tools\recomp\lift.py --program psyg build\recomp\psyg_blocks.c
tools\build_release.cmd

The coverage files list code that static discovery cannot find (code the game loads or patches at run time); they come from the emulator in tools/emu or from the native build itself (AG_COVERAGE=<file>). Without them the game still runs, partly interpreted. tools\build_release.cmd builds build\cmake-release\armour-geddon.exe and the zip; cmake -DAG_GAME_FILES=<folder> instead builds the game's files into the program (for your own use only). The same sources build for macOS, iOS and Android; see docs/ and the comments in CMakeLists.txt.

How it works

tools/unpack_exe.pyundoes the PKLITE, LZEXE and EXEPACK layers of the game's programs, by emulation
tools/emu/a Python PC (Unicorn) that runs the game, records coverage and compares traces
tools/recomp/discover.py, lift.pythe recompiler: finds the code's blocks and writes them as C
src/recomp/the runtime of the generated code: CPU state, dispatcher, interrupts, a fallback interpreter
src/platform/DOS, BIOS, EMS, VGA/EGA, keyboard, mouse, timer, AdLib (ymfm), Sound Blaster, MPU-401 + mt32emu
src/game/hand-written replacements for the game's own functions, the enhanced renderer, the VGA/EGA switch
src/launcher.cwhat the original ARMOUR.EXE and SOUND.EXE did
src/main_sdl.cthe SDL 3 front end: window, input, sound output, touch and game controllers
docs/the file formats, the resources, the renderer, the progress log

Some things the game does that a translator has to deal with: it is packed in several layers (the packers' own code runs, interpreted, up to the program's entry), it patches immediates and whole instructions of its renderer and its EGA line drawer while running, it loads its video and sound drivers as overlays into the same memory, and its timer is a raster interrupt that reprograms the PIT per screen band and changes the palette in the middle of a frame.

Licence

The port's own code is under the MIT License. Armour-Geddon is (c) 1992 Psygnosis Ltd; the game and everything in it belong to their owners. This project is not affiliated with or endorsed by them.

64bit version by Onur BUYUKCAGLAR, with Anthropic Claude AI assistance.