1987 · Palace Software

Barbarian: The Ultimate Warrior

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

A blow that reads its result from the music, a message for Claire, and pictures in the game that no fight ever shows.

01 · A wrong address

Bug: a blow's second chance is read from the wrong memory

When a blow's list names the other fighter's pose twice and the first record misses, the game reads the second record from somewhere else: the music, or the chips. A flying neck chop that meets a kick four columns away lands, though no record reaches that far.

The left-hand barbarian's sword sweeps out in a flying neck chop as the right-hand fighter, in purple, kicks; four columns apart
The flying neck chop (frame $1A) meets the kick (frame $1B) four columns apart.
The right-hand fighter stands upright, a red splash at the attacker's sword and a dark stray sprite beside him
The next pass: he has lost a point of strength and is in move $BE, which the game has no move for.

Screenshots from VICE, side 1, with the two moves started on the pass before. The table comes from a port of hit_test ($8662), which test_rules.js holds to the game's routine on the page's 6502 for all twelve blows, every pose and every distance.

Each blow has a list of pairs: a pose the victim may be in, and the number of a record of four bytes that says what happens (How it works). hit_record_at ($86E0) turns the number into the record's address: it multiplies the number by four by shifting it left twice, rolls the bits that fall off the top into $88, then adds hit_records ($C69C), $C6 into $88 for the high byte. hit_test clears $88 once, before it starts down the list ($8680). The first record leaves $C6 or $C7 there, and the second call shifts that left too, so its address is wrong.

Five of the twelve lists name a pose twice, the second time with a record meant for longer distances. Record 13, for the flying neck chop against a kick, belongs at $C6D0 and is read at $E2D1, inside the music. Its first byte, $B3, says the blow reaches distances 0, 1, 4, 5 and 7. So a flying neck chop that meets a kick 4, 5 or 7 columns away lands, where the real record 13 reaches 2 and 3. The other three bytes were never meant as a record. The victim's move becomes $BE, a number past the game's 30 moves, so for a pass he is drawn from frames found in the wrong table, then from move $F8, before the computer takes him back.

The other second records are read at $DEC9, $DED1 and $DEDD, the input and output area for cartridges. With nothing plugged in, a read there returns whatever the video chip last fetched from memory, so whether such a blow lands changes from one moment to the next. In VICE a flying neck chop against a fighter guarding his body four columns away landed: a point of strength gone and his move $FE. By its records it should have missed.

02 · A message

Secret: CTRL and V say HELLO CLAIRE

Hold CTRL and V together during a game, and two lines appear in the middle of the arena for as long as V stays down.

Two barbarians stand in the arena, frozen; across the middle the text V 05 10 87 and below it HELLO CLAIRE
Side 1 in VICE, CTRL and V held.
The keyboard routine tests CTRL and V on every pass (read_keys, $9246). While both are down it stops the sprites and prints message $81 in the bitmap's font: V 05 10 87, then HELLO CLAIRE. It waits until V is let go, then recolours the band the fighters are drawn in and play carries on. Both sides of the disk have it.

The message is stored with the game's other 23, among the score lines, YOUR END HAS COME and THANKS BIG BOY (message_pointers, $B951). The game does not say who Claire is.

03 · Unused frames

Two frames of the rolls no move shows

The game has 91 numbered frames of animation. Two of them, with pictures of their own, are in no move's list: one in the middle of the roll forward and one in the roll back.

Each frame drawn by the game's own routines on the page's 6502 (compose_frame, $88E3, and draw_fighter, $8A10), from its entry in frames ($BC6A), with the fighter at column 14.

The roll forward runs frames $23 to $26, then move $98 shows $28. Frame $27 sits between them. The roll back runs $29, then $2B to $2E, and skips $2A. Neither unused frame names a body piece for the right-hand fighter. Of the frames the moves show, only the last two of the fall to death and the last of the headless body go without one.

Frames $15 and $47 are in no move's list either, but they share their picture with frames that are. And one move is never started: move $95, a list of one frame, $3E, which holds for ever. The joystick's rows, the hit records and the code on both sides never name it. Its frame shares its picture with the crouch down and the stand up.

04 · Unused sprites

Two body pieces nobody wears

The right-hand fighter's coloured clothes are 45 sprite shapes, one laid over each frame. Two of them are never laid over any frame.

The sprite shapes from the listing, at pointers $63 to $65 and $6C to $6E, drawn in the colour of skill level 4. The middle one of each three is unused.

A frame's description names its sprites by shape (place_overlays, $8E83). Shapes $33 to $5F, sprite pointers $53 to $7F, are the body pieces. Every one but $44 and $4D is named by at least one of the 71 descriptions, and both hold a picture.

05 · The ending's data

Secret: a second figure of Mariana

The ending has four scenes for its sprites, and it shows three. The fourth is Mariana with a different middle.

SceneSprites 3 to 0Shown
0-, $8F, $90, $91Drax standing, while he throws
1$92, $93, $94, $91Drax throwing, for one pass a throw
2-, $8B, $8C, $8DMariana, at the end
3-, $8B, $8E, $8Dnever

From scene_records ($CD09 on side 2). The numbers are sprite picture sequences: $8C shows shape $34 and $8E shape $36.

Mariana is three sprites: head, middle and legs. Scene 3 swaps her middle for shape $36, the same figure without the top of her costume. Nothing in the game sets the scene number to 3 (scene_sprites, $8E3C on side 2), so the picture only shows when someone changes memory. The C64-Wiki's page on the game shows it on screen and says a cheat in a cracked copy put it there.

Side 1 carries this whole ending too and never uses it: the thirteen shapes of Drax, his star and Mariana at $FC40, the four scenes, the star's motions, and the messages YOUR END HAS COME and THANKS BIG BOY. Only side 2's code reads them.

06 · Another computer's code

Commodore 128 code at the top of side 2's memory

Side 2's last file ends with 32 bytes that do nothing for the game: code for both of the Commodore 128's processors.

At $FFD0 to $FFEF, first 6502 code that writes $3E to $FF00 and $B0 to $D505 and jumps to $1100, then Z80 code that writes the same two registers. On a Commodore 128, $FF00 and $D505 are the memory manager's registers, and $D505 chooses which of its two processors runs. Side 1's copy of the file has the same filler there as in the bytes around it.

From side 2's listing. No instruction of the game reaches these bytes.