1984 · Epyx

Impossible Mission

This minisite was contributed by chunkypixel, 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/impossible-mission with me to Gold.

Every sprite the game shows, drawn from its own bytes and moved at its own speed: the agent's 28 frames, the robots, the zap, the lift and the screens the pocket computer and the terminals put up.

01 · Everything that moves

The agent runs, somersaults and dies in 28 frames of three sprites

Pick one. Each plays at the game's own speed on a PAL machine, from the game's own tables, in the colours of the room chosen below.

Shapes that never change

These move across the screen, or sit still, but the game never changes their shape. They are drawn here in the colours the game gives them.

Every shape in the game's two sprite blocks is used: the agent's 64 shapes from $6000 to $6FFF, the robots' seven, and the sixteen small shapes at $4400. The map marker, the piece frames and the dying agent are drawn into a work area at $4D80 while the game runs, so their shapes are not stored anywhere.

02 · One frame

Every frame is three sprites, stored once and mirrored when he turns

Step through all 28 frames. The three sprites are drawn apart in three colours, as the video chip sees them.

The agent is sprites 1, 2 and 3, one above the other at the same X: sprite 2 at the top, sprite 1 twelve lines lower and sprite 3 twenty-one lines lower ($ABE2). Sprite 1 is white and the other two light grey ($9715), and sprite 1 is drawn in front, so it carries the face, the hands and the light edges. Each frame names its first shape in a table ($8D43), and the other two follow it ($873B).

The fourteen walking frames are two strides of seven that share their upper sprites: the second stride skips a shape to take its own sprite 1. In six frames of the somersault, sprite 2 is switched off and the agent is two sprites, curled into a ball. Each frame is stored facing left. When the agent faces the other way, $8729 mirrors the frame's shapes in place, through a table of reversed bytes the start-up builds at $C500, and notes the new facing in the last byte of the frame's first shape, so a frame is turned only when the facing has changed since it was last drawn.

In the somersault each sprite moves on its own: five tables give each of the twelve frames a step up or down for every sprite and a step forward for sprites 1 and 2 and for sprite 3 ($8D07-$8D42, applied by $8859). What frame $0F is for is an open question: the only code that tests for it is $948C, which checks whether the agent stands on a lifting platform.

03 · The screen

Rooms are multicolour characters in one set; the shaft and the pocket computer split the screen between two others

The stronghold is drawn with three character sets of 256 glyphs, all in the video chip's second bank of memory.

SetShown inSelected by
$4800the shaft view above the panel, the security terminal, the end screenthe interrupt at line $FF
$5000the rooms$A39C, which draws the room; in a room the interrupt leaves it alone
$5800the pocket computer panelthe interrupt at line $AA

In the shaft view the raster interrupt runs twice a frame. At line $AA, where the panel begins, it sets the panel's background and multicolours and character set $5800; at line $FF it puts back the shaft's colours and set $4800 for the next frame ($82F4). A room fills the whole screen, so there the interrupt runs once a frame and never changes the set. The first eighteen glyphs of the room set are left blank in the program and filled while it runs: with the code rooms' big screen, or with the picture of what a search has found.

The sprites are shared out the same way in every room: sprites 1 to 3 for the agent, 4 to 7 for the robots, and sprite 0 for the ball, or the zap while a robot fires. In the shaft view sprites 0 and 7 are the lift car, and in the pocket computer sprite 4 is the hand and sprite 6 the map marker.