This is the reverse-engineered and commented source code for the 1986 Commodore 64 game Ancipital by Jeff Minter. Following the build instructions below you can compile and run Ancipital from scratch yourself on a Linux or Windows desktop. Ancipital was written in 6502 assembler so might be a challenge to read and understand, even for someone who is already familiar with low-level languages such as C. The objective of providing the commented code here is to allow an interested reader to understand the techniques Minter used when coding the game and gain some insight into the workings of 6502 assembler in a then-state-of-the-art Commodore 64 game. The place to start is the overview of the code in the src directory.
You can play Mama Llama in your browser at https://mwenge.github.io/ancipital/. (Ctrl key is 'Fire', Arrow Keys to move.) You might find the game's original manual a useful read to try and figure out what on earth is going on!
The game compiles and plays. The routines in the main game are all labelled. Character set data, sprite data, and mini-games have been separated out but noall of them are commented yet. Because there is so much character and sprite data, and because Ancipital contains two sub games, it was necessary to use a compressor (Exomizer) to produce the final binary. Interesting findings, some analysis of the game logic and an overview of the code's structure can be found here.
To compile and run it do:
$ make
The compiled game is written to the bin
folder.
To just compile the game and get a binary (ancipital.prg
) do:
$ make ancipital.prg