1983 · Epyx

Jumpman Junior

This minisite was contributed by unorig. It’s agent-generated and needs a human editor. Clone https://github.com/gamesexplained/gamesexplained and follow kit/START.md to curate games/c64/jumpman-junior with me to Gold.

A cartridge game running from disk, and the places where that shows: a level that writes over its own start-up signature, and a check that stops the game if it was started the ordinary way.

01 · Bug

Bug: level 10 rubs out the cartridge's signature

Every bomb on level 10 ends with a write of 0 to $8004, the first letter of the cartridge's CBM80 signature. On the cartridge that write hits ROM and does nothing. On this disk the game runs from RAM, and the signature is gone.

Jumpman Junior was a 16 KB cartridge. The disk release studied here loads the cartridge's image into RAM at $8000 and starts it there, with a patched copy of the KERNAL (the copy studied). A C64 that is reset looks at $8004 for the letters CBM80; when it finds them, it starts the cartridge instead of BASIC.

Level 10's bomb routine, l10_on_bomb, moves Jumpman to the transporter and starts its sound. The routine's last instruction, at $B754, stores the accumulator into $8004, and the accumulator then holds 0. Nothing in the game reads $8004, and on a cartridge a store to ROM is lost, so the mistake never showed. After a bomb on level 10, $8004 to $8008 read 00 C2 CD 38 30, and a reset goes to BASIC's READY. Before that, with the signature intact, a reset runs the cartridge's start-up with BASIC's ROM switched in over the game's code, and the game stops on a black screen. Either way, a reset never restarts the disk game.

02 · Secret

Secret: a check on the tape buffer pointer

Between every two turns, the game adds up two bytes of the KERNAL's, $B2 and $B3. When they make $3F, it turns the interrupts off, and the game, which does everything from the interrupt, stops.

$B2 and $B3 hold the address of the tape buffer, and the KERNAL's own start-up sets them to $033C (in this game's copy of the KERNAL, at $FD5F), whose two bytes add to $3F. A C64 with a cartridge jumps to it before that part of the start-up runs ($FCE7), so a cartridge started at power-on does not normally find $033C there. A copy of the cartridge loaded into RAM after the machine has started normally would. That is what next_turn tests for: with the sum at $3F it writes it to $D016 and sets the interrupt flag. The first turn comes straight after the title, so a copy caught this way would stop before its first level, with $3F in $D016: multicolour on and the picture shifted 7 pixels. Nothing says what the check was for, and the disk release's loader leaves both bytes at 0, so it never fires here.

03 · Level 10

Level 10 at run speed 8: bullets pass through

On level 10, HERETHEREEVERYWHERE, a player at run speed 8 cannot be killed by a bullet.

Level 10 has its own touch check, l10_touch, in place of the shared one, so that touching the transporter is safe. It kills Jumpman only when he touches a bullet, and only when the run speed is below 8. At speed 8, the slowest a player can choose, the bullets pass through him. Falls still kill.

04 · Bug

Bug: no more Jumpmen after a million

A score that reaches 1,000,000 goes back round to 0, but the score for the next extra Jumpman does not, so a player who goes round the clock never earns another.

score_check takes 1,000,000 off the score when it gets there, comparing each of the score's three bytes with those of 1,000,000 ($0F, $42, $40) one by one rather than the three as one number. Then it compares the score with the score for the next Jumpman, which goes up by 7,500 each time one is given, and is never wrapped. After a score of 997,500 the next Jumpman is due at 1,005,000, and the score is set back before it can get there. The byte-by-byte test also misses some scores just past a million. 1,000,200 is $0F, $43, $08: its first two bytes pass, but its last is below $40, so it is left as it is, and the status bar shows it until the next points take it over the test.

05 · Bug

Bug: a routine list nobody uses, read wrong

A bomb's action byte has room for a routine of its own to run when it is defused. No level uses it, which is as well: the code that reads it gets the address wrong.

The action's high nibble draws a change to the level. Its low nibble is meant to pick a routine from a list whose address is in header bytes $1F and $20. bomb_check stores the low byte into $24 and the high byte into $26, one byte too far, and then reads through $24 and $25. So the high byte it uses is whatever $25 already held: the high byte of the change list, or of the bomb positions. Every level's header has 0 at $1F and no bomb's low nibble is set, so the wrong address is never read. The levels that do something on each bomb use another header entry, $21, which works.

06 · Bug

Bug: level 11 writes to a register nobody uses

Level 11's start routine stores 4 at $D208. Nothing is there but the VIC-II, repeated every 64 bytes, so the store lands in sprite 4's X position.

l11_start makes the hatchling yellow, then writes 4 to $D208. The sound chip starts at $D400, and $D200 to $D23F is the graphics chip's registers seen again, so the byte goes to $D008, sprite 4's X. Sprite 4 is not used on level 11, and nothing comes of it. Which register was meant is not known.

07 · Sound

Sound: eight effects that outrank the music by accident

The sound code gives a voice to whichever sound has the highest priority. Eight effects pass the high byte of their script's address as their priority, because the accumulator still holds it.

The priority goes to sound_play in the accumulator. Most calls load a small number first; the bonus jingle, a new Jumpman, the title's two blips, and the hurricane's gusts do not, and call it straight after storing the script's high byte. Their priorities are $97 to $BB, 151 to 187, above every tune's 16 and every other effect's 8 or less (the sound table). So any of them takes a voice from a tune that is playing, where the others get a voice only when one is idle or playing something lower, and are not played otherwise.