Classic Computer Magazine Archive ANTIC VOL. 2, NO. 9 / DECEMBER 1983




Jackpot! is a realistic simulation of a Las Vegas slot machine. Play is not complicated - you simply load the game, insert a joystick into Port 1, and wait for the slot machine to appear on your screen. Next, you will see a dime move from a stack of coins on the right side of the screen up to the machine's coin slot. At this point, or at any time during play, you have four options to choose from:

(1) Press the fire button one, two or three times, and pull down on the joystick; this starts normal play.

Each press of the fire button inserts one dime in to the slot machine. The first dime plays the center row; the second plays the top row; and the third plays the bottom row. For each dime you play, the progressive jackpot (which is displayed at the top of the screen) increases by four cents. Any minor jackpots are indicated at the left of the screen. Also displayed on the left, in whole dollar amounts, are running totals of the money played and won.

(2) Press the joystick forward before putting any dimes into the slot. This shows you exactly how much money has been played, how much has been won, and the percentage of return. Press [START] to return to the game.

(3) Press [SELECT] before inserting any dimes. This option displays a chart that shows the possible winning combinations and their respective payoffs. Press [START] to return to the game.

(4) (Disk users only!) Press [OPTION] before inserting any dimes. This action quits the game and saves the progressive-jackpot amount to a disk file named JACKPOT.DAT. Cassette users can't takeadvantage of this feature, but otherwise the game's cassette version is virtually identical to the disk version. If you are using a cassette, do not include lines 1399 to 1405, 3119 to 3121, or 14999 to 15030.

The primary programming techniques used to write this program include simple string manipulations and the creation of a new character set. POKEs and PEEKs were limited to those areas that have no equivalent in Atari BASIC. This program should list completely on any printer without any "missing" graphics or control characters. I should point out to new programmers, however, that when you're using the text modes (Graphics 1, 2, 17 and 18), statements such as COLOR 32:PLOT 15,4 are equivalent to POSITION 15,4: PRINT #6;CHR$(32).

The odds on this machine can be altered by changing the appropriate characters in the strings defined in lines 1070, 1080 and 1090. The last two characters should always be identical to the first two - this accounts for the wrap-around of the "wheels." Ambitious programmers may want to change the program for Jackpot! so they can also play diagonal combinations, or so the total amounts played and won can also be stored on disk data files.

At any rate, this is the rare slot machine that you can afford to play as long as you like. Keep trying for three diamonds and the Super Jackpot. Good luck!

Bill Marquardt is an electronics technician for the U.S. Postal Service, a former field service representative for Del Mar Avionics, and a graduate of the Control Data Istitute. He programs in both BASIC and Pascal.

10 - 1130 Program initialization.
1147 -1370 Creation of new character set.
1398 -1405 Retrieves value of progressive jackpot from disk if data file exists, or sets it to zero if not.
1597 - 2013 Draws the slot machine. This method is slow,but it eliminates the use of non-printable control characters from the listing.
2997 - 3100 Moves a dime from the stack to the coin slot.
3107 - 3122 Checks to see if the joystick has been pushed forward, or if [SELECT] or [OPTION] has been pressed.
3130 - 3280 Counts the number of times the fire button has been pressed and adjusts the appropriate variables. Any number greater than three will be ignored.
3290 - 3330 Disables the Attract Mode. If no dimes have been played before the joystick is pulled, returns to loop at 3110.
3997 - 4400 Spin's wheels and stops them at random positions.
4997 - 6180 Reads the appropriate combinations and checks for winners. Pays off winners and adjusts all appropriate variables.
6497 - 6600 Subroutine called when SuperJackpot is won. Pays off the progressive jackpot.
6997 - 7090 Subroutine called by [SELECT] button to show the payoff chart.
7997 - 8100 Subroutine called by pushing the joystick forward to check on the progress of the game.
8997 - 9090 Subroutine to fill in trailing zeros on progressive jackpot and payoff displays.
14998 -15O30 Routine called by [OPTlON] button to save the progressive-jackpot amount to a data file.

Listing: JACKPOT.BAS Download