1989 · Melbourne House

Aaargh!

This minisite was contributed by Nico-van-der-Zijden. It’s agent-generated and needs a human editor. Clone https://github.com/gamesexplained/gamesexplained and follow kit/START.md to curate games/c64/aaargh with me to Gold.

Every place a monster can wreck, drawn by the game's own builder from the bytes it loads: seven cities, a city in a cave, the volcano, and the cave where the monsters fight.

01 · The places

Nine places, each built by the game's own code

Pick a place. The picture is the screen the game builds when a monster arrives, before anything moves.

Numbers written with a $ are addresses in the computer's memory, in hexadecimal; each one links to the game's code on the Source code tab. The screen is a grid of characters, tiles of 8 by 8 pixels, each place with its own set. Each place's data starts at the address in the tables at $82CF and $82D9. It holds 128 colours, one for each of the place's own characters, then the 128 characters, a kilobyte, then the screen, packed. The builder at $853E copies the colours to $A2A1 and the characters to $C000, takes 62 more characters from a pool the places share (the window at $B691), and unpacks the screen into rows 1 to 24. In the packing, a byte with its top bit set repeats the next byte, and any other byte copies that many bytes as they are.

Then it puts up the six buildings. Each place has six entries in three tables, a column at $B5F5, a row at $B626 and a type at $B657, and the type picks one of 37 pictures with its width and height ($A209, $A255, $A27B). The cave has no buildings, and the volcano's are not there to be knocked down for an egg: its golden egg sits in the mountain's mouth from the start.

02 · The order

Three cities, then the volcano, then round again

The game picks each city from a short list, by how far into the round the monsters are.

The city count at $803E goes 1, 2, 3, 4, and back to 1. The picker at $8444 reads the table at $842F at four times the count plus a random number from 1 to 4, so each slot has its own short list. Checked in the emulator: ending city after city, the fourth was the volcano each time, and the count went back to 1 after it.

03 · The buildings

Every building in the game

Every building type, drawn with the characters of the first place that uses it.

Each picture is a block of character codes, row by row, at the address the tables $A209 and $A22F give for its type. Type 10 is used by no place, and its picture runs over the next type's, which starts a byte later.