1987 · Firebird

I, Ball

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

What the code does that the manual does not say: a timer that slows down when the screen is busy, a missile that pays for aliens that are not there, title keys that are not the ones in the documentation, and the remains of earlier versions of the game left in memory.

01 · The timer

Bug: the more aliens on the screen, the slower the timer runs

The timer at the top of the screen starts each level at 50, and Iball loses a life when it reaches 0. But timer_tick takes a second off every 50 passes of the game's logic, and the logic does not run every frame. Its interrupt, irq_logic, skips a frame whenever the last pass has not finished, and a pass takes longer the more there is on the screen. So the busier the level, the slower the timer.

With only Iball on the screen the logic runs every frame and the timer keeps time. With seven aliens about, the emulator counted 695 passes in 1,350 frames, so the level's 50 seconds last about 97 real ones: a busy level gives the player nearly twice the time the timer shows. The How it works page has the interrupts and the measurement.

02 · The Smart Missile

Bug: the Smart Missile pays 10 points for every alien that is not there

Pressing SPACE with the Smart Missile fires it once: every alien explodes and scores 10 points. smart_missile goes through sprites 1 to 7 and sets each one exploding, skipping the discs and those already exploding. It never tests whether the sprite is in use, so an empty slot explodes too, out of sight, and scores the same 10 points.

Seen in the emulator: fired on a screen with no alien on it, the missile gave 70 points, and the disc countdown, which counts aliens killed, went from 20 to 13. Seven kills that never happened bring the next disc nearer too.

03 · The title screen

Secret: the title's speech keys are X, Z and SPACE, not I, O and G

C64-Wiki says that on the title screen I, O and G say the three samples, "IBALL!", "OH NO!" and "GAME OVER!". In this image, I starts a game and O and G do nothing. title_irq tests the same key groups that steer and fire in play: the right keys (X and its group) say "IBALL!", the left keys (Z and its group) say "OH NO!", and the Smart Missile's keys (SPACE and its group) say "GAME OVER!". Pushing the joystick forward or back while on the title screen raises or lowers their pitch.

Seen in the emulator, each key pressed on the title screen in turn. The How it works page has every key and what it does, and the samples at any pitch.

04 · The keyboard

Secret: five other keys pause the game as well as RUN/STOP

The game tests a key by driving several rows of the keyboard at once and reading one column, so every key in that column on those rows answers. The pause test drives every row but one and reads the column of RUN/STOP, so V, N, comma, / and left SHIFT pause the game too. The movement keys come in groups the same way: O is the up key, and so are E, T, U, @, the up-arrow and Q.

Seen in the emulator: RUN/STOP and V each paused the game and resumed it.

05 · Speech

Secret: the game stands still while a word is said

The speech plays from a timer interrupt that writes a new volume to the sound chip thousands of times a second. While it plays, irq_panel_end sees sample_busy set and does not hand on to the next interrupt of the frame, so none of the game's logic runs until the word is over. On the title screen, pressing a speech key holds the screen for the length of the word.

06 · Losing a life

Secret: a death can take an extra back

The discs give their extras in a fixed order of 32 places. When Iball dies, disc_rollback sends the sequence back to a checkpoint (places 2, 3, 5, 9, 14, 19 and 27) and, if the sequence had already passed that place, clears the extra given there, so the next disc gives it again. A player who has collected the Twin Laser Set and a few more extras keeps those given before the checkpoint and loses the one given on it. The How it works page has the whole sequence to step through.

07 · In the code

Bug: four slips in the code, traced but not seen in play

These are in the listing. Each was followed through the code; none shows itself on the screen in a way a player would notice.

08 · Leftovers

Secret: earlier versions of the game are still in memory

The image holds code the game never runs. There are older versions of the two panel routines at $41E5-$426A and an older dot scroller at $4CEE; six fragments of code that nothing reaches; a stale copy of $4246-$42FF at $C246; and the remains of a loader at $8CD0-$8DFF, with the text "SEARCHING LOADING BLOCK? REWIND TO" elsewhere in memory and "LOADING 12" near the top.

Beside the speech player sits a small test program, sample_test at $C209. It flashes the border and background while a sample plays and says a sample when one of its keys is pressed: what a programmer would use to try the speech out on its own. Nothing in the game calls it. The Source code tab has all of these, each marked.