Classic Computer Magazine Archive START VOL. 5 NO. 1 / AUGUST 1990



Four Shuffles in One


Gin Rummy? Draw Poker? Acey Deucy? Name your game! Susan Phillips shuffles them all for you in her addictive jumbo pack, CardMaster. You've been warned, now deal the cards!


512K, medium rez
OSS Personal Pascal


CardMaster requires special datafiles from the archive file CARDBOOT.PRG; see the sidebar "Installing CardMaster." Once the datafiles are installed, double-click on the archive file CARDGAME.PRG and choose Extract when the dialog box appears. Select a destination disk and the files will un-ARC directly onto that disk. Make sure that BORK, CHONE, CHTWO, CHZERO, HLJC, MEFI, SQKY, WILO and YOFI are in the same folder as CARDMAST.PRG. To start the program, double-click on CARDMAST.PRG.

All commands in CardMaster are mouse-controlled, using the left button. To get to the Main Menu, click anywhere on the title screen or simply move the mouse. Six decks of cards appear. The two labeled Info and Quit are self-explanatory. Click on any of the other four to start a card game.


Pitch is a two-player game, you versus the computer.

The first dealer is chosen at random. You each get six cards. To play, you and your opponent each lay down one card at a time following suit whenever possible. To lay down a card, simply click on it. Each pair of cards constitutes a "trick." A trump is a card of the suit of the first card played. A trump always wins the trick. Otherwise, the trick is won by the higher ranking card in the suit that was led. The winner of the trick leads on the next play. The last card in the hand is played automatically. When all the cards have been played, points are added to or subtracted from your score based on your initial bid.

Draw Poker
Acey Deucy

There are three bids. The non-dealing player bids first. Pass is a bid of zero and passes the bid to the other player. The numeric bids of 2, 3 or 4 refer to how many categories you think your cards can win. (For instance, if you think you can get HIGH and GAME, bid 2.) SHOOT THE MOON is a bid to win all tricks as well as all categories.

If the first player passes, the second player must bid at least 2 or SHOOT THE MOON. To bid, click on your selection. Only legal bids for each situation will appear on the screen. The highest bidder plays first.

Scoring occurs at the end of each hand according to the number of tricks won and the number of categories captured. You receive one point each for holding the HIGH (highest trump) card, the LOW (lowest trump) card, the JACK (in the trump suit) and for GAME. If there is a tie, nobody wins the GAME category.

Gin Rummy

At the end of each hand, points are added to each player's score, unless you were the high bidder and do not match your bid. Then the point value of your bid is deducted from your score regardless of how many categories you won. If you bid to SHOOT THE MOON and don't, you lose automatically.

You may limit the game score to 7,11,15, 21 or 50. The default is 11. To change it, just click on the TRUMP box (or hold the mouse button down) until the desired amount appears in the lower right box. The player who reaches the game score first, wins.

Click on the appropriate box to start a new game, clear wins or exit to the Main Menu.

Gin Rummy

Gin Rummy is another two-player game, you and the computer. Each player is dealt 10 cards. The remainder of the pack goes face down to form the stock pile. The top stock card is exposed next to the stock, serving as the first card of the discard pile.

To go gin, your entire hand must be grouped into sets of at least three cards forming three- or four-of-a-kind or runs of the same suit. If the deck runs out (which rarely happens), the hand is a draw.

To play, click on the top card of either the stock or discard pile, try to create sets with your hand and discard deadwood.

When the computer plays, the card it chooses will appear temporarily in the upper right corner of the screen, either exposed (from the discard pile) or face down (from the stock pile).

To choose a card, click on either the stock pile or the discard pile. The card will appear to the left of the screen. To discard it, click on the discard pile. To keep it, first click between any two cards or at either end of your hand. An arrow will verify that you want it placed at that location. Then click on the card in your hand that you want to discard.

Before you click on the CONTINUE box (and end your turn), you can click on ORDER. When either you or the computer goes gin or knocks, your hand is checked according to its order.

To automatically organize your hand, click on the ORDER box. The sets are placed on the far left, potential sets next and the least desirable deadwood on the right. You can also organize your hand manually. Click on the card to be moved (an arrow will verify your selection). Then click between any two cards or at either end of your hand. To exit the order mode, click on the ORDER box.

You now have the choice to GO GIN or KNOCK. To knock you must hold less than 10 points worth of deadwood (or unmatched cards that fit into none of your sets). Knocking forces the opposing player to reveal cards. If you knock, and any of your opponent's deadwood cards can contribute to any of the your sets, then those deadwood cards are not counted against your opponent. This is called "laying off." When a hand is knocked, arrows will point to the cards that are laid off.

Going gin is worth 25 points plus the opponent's deadwood count. Knocking is worth the opponent's deadwood count (not including cards that were laid off), minus the knocker's deadwood count. However, if the opponent holds a deadwood count equal to or lower than that of the knocker (known as "underknocking the knocker"), then the knocker gets nothing and the opponent gets 25 points plus the difference of points between the two hands.

Each picture card is worth 10 points, an ace is worth one, and all others are worth their numeric value.

At the end of each game, the winner gets the difference between the two scores plus 100 bonus points. Each player gets 20 points for every hand won in the game. If one player wins all hands, the game is a shut-out, and the winner gets an extra 100 bonus points.

Draw Poker

Draw poker is a game with five players: you and four computer opponents. Each player begins with $50. The dealer antes (bets) $5 and deals each player five cards. To play, simply click on the box of your choice. Only legal options will be displayed.

Betting begins at the dealer's left. You can either OPEN (bet $5) or FOLD (drop out of the betting). Subsequent players can CALL (match the previous bet), RAISE (match the previous bet and raise it an additional $5) or FOLD. When all players have contributed equally to the pot, the round of betting ends and the DRAW begins.

You can discard and DRAW up to three new cards. Click on the cards you want to discard. If you exchange less than three, click on your info box to continue.

The second round of betting begins with the player who opened (or the next clockwise player, if the opener has folded). That player can CHECK (pass, staying in without betting anything further) or BET (bet $5). If someone bets, each player in turn may CALL, RAISE or FOLD until all bets have been equaled, or only one player, automatically the winner, remains.

If two or more players are left, a showdown occurs. In the showdown, all hands are exposed and the holder of the best hand wins the pot.

The hands are ranked, highest to lowest:

Royal Flush: five cards of equal suit in sequential rank, with the ace as the high card.

Straight Flush: five cards of equal suit in sequential rank.

Four-of-a-Kind: four cards of equal rank.

Full House: three cards of equal rank and two of another.

Flush: five cards of the same suit.

Straight: five cards in sequential rank.

Three-of-a-Kind: three cards of equal rank.

Two Pairs: two cards of one rank and two of another.

One Pair: two cards of equal rank.

When more than one player has the same rating, the rank of their cards, ace high, is compared.

In the rare event that the hands are still equal, those players tie and split the pot.

Acey Deucy

Acey Deucy is a five-player game that allows up to five human players. It is a game of chance, much like roulette. You get two cards, both face up, and you bet on the probability of the next card falling in rank between the two in your hand. There are set characters in Acey Deucy; choose who you want to play by clicking on their info boxes. Up to five human players can play. Click again on the info boxes to change a human player into a computer one. Click on DONE when you've made your selections.

The first dealer is chosen at random. The ante and minimum bet is $1. The maximum bet is either the size of the pot or the money the player has left, whichever is less. If the first card (on the left) is an ace, it is low. If the second card dealt (on the right) is an ace, it is high.

If the two cards in the hand are of equal or sequential rank, then a bet is impossible to win and $1 is automatically bet and lost.

The same dealer then deals to the next player and each player clockwise in turn takes a turn until someone wins the pot. When the pot is won, all players ante again. The deal then passes to the player on the dealer's left, who shuffles the deck and deals to the player on his left. Reshuffling also occurs whenever the deck runs out.

When it's your turn, you will see a betting dialog box. The initial default is your maximum bet. You can choose MIN to change to the minimum bet, MID to go to half of the maximum bet, MAX to return to the maximum bet, or click on one of the arrows to raise or lower your bet $1 at a time.

The game ends either when all human players go broke, or when only one active player remains.

Susan Phillips is a flight information coordinator and support representative for American Airlines. This is her first program for START.


CardMaster Boot Files
Game datafiles
Use with CardMaster

CardMaster uses Atari's GDOS fonts to produce its superb visuals. In order for CardMaster to use GDOS, certain files must be present when you boot your computer. These files are in CARDBOOT.PRG. From your START disk backup, double-click on CARDBOOT.PRG and choose Extract when the dialog box appears. Select a destination disk and the files will un-ARC directly onto that disk.

Configure the root directory of your designated boot disk as follows:

ASSIGN.SYS \AUTO folder \FONTS folder

If you have a single-sided drive system, create another disk for the CardMaster game files, found in CARDGAME.PRG. The entire CardMaster program, including GDOS, fits onto a double-sided disk. Put CardMaster anywhere you wish on a hard drive. If you're using a Mega, keep the blitter on.

GDOS fonts are loaded at boot time, so ASSIGN.SYS and the FONT and AUTO folders must be in the root directory of the boot disk in order for CardMaster to run properly. If you never see the CardMaster title screen when attempting to run the game, it's most likely that GDOS was not loaded. If CardMaster runs, but the words on the screen are misaligned, misshapen or littered with extra characters, it's most likely that the proper fonts weren't loaded. Check that the files on your boot disk are configured as directed, then reboot.

(Editor's Note: GDOS is the property of Atari Corp. GDOS and its fonts are distributed on your START disk for use with CardMaster only. They cannot be reproduced or in any way distributed without the prior consent of Atari.)


If you've read the article on CardMaster, you know that you're supposed to place GDOS.PRG into the AUTO folder of your boot disk. Why? Because CardMaster uses GDOS to load the fonts it needs. GDOS is, technically, a part of GEM, even though you have to load it from disk. GDOS installs itself when you boot your machine, then it is responsible for graphics calls to any other device besides the screen, such as printer or plotter. Also, if you're tired of seeing the same old system font, GDOS is responsible for loading any other fonts you might want to use.

To explain how GDOS works, the first thing we need to do is to look at the file ASSIGN.SYS. This is an ASCII file, so if you double-click on it and choose Show, you'll see on your screen:

    path = \font
    01p screen.sys
    02p screen.sys
    03p screen.sys
    04p screen.sys

ASSIGN.SYS is simply a file that tells GDOS what fonts to load, where to find these fonts and what screen resolution (or device) these fonts are for.

Look at the first line, path = \font. This tells GDOS that the fonts you want to load are in the FONT folder of the current drive. You could, if you want, use a text editor (or word processor that saves files in ASCII) and change the path name to path = c:\font. This tells GDOS to look only on drive C in the folder FONT for the font files.

The next line, after the semicolon (which is used for remarks), is 01p screen.sys. This refers to the built-in default screen driver. 02p screen.sys refers to the low-resolution screen, 04p screen.sys to the high-resolution screen and 03p screen.sys is the medium-resolution screen. It is the latter resolution for which the fonts that come with CardMaster are intended, so it is after this line that the font filenames are listed.

Decoding Filenames

If you want different fonts loaded depending on the screen resolution, list their filenames after the appropriate screen.sys line. Now, looking at a font filename, such as ATSS10CG.FNT, you may wonder if it is some kind of code, and if so, exactly what it means. It is a code, one that can tell you if the font will work with your system or with your printer. The first two letters, AT, refer to the creator or distributor of the font, ATari. The next two letters indicate the font style, SS, meaning Sans Serif, also known as Swiss. Then we have the point size of the font, 10. Finally we have the device for which this font is intended, CG, meaning Color Graphic.

We have eight fonts listed here, but, if you look closely, you'll notice that the first four are SS fonts and the second four are TR fonts, which means Times Roman (also known as Dutch). This means that we actually have only two different font styles, each with four different point sizes. When we finally get around to loading these into the computer, GDOS will tell us that we have three fonts available: the built-in system font and the Swiss and Dutch fonts we have loaded from disk.

It is important to note that GDOS reads ASSIGN.SYS only when you boot your machine. If you want to change the fonts to load, the location of the fonts, or the screen resolution under which the fonts will load you must make the appropriate changes to ASSIGN.SYS and then reboot your computer so that GDOS will recognize your changes.

Viewing Fonts

Enough about ASSIGN.SYS. Time to break out your favorite programming language (I'll uses GFA BASIC version 3.0) and figure out some code to view the fonts.

First of all, for reasons detailed above, we need to boot up with a disk containing GDOS.PRG in the AUTO folder, and with a copy of the FONT folder from CardMaster, which contains the eight fonts we want to load. Make sure that ASSIGN.SYS is also on the root directory of this disk, not inside a folder. As your computer boots, you should see a message telling you that GDOS is installed. If not, you may have to get rid of some desk accessories to free up memory for GDOS to load. Now that we're all booted up and ready to go, in the box is some GFA BASIC 3.0 code that will load your fonts and show you what they look like.

If you run this program in low or high resolution, you won't see anything because the ASSIGN.SYS file specifies that the fonts will load in medium resolution only. So switch to medium, or edit ASSIGN.SYS so that the eight fonts appear after the 02p screen.sys (low resolution) or after 04p screen.sys (high resolution). Remember, though, that these fonts were created for the medium resolution screen, so they may look distorted in other resolutions.

Now for the details. In the first line, GDOS? is a reserved variable in GFA BASIC 3.0 that returns -1 (TRUE) if GDOS is active or 0 (FALSE) otherwise. If GDOS is not available, we'll stop the program.

Now, when BASIC runs, it claims a large chunk of memory for itself. We need to use the RESERVE command to reduce BASIC's memory so that GDOS will have room to store the fonts. The number 39936 is the sum of the lengths of the font files in our FONT folder.

Now we get to the command that actually loads the fonts, VST_LOAD FONTS. We give it the required parameter of zero, and it gives us the number of additional fonts in the variable num_fonts&. Now we'll set up a FOR NEXT loop to look at these fonts. Note that the VST_LOAD_FONTS function returns the number of additional fonts available. It does not include the system font. Therefore, if num_fonts& holds a two, we know that we actually have three fonts in memory; the two we loaded and the system font. So we will loop from one to num_fonts& + 1 and look at all three of these fonts.

The command VQT_NAME provides us with two pieces of information about a certain font, the ID number of the font and its name. We use the variable i& to give VQT_NAME the number of the font we want to check on; one is the system font, two is the first font we loaded, three is the second and so on. Each font is given an ID number by its creator, and each font with the same typeface should have the same ID number. VQT_NAME will give us this number in the variable font_id&, and the name of the font in font$.

We use DEFTEXT to set the point size of our text to 12, and the actual typeface using its ID number in font_id&. Finally, we print it to the screen with TEXT.

After closing the loop, we tidy up our memory with ~VST_UNLOAD_FONTS (which does the obvious) and RESERVE.

And that's it. For more information about GDOS, I recommend you read "Everything You Wanted To Know About GDOS" by Douglas N. Wheeler. It's a text file that you should be able to find on the major online services, local bulletins boards or at your users group. And while you're at it, check for public-domain GDOS fonts to take a look at and use.

Montanan Jim Burton wrote about GDOS printer drivers in the January 1990 issue of START.

'   Loading GDOS Fonts
'   GFA BASIC 3.0 code
IF NOT GDOS?                                   ! Check if GDOS is installed 
     ALERT 1,"GDOS or G+PLUS|not available.",1,"Abort",dummy& 
RESERVE FRE(0)-39936                           ! Give some of BASIC's memory 
'                                              ! So fonts can be loaded. 
num_fonts&=VST_LOAD_FONTS(0)                   ! Load fonts in ASSIGN.SYS
FOR i&=1 TO num_fonts&+1                       ! Loop through available fonts. 
     font_id&=VQT_NAME(i&,font$)               ! Get the font ID number and name.
     DEFTEXT ,,,12,font_id& 
     TEXT 0,80,"This is "+font$+", ID # "+STR$(font_id&) 
     ~INP(2)                                   ! Wait for keypress.
NEXT i& 
~VST_UNLOAD_FONTS(0)                           ! Free up memory used by fonts, 
RESERVE                                        ! Give it back to BASIC.