The game

The title screen

The title screen, built by 0x4CE9 and placed by 0x4D10. It is not a capture: it is drawn from the ROM, and checked against openMSX's VRAM at 768 of 768 tiles.

LEE YOUNG works his way through eight sceneries, one rival each, up to the emperor Yie-Gah. Between fights come the wave screens, where the enemies arrive in a row.

The eight rivals

Their names are eight scripts hanging off the pointer table at 0x4487, indexed by the scenery of the round; the one you play is at 0x447B.

roundrivalbackdrop
1YEN-PEI0
2LAN-FANG0
3PO-CHIN1
4WEN-HU1
5WEI-CHIN2
6MEI-LING2
7HAN-CHEN3
8LI-JEN3

Eight sceneries share four backdrops, two by two: 0x4FB4 does an srl a on the scenery and keeps the result in (0xE2E0), and that is what indexes every band and scenery table. The floor does not follow that rule — it is indexed by the whole scenery at 0x5A93 — so two rounds that share a backdrop still stand on different ground.

Scenery 1

Round 1, against YEN-PEI.

Scenery 7

Round 7, against HAN-CHEN: the night one.

The rivals are tiles, not sprites

The fighter you control is made of sprites. The rival is not: it is written straight into the name table, pinta_la_figura (0x66D8) unpacking a figure into 0xE480 and sending it up row by row, clipping whatever falls off the sides.

Each rival has a block of 22 pointers at 0x6922, indexed by scenery. Eleven of them are drawings and eleven are two-byte redirections: the odd frame is the even one facing the other way, and the same bit that follows the pointer (bit 0,a at 0x677C) negates x at 0x686A.

YEN-PEI

YEN-PEI's eleven figures, each with its own height, width and compressed tiles.

LI-JEN

LI-JEN, the emperor Yie-Gah.

LEE YOUNG

The ten poses

The ten poses, each assembled from its [y][x][pattern] triples and the scripts that upload its patterns.

One frame is four hit boxes plus up to eight triples, hanging off the twenty pointers at 0x6C83. Facing one way the eight sprites use patterns 0 to 7, which 0x6BE6 has just uploaded to 0x1800 following the frame's own scripts; facing the other, the triples carry pattern numbers landing in the mirrored bank that espeja_sprites (0x490C) left behind. One drawing, two directions.

The wave screens

A wave screen is four bytes. The strip at 0x5BE8 for the backdrop carries eight nibbles; each one picks a figure out of the thirty at 0x5C64, and the eight are painted in a row four columns apart, the first of each pair from the high nibble. Each figure is a vertical slice of landscape four tiles wide, and its tiles are the fight screen's own bands: the twelve screens below are built from the ROM and match the emulator's VRAM byte for byte in patterns and colours. Three screens per backdrop, one per wave; sceneries 7-8 slide their landscape eight columns to the right on each one, the others reorder their slices.

Sceneries 1-2, first wave Sceneries 1-2, second wave Sceneries 1-2, third wave

Sceneries 1-2: slices 5 4 4 4 5 4 6 7, then 5 5 5 4 4 5 5 6, then 4 5 4 5 4 5 4 5.

Sceneries 3-4, first wave Sceneries 3-4, second wave Sceneries 3-4, third wave

Sceneries 3-4: the second wave is the whole landscape in order, 0 to 7; the other two shuffle its four pairs of slices.

Sceneries 5-6, first wave Sceneries 5-6, second wave Sceneries 5-6, third wave

Sceneries 5-6: six slices in a loop, read from a different point each time.

Sceneries 7-8, first wave Sceneries 7-8, second wave Sceneries 7-8, third wave

Sceneries 7-8: 2 3 5 4 5 6 7 7, then 2 1 2 3 5 4 5 6, then 0 1 2 1 2 3 5 4 — the same slices read two further back each wave, so the hills move eight columns to the right.

The scoreboard, and the energy bar

Row 3 is a whole script of its own (0x6006) with the KO bar in the middle, and the two names underneath. The digits are written in BCD by 0x4785, which splits each byte into two nibbles and adds 0x10 to land on the font's digits; the ld c,0xFF at 0x4796 is what eats the leading zeros.

0x572A is not a pause caption: it says PERFECT 5000, and it is only painted when the round ends with the bar full — 0x5328 compares it against 0x24.

Two players

With two players the second pad drives the rival. The five bits of (0xE052) go straight into the table of 32 at 0x7DA2, exactly the way the player's own go into 0x6990 at the other end. With one player, 0x7E7E makes them up.

The lives trick

0x43B8 keeps the first ten key presses since power-on and compares them against 0x43ED:

01 04 04 02 02 02 08 08 08 08

With the PSG bit layout that is up once, left twice, down three times and right four. If it matches, (0xE055) goes from 3 lives to 0x95.

And the demonstration is a recorded game

When nobody presses anything the cartridge plays itself. It is not an AI: it is 33 recorded key presses at 0x57E4, ending in the 0xFF that 0x57DA looks for, with their durations in the strip at 0x5806. That is why two power-ons give the same demo — and why the pictures on this site can be checked against the emulator at all.