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.

The city map at the centre of the game: buildings to clear before their Slimers escape, a PK energy meter that keeps climbing, and two wanderers whose meeting at Zuul ends the game.

The city

Twenty buildings, each on a clock: green, purple, red, and gone

The city map is the game's hub. Buildings turn red when a Slimer moves in, the PK energy meter climbs, and four Roamers drift towards Zuul. Every building has a timer, and a Slimer left alone escapes after five minutes.

One frame of the city map, drawn from the game's memory by the site's renderer with every write the game made to the video chip during the frame. All 104,448 pixels match the emulator's picture of the same frame. The status band at the bottom is a raster split: the interrupt changes the colours at lines $DF and $EC.

One haunting, as frame_building_timers ($73BD) ages it and map_building_under_logo ($7D23) colours it. The state byte's high nibble is a timer that counts every 256 frames; when it wraps, bldg_next_stage ($A9B4) moves the building on. A building reaches stage 1 at 3,839 frames, stage 3 at 7,679, red at 11,519, and escapes at 15,359. The fee is slimer_reward ($A1E4) by the timer.

A building starts at stage 0 when the game picks it ($740C), and nothing on the map shows it. After 76.6 seconds it reaches stage 1, and 76.6 seconds later stage 3. Stage 2 is the Marshmallow Man's (Gameplay). At stage 3 the Slimer is already inside: the bust tests the two stage bits, and a building at stage 3 passes, though it still shows green. 76.6 seconds after that the building turns red and flashes, and 76.6 seconds later again the Slimer escapes and adds 300 to the city's PK energy.

The fee falls $100 every two timer ticks, from $1,000 when the building has just turned red to $300. A trapped Slimer in a building that has already been cleared pays $300. The timer restarts when a building turns red, so a Slimer caught at hidden stage 3 is paid by the time since stage 3 began.

The detector makes a hidden Slimer show itself

The PK energy detector and the marshmallow sensor colour only the buildings whose block the Ghostbusters logo is on, and only while it is there. Stage 1 turns purple with the detector, stage 2 white with the sensor. At stage 3 the detector does more than colour it: the building turns red on the spot, with its fee timer restarted at the top rate ($7D23).

PK energy and the end

The game ends when the Keymaster and the Gatekeeper meet at Zuul, somewhere between 8,495 and 9,999

The manual says the game ends when the city's PK energy reaches 9,999.1 The code has no such test. Two wandering sprites on the map decide it.

PK energyThe meter rises by 1 everyThe map's sprites move 2 pixels everyWhat else happens
0-99964 frames64th frame
1,000-1,99932 frames32nd frame
2,000-4,99916 frames16th, 8th, 4th
5,000-9,49916 framesother frameeach thousand crossed picks a Marshmallow Man building; each of the Keymaster and Gatekeeper heads for Zuul when it next passes its own crossing
9,500-9,99916 framesother frameboth head for Zuul at once

The meter's rate comes from $73F3 and the masks at $9DBA, and the moves from $7BF8-$7C2C. Every Roamer that reaches Zuul adds 100, and every escaped Slimer 300.

The Keymaster and the Gatekeeper are map sprites 2 and 3. They wander the street grid, choosing each turn from the random byte ($7DFF). When both stand on Zuul, map_zuul_meeting ($7C2E) compares the balance with the balance at the start. In eight test runs from 5,000 they met at 8,495, 9,511, 9,519, 9,524, 9,718, 9,724, 9,725, and 9,999. The meter stops at 9,999, but nothing happens there.

The comparison lets an equal balance through, so a player who earns and spends nothing still goes on to Zuul (Discoveries). What happens there is on the Gameplay tab.