Hyper Sports 2

The three aiming and strength events of Hyper Sports in a 16 KB cartridge: skeet shooting, archery and weight lifting, with the whole game running inside the per-frame interrupt.

Konami · © Konami 1984 · An RC-717 16 KB cartridge · MSX1 · page 1 · Dump f4273f52…

There is not one illustration or capture here. The screens are drawn from the bytes of the ROM, by running in Python the same run-length decompressor, the same list painter and the same title script the Z80 runs. The listing and the numbers come from the binary and are reproducible with make.

The cartridge in numbers

100%of the binary explained
308routines named
3events
6,956bytes of code
9,428bytes of data
0bytes unidentified

What turned up when we took it apart

The octopus has to be shot with the upper barrel

The launcher at 0x5757 only knows how to set poses 1, 2 and 3: the 100, 500 and 1000 clays. Poses 4 and 5 are set by nobody except two routines tucked away at the end of the cartridge, 0x761A and 0x762F, which build the slot by hand from nine bytes written in ROM. The first one releases the octopus; the second, the bird.

0x4F59 calls them when a round ends with the three slots empty, counting in 0xE19A: the octopus the first time, the bird the second. But 0x762F starts by checking 0xE179, and that byte is only set by 0x5AC1 when the clay just broken was pose 4 —the octopus— and 0xE178 says the shot came from the upper barrel. Hitting the octopus is not enough: it has to be hit with the upper barrel, the one at 0xE0C4. The octopus pays 0x30 in BCD (3000 points) and the bird 0x10 (1000).

And there is a way to lose both: 0xE199. Every time 0x58EF retires a clay while 0xE179 is clear, 0x591D sets it, and with it set 0x4F59 calls neither of them —nor does the difficulty go up—.

Three arrows in the bullseye bring out the apple and the penguin

0xE145 starts at 3 (0x4C32). 0x65D1 takes one off it, but only when the arrow landed in ring 9, which is not the outer ring but the bullseye: it is the one paying 600 in the table at 0x5D37, where the outer ring is 0 and pays 10.

On the third bullseye 0xE145 reaches zero, and then 0x5C22 does not build the usual ending: it copies the six sprite entries at 0x5E59, which are the apple and the penguin. Hitting it leaves pattern 0x7C —the 3000 sign— and 0x0030 in BCD at 0xE11D: another 3000 points.

The flowers are tiles, and they come on the fifth press

The third secret is not a sprite. Once the judges pass the lift (0x6F98) and the player keeps pressing the button, 0x523E raises 0xE132 by one per frame. When it reaches 5, 0x5065 fills twelve cells of row 16 with tile 0x91 and twelve of row 17 with 0x92, and the flower bed appears over the podium. 0x524B also pays 2000 points in BCD.

Three judges' lights decide the lift

With the bar up, 0x6F78 turns one light on every 0x20 frames in column 2, under the JUDGE sign; on the third it sets 0xE071 and 0xE1A3 to one and the lift is good. That 0xE1A3 then decides the figure's colour, which bytes get copied to VRAM and which digit is painted: one byte ruling in five different places.

The bow scores with Pythagoras and no square root

0x5CCF squares the two distances to the centre of the target (0xBC, 0x53) with eight adds and shifts, adds them up, and compares that square against the table at 0x5D03, which holds the radii of the nine rings already squared: 1, 6, 16, 25, 64, 96, 144, 196 and 289. The last one does not fit in a byte, which is why the loop supplies its top 1 by hand with an xor a / djnz / inc a.

The clays are not random: they are written bit by bit

The launcher reads which way each clay goes from the table at 0x583E one bit at a time, and its height from the one at 0x5866 two bits at a time, each with its own counter. There is no seed and no clock anywhere: the cartridge always throws the same.

One octave of twelve notes, and the rest by doubling

The player keeps twelve periods at 0x7832 —from 0x6A to 0x38— and gets the other octaves by doubling the period at 0x7815, which is exactly what dropping an octave means. With the PSG clock, 0x6A gives 1,055 Hz and 0x38 gives 1,998: C and B of the same octave.

Eight weight classes, with their kilos

At 0x7587 there are eight names of fourteen tiles each —FLY, BANTAM, FEATHER, LIGHT and MIDDLE WEIGHT, MIDDLE HEAVY, HEAVY WEIGHT and SUPER HEAVY— and at 0x6F48 their eight weights in BCD: 150, 165, 180, 195, 210, 225, 240 and 260 kilos. The bow's angle, in the other event, goes up 0.28 degrees at a time and wraps round at 4.00.

It does not carry Konami's hidden mark

Many of the house's cartridges hide their catalogue number and the title in katakana at the end of the ROM; Manuel Pazos (@ManuelPazosMSX) found it. Here it is absent: the last 25 bytes are 0xFF filler, with no 0xAA to close the mark. RC-717 comes from the catalogue, not the binary.

What the cartridge draws

Under the picture is where it comes from and what is on it.

The title screen, built the way the cartridge builds it: the logo tiles come from the stream at 0x4AB5, the drawing from the script at 0x4A2F and the stream at 0x4862, and the labels from the lists at 0x480C and 0x47C1. The three event names are three rows of sixteen consecutive tiles from 0x4791
The title screen, built the way the cartridge builds it: the logo tiles come from the stream at 0x4AB5, the drawing from the script at 0x4A2F and the stream at 0x4862, and the labels from the lists at 0x480C and 0x47C1. The three event names are three rows of sixteen consecutive tiles from 0x4791
Skeet shooting. The background is the stream at 0x6C52 decompressed into the name table from row 8; the tiles and their colours are the first two pointers of its record at 0x6C3A; and the scoreboard on top is the stream at 0x4749 with the label list at 0x4712 over it
Skeet shooting. The background is the stream at 0x6C52 decompressed into the name table from row 8; the tiles and their colours are the first two pointers of its record at 0x6C3A; and the scoreboard on top is the stream at 0x4749 with the label list at 0x4712 over it
Archery, with its three readouts: <code>ANGLE</code> on row 10, <code>WIND</code> at the bottom and <code>SCORE</code> beside it. The target is centred on X 0xBC and Y 0x53, which are exactly the two constants 0x5CCF measures every arrow against
Archery, with its three readouts: ANGLE on row 10, WIND at the bottom and SCORE beside it. The target is centred on X 0xBC and Y 0x53, which are exactly the two constants 0x5CCF measures every arrow against
Weight lifting. On the left, under <code>JUDGE</code>, the column of three lights that 0x6F78 turns on; at the bottom the <code>POWER</code> bar that 0x6E24 paints on row 23; in the middle the <code>CHOOSE CLASS</code> sign where 0x756D writes the class; and on the right the one with the kilos
Weight lifting. On the left, under JUDGE, the column of three lights that 0x6F78 turns on; at the bottom the POWER bar that 0x6E24 paints on row 23; in the middle the CHOOSE CLASS sign where 0x756D writes the class; and on the right the one with the kilos
The weight lifting sprites, decompressed into the sprite pattern table just as the cartridge leaves them. The first two are <b>the two plates of the barbell</b>: they are the ones 0x6FCE drops from Y 0x4A when the lift is over
The weight lifting sprites, decompressed into the sprite pattern table just as the cartridge leaves them. The first two are the two plates of the barbell: they are the ones 0x6FCE drops from Y 0x4A when the lift is over
The two creatures of the skeet event, <b>in colour</b>. Left to right: the ordinary clay, the octopus, the bird and its second pattern —the two 0x50FC alternates every four frames to flap its wings— and the bird's second slot. An MSX1 sprite pattern carries no colour: each one's colour comes from the pairs table at 0x511D, which 0x5108 indexes by the slot's pose
The two creatures of the skeet event, in colour. Left to right: the ordinary clay, the octopus, the bird and its second pattern —the two 0x50FC alternates every four frames to flap its wings— and the bird's second slot. An MSX1 sprite pattern carries no colour: each one's colour comes from the pairs table at 0x511D, which 0x5108 indexes by the slot's pose
The apple and the penguin, built from the six sprite entries at 0x5E59. The penguin <b>is three sprites stacked on the same cell</b>, each with its own colour: pattern 0x68 in blue, 0x6C in white and 0x70 in yellow. That is how you paint a three-coloured figure on a machine where each sprite is one colour only. On the right, the other step —0x5E35 alternates the body and the feet— and the three layers apart
The apple and the penguin, built from the six sprite entries at 0x5E59. The penguin is three sprites stacked on the same cell, each with its own colour: pattern 0x68 in blue, 0x6C in white and 0x70 in yellow. That is how you paint a three-coloured figure on a machine where each sprite is one colour only. On the right, the other step —0x5E35 alternates the body and the feet— and the three layers apart
The weight lifting flowers, which are not sprites but tiles: the twelve 0x91 of row 16 and the twelve 0x92 of row 17 that 0x5065 fills in when 0xE132 reaches 5
The weight lifting flowers, which are not sprites but tiles: the twelve 0x91 of row 16 and the twelve 0x92 of row 17 that 0x5065 fills in when 0xE132 reaches 5
The archer at 0x4C3D and the shotgun at 0x4BF3, assembled from the layers and colours of their own sprite entries. The archer is <b>three tiers of two sprites</b>, one red and one blue at each height
The archer at 0x4C3D and the shotgun at 0x4BF3, assembled from the layers and colours of their own sprite entries. The archer is three tiers of two sprites, one red and one blue at each height
The archery ones: the limbs of the bow, the arrow and the pieces the archer is built from. They come from the stream at 0x6318, the third pointer of its record at 0x6C3A
The archery ones: the limbs of the bow, the arrow and the pieces the archer is built from. They come from the stream at 0x6318, the third pointer of its record at 0x6C3A