1991 · Imageworks (Mirrorsoft)

Speedball 2

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/speedball-2 with me to Gold.

Two words typed on the title screen: one turns on a cheat, the other shows a photograph. And a message for anyone who reads the code.

01 · A typed code

Secret: typing BRADFORD-ON-AVON on the title turns on a cheat

The title screen checks every key against two words. The first switches on cheat keys that work in the menus and in a match.

The codes are read from the game's bytes in the built site.

The two codes are stored at $C1A0 and $C1B1 as key numbers, each ending with a zero. The C64 wires its keys in a grid of eight rows and eight columns, and a key's number is eight times its row plus its column. The page decodes them and matches keys as the title does (title, $C0C4).

The title keeps a place in each code. A key that matches the next letter moves the place on; any other key puts it back to the start, and that key does not count as the code's first letter, so BBRADFORD-ON-AVON does nothing. When the place reaches the end of BRADFORD-ON-AVON, the cheat's on/off switch in memory, $0C10, flips, with one sound for on and another for off. Typing the code three times in VICE set the flag to 1, 0 and 1.

The cheat keys. All but the match's + were tested in VICE; that one is read from the code.

WhereKeyWhat it does
Menus, gym, manager+Adds 100 to the bank (menu_frame, $6189). Three presses in the gym took it from 1100 to 1400.
A matchTKnocks down every one of team 2's players on the pitch, as the zap team token does (token_zap_team, $32AD).
A matchGGives the ball to the controlled player, as the grab ball token does (token_grab_ball, $326C).
A matchFFreezes team 2, as the freeze team token does (token_freeze, $334E). The manual gives F as the key for fast play; there is no fast play in the code.
A match+Adds team 1's star bonus to its score ($216D).
A matchRUN/STOPEnds the match as a draw, 000 to 000, which counts as played (play_match, $7467). Without the cheat, RUN/STOP abandons the match.

Bradford on Avon is a town in Wiltshire, and the code is most likely the name of the author's favourite football team. The game itself does not say.

02 · A typed code

Secret: typing MARTIN shows a digitised face

The second word on the title screen shows a picture that appears nowhere else in the game, until fire is pressed.

Drawn from the game's bytes: the list at $C4F9 names three packed blocks, the screen colours at $C8C5, the bitmap at $C506 and colour RAM at $C994. The page unpacks them with the game's own rules (unpack, $498E) and draws it as the chip shows it, a multicolour bitmap, a picture stored pixel by pixel, on black, as screen_on ($5039) sets the chip.

The picture is a grey photograph of a face on a cyan ground (show_picture, $4FF3, called from $C135). Typing MARTIN in VICE showed it, and fire went back to the title. The game does not say whose face it is, but it is almost certainly Martin Walker's: he wrote the C64 version's music and sound effects, and the intro's credits name him.

03 · The intro's letters

Secret: the intro's eighth letter is a star parked off the screen

The intro spells SPEEDBALL with seven sprites, small pictures the video chip draws over the screen. The eighth sprite is a star, switched on and placed past the right edge of the picture.

The eight sprites at the X positions in letters_xs ($0F6D, stored halved), drawn from frames $60-$67 of the intro ($D800-$D9FF). The blue band is what a monitor shows, the border darker and the paper lighter; the grey beyond it is past the edge.

The letters object places its eight sprites from a table of X positions, each stored as half its value so that it fits in a byte. The last entry is $C8, 200, so the star sits at X 400. The visible picture, border and all, ends near X 375. In VICE, with the letters shown, sprite 7 was switched on at X 400 and Y 60, showing frame $67, the star. Nothing in the intro moves it, so it is never seen.

04 · A message

Secret: the game's code starts with a message for anyone reading it

The first instructions of the game jump over 60 bytes of text that nothing prints.

The bytes are read from the game's listing in the built site.

The game's entry, $C000-$C047. Five instructions, then the jump to start_init ($C044) over the text at $C008.

The loader jumps to $C000. The game turns interrupts off, clears decimal mode, resets the stack and jumps to $C044. In between sits a message in ASCII, the standard code for letters: STOP PERVING AT MY CODE SCUMBAG! WRITE YOUR OWN ****** GAME. It can be read only in memory, or after getting past the disk's protection, which decrypts and unpacks this load twice before it runs.

05 · The tune data

Music: a second tune that the intro never starts

The intro's music data holds two tunes. Only the first is ever played.

Tune 1's header, at $0D93, points each voice at a track of one pattern, and each track ends with $FE, the code that stops the music. Played, it lasts seven frames: one note on each voice and then silence. The intro starts its music in two places, and both load 0 into A before calling music_init ($146B, $14A4), so tune 1 never plays. The player on the How it works page runs it through the intro's own code.