1986 · Beam Software

Fist II: The Legend Continues

This minisite was contributed by air, unorig. It’s currently claimed by unorig who is editing it to reach a Gold tier standard.

How the fighters are built from nine sprites and mirrored as they are unpacked, how the rooms are drawn, and how one frame of the screen is put together.

The fighters

229 packed images, stored facing one way

Every fighter image in the game, unpacked by this page the way the game does it. Each is one of the nine pieces a fighter is made of: a head, an arm, a leg, part of a body. Switch the facing to see the game's mirror at work, and click an image to see where it is stored.

The 229 frames ($8000), found through their address tables ($B57C), drawn in the fighters' colours as the recorded frame further down this page has them: the two shared sprite colours, black and light red for the skin, and red, the colour of sprites 1-3 and 5-7, on the brown of the jungle floor so that the black outline shows.

A fighter on screen is nine hardware sprites: three rows of three. Each pose names the image for each of the nine places ($B210), and 73 poses make every stance and blow. The images are packed: any byte other than zero is stored as it is, and a run of zeros is stored as a zero and a count ($1D3E). All 229 images take 12 KB instead of 14.

Only one facing is stored. To draw a fighter facing the other way, a second unpacker ($1F58) writes each row's three bytes in reverse order and passes every byte through a 256-byte table that reverses its four pixel pairs ($BF00). In multicolour a pixel is two bits wide, so the pairs move as units.

A move is a script of four-byte steps ($AF46): how long to hold, which pose, and how far to move across and up, read one step at a time ($1AF0). There are 44 scripts. A kick is a few steps of rising poses and a few of falling ones.

The cast

One body, five heads

The hero and every opponent, put together by this page the way the game puts them together. Pick a fighter to see all 73 of its poses.

Each pose drawn from its nine parts ($B210) and its head ($B533), placed where the game places them ($45DF), in the colours of the fighter's set ($269D), on the brown of the jungle floor.

Every fighter in the game shares one body. The nine parts of each pose, three rows of three sprites, are the same images for the hero and for every opponent. What tells them apart is a tenth sprite, the head, and two colours. Each fighter has a set ($269D) that picks the colour of the body sprites ($26C3), the colour of the head ($26B4) and where its six head images are stored ($26B9, $26BE). The hero is set 0, with a white headband. An opponent takes its set from bits 4 and 5 of its encounter record ($2716): sets 1 and 2 have twelve encounters each, sets 3 and 4 eight ($E609).

The head moves with the pose. For each pose a byte says which of the six head images to show, whether to mirror it or turn it upside down ($B533), and two more give its offset from the top left of the body ($B4A1, $B4EA). A fighter facing the other way has the offset measured from the other side ($4648).

Scenery

Rooms built from shapes, objects and lists

The world is 123 screens, each belonging to one of 48 areas ($4A71). The area chooses one of three scenery sets ($196F): areas 0-7 use set 0, the caves; 8-29 set 1; and 30-47 set 2. A set is built in three levels. Shapes are small rectangles of characters. Composite objects are lists of shapes with offsets. Each area then has a list of objects with their positions ($1556), and its colour list paints the colour memory ($16B8).

The manual credits the backgrounds to Greg Holland, drawn with David Johnston's "Character Editor" and laid out with Nigel Spencer's "Map Editor".1 Spencer remembers writing that screen editor and making all the levels with it, and that "trying to pack in so many levels into Fist II in so little memory was a real challenge".12 The three levels of shapes, objects and lists are how they fit. The map on the Maps and solution tab draws every room from these tables.

Each of the 48 areas, shown by its widest room, drawn by this page from the room's object list ($1556), the shapes of its scenery set and its colour list ($16B8), as far as the screen can scroll. The dark rooms are drawn lit. Every room is on the map.

The screen

One frame, rebuilt from memory

The first fight, drawn by this page from the game's memory and the video chip's settings as they changed through one frame.

A reconstruction, not a screenshot: one frame recorded in the emulator, with 70 writes to the video chip and the line each happened on, drawn line by line. It matches the emulator's own picture in all 104,448 pixels.

The game uses the video chip's last memory bank, the top 16 KB, and keeps its play-area characters ($D000) in the RAM beneath the input and output chips: the processor cannot see them there, but the video chip always reads RAM. There are two play screens, one under the operating system ROM ($F000) and one below the input and output chips ($CC00). While one is shown, the game builds the other, and every coarse scroll step swaps them ($3BFD).

Raster interrupts run in a chain. Each handler sets the line for the next and writes the next handler's address into the interrupt vector. Most of them move the fighters' sprites further down the screen: nine sprites a fighter, eighteen for two, with eight on the chip. A planner ($3F67) works out each frame which of seven layouts to use from the gap between the fighters, and writes the lines and sprite images into the next frame's handlers.