Athletic Land (1984)

A 16 KB cartridge from 1984, taken apart byte by byte. The whole game runs inside the interrupt, the world is sixty-four bytes of table, the vine is nine drawings, and the credits are in there, written in ordinary tiles.

Konami · 1984 · An RC-700 16 KB cartridge · MSX1 · page 1 · Dump 7bd280ae…

There is not one screenshot here. Every picture is drawn by repeating what the cartridge does: video memory is rebuilt with its own copies and then the calls that paint each thing are replayed. They are the pieces the routines draw, not screens of anyone playing. Everything else —the listing and the numbers— comes from the binary and is reproducible with make.

The game in numbers

100%of the binary explained
32screens in the table
99stages to the end
7,448bytes of code
8,936bytes of data
0bytes unidentified

What turned up when we took it apart

The whole game runs inside the interrupt

INIT writes jp 0x4038 into the H.KEYI hook and drops into a two-byte jr $ at 0x40A7. That empty loop is the main program: from then on everything —the sound, the controls and one step of the game— happens inside the interrupt, one step per frame.

And because the game is the interrupt, it needs a lock: 0xE005. If a step takes longer than a frame, the next interrupt plays the music and leaves without running anything else, so the game slows down but the music never breaks.

The table sits behind the call

To jump to a computed address, 0x40A9 does pop hl and uses the return address: the table of words is packed right behind the call itself. It never returns. Five tables work that way, from the state of the game to what the player is doing.

The routine that draws the scenery, 0x5F65, does the same with arguments: the six bytes following its call are two pointers and a video address, and the push hl hands control back just after them. It is called nineteen times, four of them to write colours rather than tiles.

The world is sixty-four bytes

There is no map. The screen is a counter, 0xE054, stepped up or down by one —and on passing 255 it drops to 56—, and what is in it comes out of two thirty-two byte tables: one for the fixed obstacles and one for the moving ones, indexed by that counter modulo 32.

On top of that the stage edits the pair: stage 1 loses the spiders and the bee, stage 3 the bee, and every screen whose number ends in 0, 4 or 8 comes out empty. The ones ending in 0 are the finishing lines, and they carry the CHILD PARK sign.

What kills you is not the height you fall to, but the one you fell from

There is no fall damage anywhere. There is one byte, 0xE13A, written when you press the jump button: the height you jumped from, plus sixteen. From the ground, that is the ground.

But jump from one of the middle water-jet planks and it keeps that plank's height with nothing added, and from then on landing sixteen or seventeen points below it kills you, wherever you are on the screen. The very same landing is harmless or fatal depending on where the jump started.

The jump is a table read forwards and then backwards

There is no vertical speed in the cartridge. A jump is a list of deltas between a 0xFE and a 0xFF, walked one way subtracting —going up, less and less— and the other way adding. The 0xFF turns it round and the 0xFE ends it.

The normal jump is sixteen bytes: 4 4 3 3 3 3 2 2 2 2 1 1 1 1 0 0. Thirty-two pixels of rise, sixteen frames up and sixteen down, and the fall is the rise read the other way because it is the same bytes.

The credits are inside the cartridge, in tiles

At 0x447E, the tile codes being the ASCII of the letters: ALL STAGE CLEAR, PROGRAM A.H Y.I, SOUND Y.O, CG R.S C.K. No full names: initials.

They are painted in one place only, 0x445B, when the stage counter wraps from 99 back to 00. Apart from that, nothing in the cartridge is signed except the KONAMI 1984 on the title screen and at the foot of the scoreboard.

What the cartridge draws

Each of these pictures is a routine of the cartridge replayed outside it: the tiles are loaded the way the ROM loads them and then whatever paints them is called, with its own pointers and its own video addresses. Under each caption is the address of the routine that draws it.

0x5E8D — the top band: a canopy of leaves with a trunk on each side. Each half comes in two shapes, and bits 1-2 of SCENE pick the pair through the table at 0x5E85
0x5E8D — the top band: a canopy of leaves with a trunk on each side. Each half comes in two shapes, and bits 1-2 of SCENE pick the pair through the table at 0x5E85
0x5E97 — the other pair, the two level halves. The same two calls with different lists: none of this is stored as a screen
0x5E97 — the other pair, the two level halves. The same two calls with different lists: none of this is stored as a screen
0x5CC2 — one of the four skies: six rows of bands over a line of hills. Bits 2-3 of SCENE choose which, through 0x5C7F
0x5CC2 — one of the four skies: six rows of bands over a line of hills. Bits 2-3 of SCENE choose which, through 0x5C7F
0x5CE0 — another of the four: the same list of counts with a different tile list. The sky scenery is used when there are no vines, trampolines or spiders
0x5CE0 — another of the four: the same list of counts with a different tile list. The sky scenery is used when there are no vines, trampolines or spiders
0x5C91 — the hedge of rows 10 to 12 and the grass, drawn only if the screen has no water jets and no posts
0x5C91 — the hedge of rows 10 to 12 and the grass, drawn only if the screen has no water jets and no posts
0x5CF4 — the pond, bit 7 of the fixed obstacles: rows 16 to 18, columns 9 to 22. Step into it and you drown
0x5CF4 — the pond, bit 7 of the fixed obstacles: rows 16 to 18, columns 9 to 22. Step into it and you drown
0x5E58 — the CHILD PARK sign, on every screen whose number ends in 0: the entrance and each stage's finishing line, and always empty
0x5E58 — the CHILD PARK sign, on every screen whose number ends in 0: the entrance and each stage's finishing line, and always empty
0x555B — the nine drawings of the vine, side by side. There is no animation: nine drawings read forwards and then backwards
0x555B — the nine drawings of the vine, side by side. There is no animation: nine drawings read forwards and then backwards