1987 · Electric Dreams Software

Fire Trap

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

Things the code shows that the screen does not.

Stages

Sixteen stages from four maps

The game has four stage maps ($8E00, $9120, $9440, $9760), but sixteen stages. load_stage_map ($15FB) picks the map from the low two bits of the stage number, set_tile_source ($CE3A) picks one of two tile character sets from the next bit, and a colour table at $C0BC picks the colours. The same building is drawn in a different set of tiles and colours on its second visit. The Maps tab lists all sixteen.

Timer

A timer unit is thirteen frames

The stage timer starts at 999. A prescaler ($60) counts down from $12 once a frame, and each time it runs out the timer drops by one. A unit therefore lasts 13 frames, a little over a quarter of a second on a PAL machine. So 999 becomes 984 in 200 frames. From 999, the timer lasts about 260 seconds.

Controls

The keyboard stands in when the stick is idle

The game reads joystick port 2, and only when that stick is idle does read_keyboard_joystick ($FFAA) look at the keyboard: Q is up, Z is down, comma is left, full stop is right, and space is fire. Each key moves the firefighter the same way as the stick. RUN/STOP pauses (pause_check, $FFCC).

Music

The last tune is never started and plays no note

The driver holds five tunes, and nothing in the game starts the last one. It plays no note, and runs 83 frames. Tune 3, the stage music, is the same length as tune 0, 5,102 frames. The driver runs seven times in six video frames, so the tunes play a sixth faster than one call a frame would.

The crack

What the trainer changes

The copy analysed is a Triad crack with a trainer. Switched on, its two options change two bytes of the game: at $1CEF a DEC $63 becomes BIT $63, so a hit costs no life, and at $2CE8 a SBC #$01 becomes SBC #$00, so the timer does not run down. With both options off, the bytes are the original ones, and every page here was studied with them off. The first snapshot taken for this analysis had the options on; the lives and timer comments were corrected after a live test showed it.

A bug

A shot kills the wrong bird

Every other hit test in the game skips an object when the shared test (spray_hit_test) says the shot missed it. The birds' test (spray_hits_birds, $39E3) has the branch the wrong way round (BCS at $3A12): a bird the shot touches survives and only the shot disappears, while the first live bird the shot misses is removed and scores 30 points. On stage 1, a shot far from a bird clears it and raises the score from 50 to 80, and a shot on the bird leaves it flying.

Open

What is not settled

The second pickup state (state_8_countdown_pickup, $1A93) starts a 59-count countdown in $74. While it runs the hit tests skip the firefighter, so it is very likely the protective suit a retro blog names. Pickup kinds 0 and 1 are worth 1,000 and 2,000 points and are likely the blog's money bags. Neither name is in the code. The classes of collision 2 to 4, and the names of the floating and walking creatures and of the top-of-building object, are described by what they do, not what the game calls them.