1989 · MicroStyle

Stunt Car Racer

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/stunt-car-racer with me to Gold.

What the code does that the game never tells the player, and what was left in the file by accident.

01 · Left behind

Secret: a question from an Atari ST program is in the game's file

At $7F40 the game as loaded holds the end of an alert box from the Atari ST's desktop, asking whether to re-colour an image with the palette in use. Nothing reads it, and the start-up copies a frame of the boost's flame over it before anything is shown.

The 91 bytes from $7F40 in the game as the loader leaves it, drawn as an alert box: the Atari ST's desktop (GEM) takes an alert's lines split by | and its buttons in brackets, as these are. The start of the message is not in the file: the bytes before $7F40 are the game's own. The start-up copies 64 bytes from $6B60 over the first 64 of the text (STARTUP, $3FFB), and in a race they are a frame of the boost's flame, sprite $FD, drawn here.

The bytes are inside one of the ranges the start-up's checksum adds up ($5780-$7FFF), so they were on the disk when the sum was made.

02 · A signature

Secret: Geoff Crammond's name is hidden in the data, scrambled

After the tables the car's physics use, at $AFE0, are 29 bytes that read as nothing. Each byte flipped by $AA gives "COPYRIGHT GEOFF CRAMMOND 1988".

The bytes from $AFE0 in the game's file. An exclusive or with $AA flips every other bit of a byte, so the words do not show in a search of the file for text. No code reads them.

03 · The Super League

Secret: the Super League's settings are found with the player's driver number

Before each race eleven bytes of settings are copied from $BFEA plus the Super League's flag. In the Super League that flag holds 11, the player's driver number, and a set is eleven bytes long, so the copy starts at the second set.

Copied toLeagueSuper LeagueWhat it does

CLEAR_RACE copies the set from $BFEA plus $C71A, which is 0 in the league and, once CHANGES ($375D) has put the player there, 11 in the Super League. Ten of the eleven bytes differ. No instruction reads the unnamed ones by name.

The flag does a second job without a test or a branch: wherever the code asks whether the race is in the Super League, any value but 0 answers yes, and the one it holds there also points at the right settings.

04 · The clock

Bug: the race clock runs about three per cent slow

The clock adds 0.14 seconds every pass of the race, as if each pass took seven frames. On Little Ramp a pass takes 7.25 frames on average, so ten seconds of racing show as 9.66 on the clock.

The tracks that take longer to draw run slower clocks still, so lap times are not comparable from track to track. How it works has a calculator for any length of pass.

05 · The other races

Secret: in the races you never see, Hot Rod can never lose to the bottom four drivers

A race the player is not in goes to the higher of two ratings, each a fixed base plus 0 to 63. The bases fall by ten a driver, so a driver seventy or more below another can never win.

Hot Rod's base is 120, so High Flyer (50), Bully Boy, Jumping Jack and Road Hog can never beat him, however the dice fall. Dare Devil (60) beats him once in 512 races. How it works works out the odds of any pair.

06 · The checksum

Secret: change one byte and the game stops with a yellow border

The start-up adds up the game's bytes in seven ranges and compares the sum with $9DFA. On any other sum it turns the border yellow and loops for ever.

FromTo

The ranges at $42A9 that CHECKSUM ($425D) adds up byte by byte into sixteen bits. With one bit of the byte at $9000 changed in the loaded game, the border was yellow ($D020 7) after 300 frames and the processor was in the loop at $42A6.