1987 · Activision

Rampage

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

The game tells the player to eat to survive, and eating does nothing. The third monster cannot be shot, two of the three tunes are gone, and the demonstration hides a message for someone called Rhona.

01 · Food

Bug: eating does nothing, though the game says "you must eat food to survive"

A monster that grabs something from a window chews it and gets nothing: no energy, no points, and no harm from the poison.

Two of the game's text screens, drawn by the game's own code, which the page runs on a copy of the C64's processor, the 6502. Left: the screen that ends a game. Right: the list shown before the first level, in three groups: things worth points in the arcade game, food, and things that hurt.

In the arcade game, food gives a monster energy back, and the manual of this version says the same: "edibles" increase your energy and electrical appliances give "nasty surprises". One of the newspaper's headlines is a hint about it: WANT TO EAT. WELL PUNCH SLOWER.

The code has one routine for eating ($8BFF; a number after a $ is an address in the game's memory, written in hexadecimal, and links to that place on the Source code tab). The routine plays 21 steps of a chewing animation and goes back to what the monster was doing. The routine never looks at which of the twelve things was grabbed, so a turkey, a toaster, and a bottle of poison are the same. Nothing in the program adds to a monster's energy ($9B81), and the only routine that adds to a score is the one for a punch on a building.

A monster that chews for 70 frames, a frame being a fiftieth of a second, has energy 40 before and 40 after, and its score does not change.

Energy therefore only ever goes down. A monster starts with 56 units and loses one for every second hit that counts, so each monster is out of the game after 112 counted hits, whatever it eats. A routine that adds 500 points sits in the code beside the one that adds 100 ($98E2), and nothing calls it.

02 · A message

Secret: on one level of the demonstration the monsters' names read RHONA, I LOVE, YOU

The three names at the top of the screen are swapped for a message when nobody is playing and the game is on its nineteenth level.

The nineteenth level as the game's own code sets it up and draws it, run on the site's 6502. The button changes one byte of memory, the one that says whether anybody has joined ($9C61).

When a level starts, the game checks two things ($90E4): that nobody has joined, and that the level number is 18, which is the nineteenth level because the count starts at 0. When both are true the game reads the three names from a different place in its table of names ($9AE2).

The message is hard to reach by playing. The level number only goes up when a level is cleared, and with nobody playing, the computer's monsters would have to flatten eighteen levels alone. They punch at random: left alone for a long time, they bring down one of the first level's three buildings. The picture above comes from setting the level number by hand before the level begins.

03 · Bullets

Bug: the third monster cannot be shot, and the second is hurt in its place

A bullet that reaches the third player's monster takes energy from the second player's monster, wherever that one is standing.

The page stands the three monsters apart in the street, puts one bullet inside one monster's box, and runs the game's own bullet routine ($9E68) on the site's 6502. The last column is the hit flag the game set.

About five times a second, on each pass of its main loop, the game works out an invisible box round each monster and tests every bullet against the three boxes in turn. A bullet inside a box is removed, and a flag is set for that box's monster. A flag is a byte that is 0 or 1, and this one means "hit". The three tests are the same piece of code written out three times, and the third copy was not finished: it sets the second monster's flag ($9F66) where it should set the third's.

The third monster is Ralph unless the players have swapped characters on the newspaper screen. Bullets pass nothing on to Ralph, and each one that would have hit him counts against Lizzie. Falls, punches from the other monsters, and the hole in the road still hurt him.

A bullet inside the third monster's box sets the second monster's flag while the second monster stands nine columns away.

04 · Lost music

Bug: the game asks for three tunes and has one and a bit

The list of things to eat and the newspaper each ask for a tune of their own. Both get the title tune, because the other two are mostly gone.

The page runs the game's own music player on the site's 6502, started the way the screens meant to start it: with the tune's number. The first button plays the one voice of the second tune that is still in the game, alone, and stops where its data stops. The second button plays all three voices as the game would, with two of them reading the scenery as if it were notes. The filter is modelled on a 6581 chip.

The music player has a table of three tunes ($0298). A tune is three lists of notes, one for each of the three voices the sound chip can play at once. Each of the three text screens loads a different tune number before it starts the music. The routine that starts the music ($AD0B) begins by setting that number to 0, so every screen plays the first tune.

The table shows why. The first tune's three voices sit in memory from $0576 to $09E6, and the second tune's first voice follows at $09E7. At $0B00 the scenery begins: the rows of characters that draw the skyline and the street. The second tune's first voice runs into the scenery in the middle of a note, about 65 seconds in. Its other two voices, and all three voices of the third tune, have addresses inside the scenery, so nothing of them is left.

What is left of the second tune is a melody line with no accompaniment. Whether the tunes were dropped to make room for the scenery, or were never finished, the code does not say.

05 · Unfinished sound

Bug: the sound effects never get to finish

Each effect was written to slide in pitch and stop after a set time. The routine that does both is in the game, and nothing calls it.

As the game plays them

With the unused routine running

Both players run the game's own code on the site's 6502. The left one starts an effect and does nothing more, as the game does. The right one also runs the unused routine ($82AC), which slides the pitch and the filter and switches the voice off when the effect's time is up. The page runs it once a frame, from the frame after an effect starts. How often the game was meant to run it is not known.

Each effect is described by a record of eight numbers ($82EC). The game uses five of them when it starts the effect. The other three, a length and two slides, are read only by a second routine, which was meant to run again and again while the effect sounds. That routine is complete and nothing calls it, so every effect is one burst of noise that fades by itself, and a long one is cut off by the next. With the routine running, each effect is a short, sharp sound of a few frames.

The game has a routine that the machine runs once a frame, whatever else is going on, called an interrupt. That routine has a gap of twenty empty bytes in it ($7953). A call to the missing routine would fit there. What the gap once held is not known.

Two of the five effects are never started. One of them is the only effect that is a tone, not noise. The other would have silenced the whole chip. Its record switches off all three of the filter's outputs ($D418), and the game sends every voice through the filter ($D417), so its own noise and any effect still sounding would go quiet until the next effect set the filter again.

06 · Falling buildings

Bug: a falling building hurts whoever climbed it last, wherever they are

A monster that climbed a building and walked away is still thrown into a fall when that building comes down.

The manual warns that a building giving way hurts a monster still on it. The game does this by remembering, for each monster, the number of the building it last started to climb ($8C80). On every pass that a building sinks, each monster whose remembered number matches is thrown into a fall ($B281), and each step of a fall is a hit.

The remembered number is set when a climb starts and never cleared. Climbing down, jumping off, and even starting the next level leave it as it was. A monster standing in the street on the far side of the screen is knocked over again and again while its last building sinks, and on a new level a building can hurt a monster that has not touched it, if it has the same number as the last one the monster climbed.

With George in the street while the first building falls, and that building his remembered one, he loses 5 units of energy. With another building remembered he loses 1.

07 · The energy word

Bug: when the first player is out, the second player's DAMAGE turns all red

The second monster's energy word shows empty for the rest of the game once the first monster is gone, whatever energy the second one has.

The status lines as the game's own code colours and prints them, on the site's 6502.

The routine that colours the three words ($9C62) handles the monsters in order. When the first monster's energy is 0 it skips that monster's letters, and the jump that skips them lands too far on, past the second monster's letters as well. The second word keeps the red it was painted with before the letters are coloured. How it works explains the word.

The second monster's real energy is not changed. The player just cannot see it any more.

08 · The street

Bug: one car in sixteen drives backwards, and every wreck flashes a piece of the text screens

Two slips in the tables for the street vehicle, both visible in play.

Top: the first and the last entry of the vehicle list ($8CC7-$8D06), moved as the game moves them, 2 pixels a frame. Bottom: the four pictures a wreck goes through, each made of a left and a right sprite shape ($8C9B, $8CA2).

The game picks each new vehicle at random from a list of sixteen. Each entry names a picture, the edge of the screen to start from, and a speed. The last entry pairs the car that faces right with a start at the right-hand edge and a speed to the left, so that car crosses the whole street in reverse.

A wrecked car or tank goes through four pictures. Each picture is two sprite shapes side by side, a sprite being a small picture the video chip can place anywhere on the screen. The second picture's entries are both wrong. Its left half is the right half of the first picture. Its right half is shape number $BB, which is not a sprite shape at all: that address is inside the character set, the collection of letters and small tiles that the game draws its text screens with. For a moment the wreck's right half is eight of those characters, read as if they were a sprite.

09 · The shake

Bug: the city stays shaken after a building falls

A falling building shakes the screen from side to side. When the fall is over the screen stays wherever the last shake left it.

The first level, with the game's own code for a falling building run on the site's 6502 at the game's speed. The black strip that opens at the left edge is the shift.

The video chip can slide the whole picture to the right by 0 to 7 pixels. The program asks for this by writing a number to one of the chip's registers, $D016. On each pass that a building has no strength left, the game puts a different number there ($B2DF), and the city jumps about. Nothing puts the 0 back when the building has gone, so the picture, the status lines included, stays up to 7 pixels to the right until the next level sets the screen up again.

The register holds $D8 before any building falls, and $DB and $DF after two different falls. The last digit is the slide: 0, then 3 and 7 pixels.

10 · Left in memory

Leftover: the last game somebody played before the program was saved

The game's working memory for buildings went onto the disk as it was, with three punches landed on the first level and two wrecked buildings from other levels.

The first level as the file holds it
The fourth map, on a level whose fourth building has that shape
The fifth map, on a level whose fifth building has that shape

The game's own drawing code on the site's 6502, with the building maps ($7500) left as the file has them. A level normally copies fresh maps in before it starts. The two ruined buildings are drawn at full height; in the game they would have sunk into the ground.

A level keeps its buildings in six small working maps and copies a clean shape into each one when the level starts. The copies in the file are not clean. The first three maps hold the first level's buildings part of the way through a game. Some windows are lit and some dark, which the game changes as a level goes on, and three punches have landed: the first building's strength is 8 where a new level gives 10, and the second's is 11 where a new level gives 12.

The fourth and fifth maps hold two buildings in which every block has its ruined form, the form a block takes while its building falls. The first level has only three buildings, so these two are from a level with more, played earlier in the same sitting. The sixth map is empty.

11 · The manual

Quirk: the manual promises 150 screens and the game has 20

The inlay describes 50 cities of three days each. The program has twenty levels and then starts again.

Each level is two short lists, of building shapes and of columns. There are twenty pairs of lists in use, and when the twentieth level is cleared the level number goes back to 0 ($926F). There are no city names and there is no count of days. The Levels tab draws all twenty.

The level tables have two more entries after the twentieth, each a single building. The level number can never reach them.

The scoring is smaller than the manual's too. A punch that changes a block of a building scores 100 points, and nothing else scores: not a building falling, a helicopter, a vehicle, or a soldier. The last two digits of a score never change.

12 · Spelling

Bug: one headline has a piece of a picture where its P should be

The newspaper prints EX?ERIMENTAL VITAMIN HAS ILL EFFECTS, with a scrap of graphics in the middle of the first word.

The newspaper before the eighth level with George playing, drawn by the game's own code on the site's 6502. The headline is one of eight, chosen by the level and the player's place on the page.

The headline's text is stored as character numbers ($AED1 leads to the eight headlines). The third character of this one is the byte $FB, where the letter P is $18. Character $FB is a piece of one of the screen's pictures, so the word has a scrap of a picture in it.

The lizard's name is spelt two ways. The newspaper says LIZZIE, as the manual does, and the name above her score in play says LIZZY.

13 · Explosions

Quirk: a helicopter's explosion is animated by its rotor, and twice goes blank

The spinning rotor's frame number is added to the explosion's pictures as it is to every other helicopter picture, so the explosion runs back and forth through its pictures and on into two empty ones.

As the route lists it
As the game shows it

The explosion's route from the game's tables ($8D21), drawn from its sprite shapes at a fifth of the game's speed so that each picture can be seen.

A helicopter's picture is the number of a sprite shape plus the rotor's frame, which counts 0, 1, 2, 3, 2, 1 so that the blades appear to turn. Each of a helicopter's six poses has four shapes in a row for that reason. A punched helicopter follows a ninth route of three moves, which name the explosion's shapes $C0, $C1, and $C2 in turn.

The rotor's frame is still added during the explosion. The first move runs up and down through all four explosion shapes. The second and third start further along and run on into shapes $C4 and $C5, which are empty, so the explosion blinks out and comes back. Three explosions in one game go through the shapes C1 C2 C2 C3 C3 C2 C2 C1 C1 C0, then C0 C2 C2 C3 C3 C4 C4 C3 C3 C2 C2, then C2 C2 C3 C3 C4 C4 C5 C5 C4 C4 C3 C3.

Whether the blinking was meant is not known. The table of moves has an entry for the fourth shape, $C3, and the route never uses it: the fourth shape is seen only because the rotor's frame is added.

14 · Never used

Leftover: a high-score table, a pause, and words nothing prints

Parts of a slightly bigger game are still in the code, with nothing that leads to them.

WhatWhereWhat it would do
A high-score routine and the words HIGH SCORE and GAME SCORE$A9B0, $A9F8, $B197Keep the best score and print it. The game shows only the three scores of the game just played.
A pause$8FECWait in a loop while a flag is set. Nothing sets the flag. The keyboard routine reads the Q key and the Commodore key on every pass and does nothing with either.
MISS YOU and CUDDLE WHUMP FLUMP DUNKS$AEE7Unknown. The words sit among the headlines and nothing prints them.
THEN PRESS FIRE, and ONE, TWO, THREE$AF32, $AF5DUnknown. The words read like a screen for choosing how many play; in the game, players join from the newspaper screen.
A second eating animation$8BF5Monster state 13. Nothing puts a monster in it.
A test of what is beside a climbing monster$87DAA list of wall characters that a jump placed in front of the list skips, so a climb is never refused for what is next to the monster.
A routine that prints a number in hexadecimal, with six test bytes$A7F1A programmer's tool for looking at memory on the screen.
A routine that flashes the border$84D1Runs when a monster's state number is out of range: an alarm for the programmer.

The graphics have spares as well. Four of each monster's 38 frames are never asked for, one of the twenty small pictures on the text screens is never drawn, and four of the vehicle shapes are never shown. The Graphics tab draws them with the rest.

15 · Small slips

Bug: a raised fist with a notch in it, and other small slips

Mistakes of a byte or an instruction, each with a small effect on the screen.

George punching upwards, facing left. Left: the picture as its tiles give it. Right: the picture after the game's own copying routine ($B520), run on the site's 6502. The outlined pixels differ.

The fist. The routine that copies a monster's picture into its sprites is 288 instructions that read a byte and 336 that write one, written out by hand, and one of the reads is wrong: the fourth byte of the picture's second line is read from the first byte of that line ($B556). The same slip is in all three monsters' copies. The two bytes are equal in every frame except the two with a fist raised to the left, where a byte of the fist's top edge is replaced and three of its four pixels change.

Roof corners. The table that says what a punched block becomes gives three values to the ends of a roof ($A73F), and the punch routine keeps only part of each value. A punched roof end turns into a piece of wall and window where a broken roof end was meant.

Holes. A new hole in a wall joins up with a hole above it, never with one below. The code for the hole below is there, and the address it would use is only half set up.

Reaching for food. A monster's grab was meant to test a square of four characters for something to eat. An instruction is missing, and the test covers three characters in a row.

One row of colours. The game draws on two screens by turns. For one of the two, the copy of the colours for row 21 reads the other screen's characters, so that row's colours can be a pass out of date.

Lit windows. The routine that lights and darkens windows takes eight buildings in turn, and a level has room for six. On the two extra turns the routine looks at memory that belongs to the monsters' pictures. No byte there has the value of a window, so nothing is changed.