1984 · Activision

Ghostbusters

This minisite was contributed by air, unorig. It’s currently claimed by unorig who is editing it to reach a Gold tier standard.

A ghost-catching business from the bank's loan to the Temple of Zuul: the shop, the drive, the bust, the Marshmallow Man, the endings, and the account number that carries the money into the next game.

The franchise

From a $10,000 loan to the Temple of Zuul

The bank lends $10,000 to start a Ghostbusters franchise.1 The money buys a car and equipment, the busts earn it back, and the bank checks the balance when the Keymaster and the Gatekeeper meet at Zuul. Each step of a game is one screen, run by one entry in a table of 64 game states ($381A).

StepWhat the player does
The interviewtypes a name and answers DO YOU HAVE AN ACCOUNT?; an account number brings back the money from an earlier game
The vehicle pagechooses one of four cars
The shopdrives a forklift to load equipment into the car; at least one trap is needed to leave
The city mapsteers the Ghostbusters logo to a red building and presses fire
The drivecatches Roamers on the road with the ghost vacuum
The bustherds the Slimer over the trap with the proton streams
GHQdrives back to empty the traps, refill the backpacks, and bring the team back to three
The Marshmallow alertdrops bait with B before the Marshmallow Man stomps a building
Zuulgets two of the three men past the Marshmallow Man and into the building
The endwrites down the new account number

Cars and equipment

The shop: four cars and seven items

The $10,000 buys a car, then equipment carried across the shop on a forklift and loaded into it. Each item is painted into the car's picture as it goes in ($793E).

The vehicle page, drawn from the game's memory by the site's renderer.

The shop after buying, drawn from the game's memory.

CarPriceCarriesTop speedThe options page says
Compact$2,0005$6075 mph
1963 Hearse$4,8009$7090 mph
Station wagon$6,00011$80110 mph
High-performance$15,0007$A0160 mph

The prices are at $A1D4 and $A1D8, how much each car carries at $AA9A, and its top speed at $AA9E. The top speed only changes how fast the road scrolls, and so how long a drive takes. The miles per hour on the options page are text, and nothing in the code uses them.

ItemPriceWhat it does in the code
PK energy detector$400colours stage 1 buildings purple near the logo, and makes a hidden stage 3 Slimer show
Image intensifier$800draws the Slimer in front of the building; without it the Slimer goes behind the windows ($9AA6)
Marshmallow sensor$800colours the Marshmallow Man's building white near the logo
Ghost bait$400five dollops; B on the map
Ghost trap$600required; the shelf refills, so the car can be filled with them
Ghost vacuum$500catches Roamers on the road; pays nothing
Portable laser confinement system$8,000stores up to 10 Slimers, so a trap is emptied at once

The price table ($A1DC) has an eighth item that no shelf holds, so nobody can buy it. The Discoveries tab shows its picture.

The drive

The drive's length is the route's dots plus five

Choosing a building sets the car off along the dotted route drawn on the map. The drive scene is an overhead road, and the Roamers met on the map come back on it, where the vacuum can catch them.

A frame of the drive, drawn from the game's memory. The road scrolls by the fine scroll register ($7024) and a whole-character shift every eight pixels ($34F9).

The map counts the dots of the route as the logo moves ($7F29). A Roamer the logo touches on the way is marked with the dot count at that moment ($7DAA), and meets the car at that distance on the road, two at a time at most ($8117). The car speeds up by one a frame to its top speed, and brakes at the end.

The ghost vacuum needs a fresh press of fire with the Roamer within 32 pixels behind the car or 15 ahead. Pulling the Roamer in takes 32 frames, and then the Roamer starts again from its place on the map. A catch earns nothing and changes no PK energy, but it keeps that Roamer from reaching Zuul for a while.

The bust

Crossing the streams costs two men

At the building, one man lays the trap, two men walk into place, fire turns the proton streams on, and the joystick closes the gap between them to herd the Slimer over the trap. Then fire springs it.

The streams on, drawn from the game's memory.

A building with the trap down.

The crossing test at $85D4-$8615: with the men facing each other, the streams cross when the gap is below $2A minus a quarter of the height difference. Positions are stored halved ($A0-$AF).

With the streams on and the men 12 or more apart, the stick only moves them towards each other ($85B9, with made-up joystick readings at $B3AD). The backpacks lose one percent every 16 frames, and at zero the trap springs by itself. The trap catches the Slimer if it is within 8 pixels to the left, 7 to the right, 12 above, and 3 below the trap's light before the light has risen to $9C.

OutcomeWhat the code does
Caughtthe fee by the building's timer ($87DB), "Ghostbusters!", and an empty trap filled or, with the laser system, the Slimer stored
Missedthe Slimer flies to a man, who is slimed and out ($8704); "He slimed me!"; the building is cleared and PK energy rises by 300
Streams crosseda 64-frame freeze, backpacks at 0, two men lost, YOU CROSSED THE STREAMS..., and the Slimer escapes
No Slimerthe men wait out a delay and leave

A trip to GHQ empties the traps, brings the team back to three men, and fills the backpacks to 99 ($88B6).

The Marshmallow Man

Bait dropped before the alert is wasted

From 5,000 PK energy, every thousand crossed picks a building for the Marshmallow Man. When the building has aged, MARSHMALLOW ALERT flashes, the four Roamers gather round it, and the player has until they arrive to drop bait with B. Bait earns $2,000 from the mayor, and no bait costs $4,000 in damage.

The alert ($7ED8) clears the bait flag before the Roamers set off. Bait already on the map when MARSHMALLOW ALERT flashes counts for nothing, and only a dollop dropped after the alert stops the stomp.

A building picked for the Marshmallow Man can drop out of the game for good, as the Discoveries tab explains.

Zuul

Two men past the Marshmallow Man, then a climb of 197 steps

If the Keymaster and the Gatekeeper meet at Zuul with the balance not below the start, the game sends the car there. Three men must sneak past the Marshmallow Man into the building, and two are enough.

The street outside Zuul, drawn from the game's memory. The Marshmallow Man is four doubled sprites walking a 32-step path to and fro ($A8A5-$A8E5).

A catch is a hardware sprite collision ($D01E), tested every fourth tick. Two men through the door start the climb: the screen scrolls down a row per step ($3300), 176 steps of three repeating tower rows and then the 21 rows of the temple top. The portal then closes whatever happens, for $5,000.

Two men caught: GOOD TRY

If the Marshmallow Man catches two men on the street ($8B10), the game shows GOOD TRY. The pages then give a credit limit and a new account number exactly as a win does, without the $5,000.

The winning end page, drawn from the game's memory. The credit limit is the balance with its last two digits zeroed, and the account number is made from that.

The account number

The saved game is an eight-digit number that holds your money and a check on your name

A game that ends with more money than it started with prints a new account number. Typed back in at the start, with the same name, the number gives the player that money to spend. There is no disk file: the number is the save.

The account number the game prints

The game's routines ported: $90EE makes the number, $9155 checks it, $9CFC reads what was typed, $91B6 adds up the name, and $91A6 steps the check. Run on 20,000 random names, balances, and typed numbers beside the game's own code, every result matched.

The number carries the balance in hundreds of dollars, four decimal digits kept in two bytes ($57, $58), and the tens and units are dropped. A third byte is a check worked out from the name: the balance's two bytes are added, and the sum is stepped through an eight-bit shift register once for every unit of the name's byte total. The 24 bits are written as eight octal digits, and the game prints them in pairs with each pair reversed.

What the check lets through