1987 · Ocean Software

Short Circuit

This minisite awaits a maintainer’s check. A model this site has not proven yet worked on it (claude-sonnet-5-5), so a maintainer will measure its listing on one it has (how the check works). It is not complete either: 0 % of the program is explained. Clone https://github.com/gamesexplained/gamesexplained and follow kit/START.md to continue games/c64/short-circuit to Silver.

A robot-film licence that is really two games in one 64 KB load: a point-and-click style adventure that scrolls, and a run through the countryside. A text menu drives the first, and a small state machine, typed one letter at a time, runs the menu.

01 · The game

Number 5 is alive

Ocean's 1987 game of Short Circuit, written by John Meegan, with graphics by Karen Davies and music by Martin Galway.

You play No. 5, the army robot that a lightning strike woke up. Part one is a search of the Nova laboratory. A strip of rooms scrolls left and right; you look in drawers and cabinets, pick things up (four at a time), carry them to computer terminals and type them in. The goal is a decoy robot, built from four things you have to find, before a thirty-minute clock runs out. Part two is a run across the countryside: jump the animals, duck what flies, and keep your energy and shield bars from emptying.

Everything is on one disk file of 64,508 bytes. When the game starts, both parts are already in memory, and the attract screens (credits, a picture, the high scores) wait for fire. Fire plays the intro; the keys F1 and F3 go straight to part one and part two ($9561).

The credits screenThe title pictureThe high-score table

The attract mode cycles these three screens: credits, a loading picture ("Something wonderful has happened... No. 5 is alive."), and the high scores.

02 · One frame, rebuilt from memory

Both screens, drawn by this page

The pictures below are not screenshots. The page draws them from the memory of a running game with the site's own model of the video chip.

All 104,448 pixels match the emulator's picture of the same frame, for both parts (test_frame.js holds the drawing to the pictures in reference/). Each frame is split by three raster interrupts. Part one's chain runs at line $F3 ($07A0, which readies the next frame's scrolled playfield), line 0 ($085E) and line $A3 ($0767, which switches to the fixed panel). Part two's runs at lines $A3, $F3 and $61 and gives its playfield two bands that scroll by different amounts ($27CE, $282E, $2804).

03 · Controls

One stick, one key

Everything is on the joystick in port 2. In part one, fire performs the action named in the panel and the space bar steps it through JUMP, LASER, SEARCH and UTILISE ($067D). Menus are driven with the stick: a press steps to the next entry, fire chooses. In part two the stick does everything: up jumps, down ducks, left and right walk, and fire shoots the laser ($3AEC).

InputDoesWhere
Stick (port 2)walk, menu steps; in part two jump and duck$2B71
Fireperform the chosen action; confirm; in part two shoot$0586
Spacenext action$067D
F7pause and unpause, which also holds the game's clock$21CF
F5give up and return to the attract screens$9B3A
F1, F3 on the attract screensstart part one, start part two$9561

The game never reads the video chip's sprite collision registers. Every touch, pickup and hit is a comparison of sprite positions in software (for example $1BD5 for Johnny against the enemy robot, and the actors from $2DD4 in part two).

04 · The menu is a state machine

Twelve modes

What a press of fire does depends on a number at $0200, the mode. Press a mode to see what its handler does.

The main loop ($04E8) looks the mode up in the table at $43E8 and jumps to its handler. At mode 0 a press of fire first takes the action chosen with the space bar, through the table at $0675.

Everything the game says goes through a queue of message numbers ($02C4). The printer ($0E48) types one letter every third pass of the main loop into a four-line window. Messages 0 to 9 are the menu words, 11 onwards the replies; the object names start at 53 and the descriptions at 75. Searching shows the idea: the handler queues EXAMINE and PROCESSING and then waits 100 passes of the loop before it reports what it found.

05 · Objects and puzzles

Twenty-one things to find

Each object has four bytes in the table at $1568: the map column it lies in, its layer, its number and the number of its description. Taking one zeroes its column; hiding it in a container writes the container's column back. Nothing is shown in the world for them: SEARCH looks for objects whose column is the one under Johnny ($0D62) and whose tile in the middle row of the map is one of 43 searchable tiles ($153D).

No.ObjectColumnDESCRIBE says
0Laser Rom$9BEnables laser
1Construction Rom$76No further information
2Jump Rom$2AEnables jump
3Unknown Rom$E3No further information
4Remote Control Device$A6No further information
5Audit$AFMarked nova laboratories
6Robotics Construction Document$F4Marked nova laboratories
7Research Thesis$BDMarked nova laboratories
8A Laser Gun$4EConstructed mainly of lurid red and white plastic
9Security Document$46Computer codes for alarm
10Computer Specs$B7No further information
11Fire System Manual$EEControl codes for sprinkler system
12Computer Protocols$8CAcheives link with computer
13Labrador Puppy$42Has toilet roll wrapped around its neck
14Passcard$5BAllows access to medium security areas
15Password$78Log on number
16Lighted Cigarette$D6No further information
17Set Of Keys$8FBoth keys identical
18Desk Key$6ANo further information
19Chub Key$CAExecutive office key
20Ignition Key$0DKey for truck

The table at $1568, with the names and descriptions from the message text. The descriptions are hints: the JUMP ROM and LASER ROM unlock the actions of those names; the PASSWORD, COMPUTER PROTOCOLS, SECURITY DOCUMENT and FIRE SYSTEM MANUAL are the four things a terminal accepts ($1DC3); the keys open the eight locked drawers and cabinets ($15BC).

The ending of part one needs four objects at once, listed at $225A: the laser ROM, the construction ROM, the jump ROM and the robotics construction document. Walking into the exit area with the hold full runs $2219, which scores 2,000 points for each of the four it finds and otherwise says there is more input needed for survival. Two bonuses follow: 10,000 points and a bonus for the time left ($25AA).

06 · The world

A strip of 256 tiles

Part one's world is three rows of 256 tile numbers ($4000, $4100, $4200). A tile is 16 bytes: a block of 4 by 4 characters ($5000 on, 189 tiles). The scroll column ($02AE) and phase ($02AD) say which tile and which character of it is at the left edge. A scroll step moves everything two pixels ($087B); after eight pixels, the whole screen map and colour map shift by one character ($08F2, $0995) and a new column is drawn at the edge from the tile map ($0A33). The Maps / levels tab draws the whole strip.

Part two is two rows of 256 tile numbers ($4400, $4500), built from 160 tiles ($4600), and scrolls with a timer interrupt of the second CIA chip, which shifts the colour memory one place and draws the next column ($2956, $28EC). A table of 256 event numbers ($896E) says what appears at each scroll column: nothing, or one of fifteen creatures, each started by a routine of its own ($8A6E).

07 · Sound

Galway's driver

The five tunes are played by a three-voice script interpreter, and the Music tab plays them by running that driver, taken from the listing, on a 6502 simulator.