Classic Computer Magazine Archive START VOL. 5 NO. 3 / NOVEMBER 1990


Spooky Matching Game For Halloween Fun


Sharp graphics and some eerie sounds make this one of the best memory-matching games yet. This one or two-player BASIC program runs on 8-bit Atari computers with 48K RAM and joystick.

Monster Match is yet another computerized card-matching game of the sort known as Concentration or "Husker Du?" (Danish for "Do you remember?"). This time, however, the images you match are all monsters, or other familiar Halloween objects. Each image comes with an appropriate - sometimes funny - sound effect. The snake hisses, the black cat yowls, and ghosts moan as you hunt for their matching cards.

Getting Started

Type in Listing 1, MONSTER.BAS, check it with TYPO II, and SAVE a copy to disk before you RUN it. If you have trouble typing the special characters in lines 8020, 8250, and 9005 through 9190, don't type these lines. Instead, type in Listing 2. When RUN, this program creates these hard-to-type lines and stores them in a file called LINES.LST. To merge the two programs, type NEW, then LOAD "D:QUIZZER.BAS" and then ENTER D: LINES. LST". Be sure to SAVE the completed version of the program.

For a one-player game, you'll need a joystick plugged the first joystick port. Plug another joystick into the second port for a two-player game. When the game begins, press [SELECT] to choose the number of players. You can also turn the sound effects on or off by pressing [OPTION]. These amusing effects add a lot to the game - but it does run faster with the sound off. Press [START] to begin play.

The program shuffles a deck of 36 cards, and lays them face down on the screen. With the joystick, move the pointer to the card you want and press [FIRE] to turn the card over. Then see if you can pick the matching card from the deck. If you do, the matched cards are removed from the board, and you get to pick again. If you fail to make a match in a two-player game, the turn passes to the other player. The goal is to match all the cards in the least number of turns, beating your opponent, if any. In two-player games, if each player winds up holding 18 cards, the winner is the one who overturned the final pair of cards.

Programmer's Notes

The Monster Match program is quite long and complex. Some of the programming techniques used include a single machine language subroutine that moves "chunks" of memory, an ANTIC mode 4 display, five display list interrupts (DLIs), two-player images, and eighteen unique sound subroutines that begin at line 500.

The DLI initialization and data is contained in line 9005 and stored in page 6, beginning at memory location 1536. The first DLI changes two colors, as well as the starting address for the next DLI. The next four DLIs each change the value in the Character Base Register (54281, shadow at 756).

There are nineteen different card faces (including the back of the card) made up of twelve characters each. That's 19 X 12 = 228 characters needed, but there's only 128 characters available in the set. Each row, however, has only nine different cards, plus the back of the card, requiring only 120 characters per row. Taking advantage of the 8-bit Atari's wonderful DLI capability, the character set base register can be reset for each of the four rows, making it possible to represent all nineteen cards on the screen. Things get a little more complicated than that, but at least you now have a vague idea of how involved a simple program like Monster Match can be!

Listing on page 109

Joe Brzuszek of Monroeville, PA, is the author of Landscape Illusion in the December 1986 issue of ANTIC.