Asylum was a popular, surreal, and incredibly addictive platform game first released in 1994 for the Acorn Archimedes range of computers. It was written in ARM assembler by Andy Southgate. A long time ago, I also used to program in this language.
In 2007, Asylum was first ported to Linux by Hugh Robinson, where he did most of the work; converting the assembly language to C code. The last official edit to this project was in 2009 — now I have picked it up and brought it to modern systems, with a bunch of fixes and extra features.
Port Screenshots
Here is my port of the game, running in Windows 10:
Asylum Running in Windows
Background
There was no binary for Windows, so I thought I’d try to make it run in Windows with a modern C compiler and SDL2. I would use the most recent version of GCC (a raw C compiler) from the MinGW GNU Compiler Collection.
Observations in the Code
Some of the CPU register names (R0
-R15
) and labels still match the original code. This is almost certainly because the registers have a global scope, and it would take a huge amount of time to rename them all so they make sense in local scopes. Operating system SWI calls, also known as software interrupts still match, such as those that control the keyboard and sound. All the rendering, originally done with Andy’s FastSprite module, was converted to SDL sprite blitting routines.
Getting the Game to Run
This wasn’t an easy task:
- The build script didn’t compile anything on modern MinGW for Windows.
- Even when I eventually got the game to run for the first time, nothing appeared on-screen, and the music sounded wrong.
- The version of GCC and SDL used to build the game were very old and needed upgrading, but SDL2 has several programmatic differences and improvements over SDL1.
- When I eventually got the game to play and accept input, it didn’t feel or sound quite like how I remember the original. I verified this in an ARM emulator capable of running RISC OS. Part of this may have been due to the SDL alterations, or simply running on Windows.
To date, 23 minor and major changes have been made to the C code so the game plays and sounds much more like the original, but with many other improvements on top. These changes do not match other patchsets available on the Internet, since I have (intentionally) used Hugh’s original code as a starting point.
List of Improvements Made
I will be listing all the improvements on my GitHub account when the project is available: https://github.com/GMH-Code (opens in new window).