(back to project list)

Disassembly of Penny Arcade for the Apple II

Bill Budge is famous for Raster Blaster and Pinball Construction Set, but that wasn't where he started. His first published game was Penny Arcade, a fancy version of Pong, which he traded to Apple Computer for a Centronics printer.

The program is mix of Applesoft BASIC and assembly language. The two were merged into a single program that was distributed on cassette tape in 1979.

Penny Arcade is copyright by Apple Computer, Inc.


How to Play

instr play

The game is for two players, each of whom has a game paddle (a controller with a rotary dial and a button). The game paddle controls the position of the paddle on screen. The goal is to keep a bouncing ball from going off-screen or into the hockey net behind your paddle. If it does, your opponent scores one point. The first player to 5 points wins.

Intercepting the ball with the paddle will bounce it toward the other player. The ball's vertical velocity is affected by which part of the paddle is struck, e.g. a ball moving horizontally that strikes the top part of the paddle will gain upward velocity.

One improvement that Penny Arcade offers over Pong is the presence of obstacles in the game field. You can choose from 4 different arrangements. You can also add gravity to the game. This will apply a small downward acceleration.

The game allows you to select a difficulty from 1 to 10. On higher difficulties, the frequency of paddle position updates is reduced.

If the ball gets stuck, you can hit Escape to clear it, though the player whose side the ball is not on will be awarded a point.

How Stuff Works

The game begins with an animated title sequence, where the words "PENNY ARCADE" are broken into pixels and bounced around the screen. This works exactly as it appears, with 128 pixels moving independently. The movement is set up so that, after a certain number of frames, all of the pixels are back where they started, at which point the animation ends.

The animation has a minor bug, because it walks through the list performing draw/erase. If pixel #1 moves to the current position of pixel #2, then when pixel #2 is erased and redrawn, it will clear pixel #1. This causes a few pixels to be missing when the animation stops. (This could have been avoided by using XOR operations.)

The game field is drawn from a list of lines. This is not used for collision testing. Instead, the screen pixels are tested when the ball's position is being updated. If it encounters a set pixel, the ball bounces. If the collision happens in a certain horizontal range, it's assumed to have collided with a paddle, and additional steps are taken to apply the Y velocity change.

BASIC Embedding

The program was distributed on cassette as an Applesoft BASIC program, but it has assembly-language routines embedded in it. Various locations are POKEd and CALLed directly from Applesoft. Some of the POKE targets are instruction operands. This is a difficult way to work, since any change that moves things in the assembly code will require matching changes in Applesoft.

The first thing the BASIC program does is adjust its own end-of-program pointers to exclude the assembly subroutines. Presumably these were adjusted back by hand when the program was saved.

The code looks like it was developed without the benefit of an assembler, which was not uncommon in the late 1970s.


Copyright 2025 by Andy McFadden