Weird Balls (Astro II)

Developer(s): Eric Boisvert
Date: 1988
Type: Program
Platform(s): TS 2068
Tags: Game

Shoot everything that moves! Don’t let them pass you by or you’ll lose points. Weird Balls (Astro II) is an arcade shoot-em-up in machine code, and like the other games in this issue it uses the Byte Power “3-way joystick system”: the TS2068 left joystick port or a Kempston interface (or the keys Q, A, O, P, SPACE to fire and 0 to pause), a ZX Interface II, or a cursor joystick.

Weird Balls was written by Eric Boisvert and published on the February 1988 tape (Issue 9) of Byte Power. The subtitle names it as a follow-up to Astro from the September 1986 issue. Its loading name is WEIRDBALLS.

Program Analysis

Tape Layout

  • WEIRDBALLS: BASIC loader, 508 bytes, auto-runs at line 0
  • SCREEN: 2,606 bytes of code at 50000, run first with USR 50000
  • SCREEN: 10,863 bytes of code at 50162, the game, started with USR 50162

The Loader

The BASIC part is a protected loader. Every number you see in it (99999, 999, 9) is a decoy: the real values are held in the hidden five-byte number forms that follow each one. The length bytes of line 0 are set to 65535, so the listing stops at line 0, and line 0 first POKEs them back to their true value (addresses 26712–26713, just after the start of the TS2068 program area) and jumps to line 10. Line 90, RANDOMIZE USR (PEEK 23635+256*PEEK 23636+61), runs machine code stored inside the REM of line 0.

Line 10 sets colours and CLEAR 27999, and POKEs 0 into DF SZ (23659), which removes the lower screen so that BREAK or an error report cannot return cleanly to BASIC. Line 20 loads the first SCREEN block and runs it at 50000; line 30 loads the second block over it at 50162, resets the character set pointer (POKE 23607,60) and starts the game. No readable text survives in the code blocks, which appear to be encrypted or compressed, so the machine code is not described here.

Line 9999 is the publisher’s save line: it calls a routine at 65280, sets the length of line 0 back to 65535 and saves "WEIRDBALLS" LINE 0.

Notable Techniques

  • Decoy line numbers and values in the loader: the visible digits differ from the stored binary values, so the listing cannot be read at face value
  • Line 0 has a false length of 65535, so LIST shows only that line; the program repairs it when it runs
  • POKE 23659,0 removes the lower screen as copy protection
  • The game block loads on top of the first-stage block once that has run
  • Both code blocks carry the name SCREEN, though the second is the game; the loader uses LOAD "" CODE, so names do not matter

Appears On

Tape-based magazine. The February 1988 issue (Issue 9) of Byte Power, the TS2068 tape magazine of Eric and Kristian Boisvert.

Related Products

Related Articles

Shoot everything that moves!!! Don’t let them pass you by or you’ll lose points. Features the famous 3-WAY JOYSTICK SYSTEM!

Image Gallery

Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.