Amiga GnuChess Version 1.0
Amiga-related portions Copyright (c) 1992 Martin W. Scott.
All other code Copyright (c) 1986-92 Free Software Foundation.
This program is governed by the terms and conditions of the GNU Public
License. A copy should have come with this distribution. In that license,
it is made clear that this program comes with absolutely no warranty.
Okay, that's the legal/copyright guff over. This is a port of GNU Chess to
the Amiga. It contains a nice graphical user interface (menus, use mouse
to move pieces etc.) along the same lines as that done for another chess
program on Fish disk 205. The advantages of this program over that one are
that GNU Chess is a much stronger chess-playing program, and that the GUI
of this program was designed with Workbench 2.0(+) in mind. Another
advantage is that the older chess program crashes on my system (chais pas
pourquoi) but Amiga GnuChess doesn't. From now on, I shall refer to Amiga
GnuChess simply as AGC.
Firstly, AGC needs a few files in order to work. These should be located in
the misc/ directory of where the program was started. You will need at
least 1 megabytes of memory to run AGC.
You may start AGC from the Workbench or CLI. A stack of 20000 should be
more than sufficient for AGC. When started, a screen will be opened, and
after a short delay, you will be presented with a menu from which to choose
a playing level. Which level you choose depends on how fast your machine is
and how good you are.
Playing a move
Once the level is selected, the chessboard will be drawn on the screen. AGC
will then read in the openings library if available, and prompt you to
move. You may type the move in explicit algebraic notation (e.g. e2e4) or
abbreviated notation (e.g. e4, Nf3, cd), or if you are smart, use the mouse.
When typing in moves in abbreviated notation, piece-letters must be entered
in upper-case. This is to stop ambiguities like b5b4 == B5b4: the former
says move the piece on b5 to b4, whilst the latter says move the bishop on
row 5 to b4.
I have opted for a drag-approach when using the mouse; click down on the
left-button over the piece you want to move, and move the mouse to the
destination square, whilst holding the left-button. Then release the
left-button. If the move is valid, it will be played, otherwise an error
message will appear to the right of the board. To abort playing a move,
either play an illegal move, or release the left-button over the piece you
You can use the mouse for all valid moves except pawn promotion; due to the
way the Amiga driver was implemented (see below) you have to type in such
moves using explicit algebraic notation, specifying what to promote to,
e.g. b7b8q to get a queen. I may change things to allow use of the mouse,
but don't hold your breath.
Once you have made your move, AGC will think a little, then respond.
A brief overview:
New game: Starts a new game. resets clocks and some options.
Load game: Loads a previously saved game. If you have
reqtools.library installed on your system, a file
requester will pop up.
Save game: Saves the current position for subsequent loading.
Take a peek at a saved game-file to see what stuff
is output. Note that no changes have been made to
the format for the Amiga version of GNU Chess.
Create listing: Outputs a listing file. Not really useful unless
debugging options have been compiled in to AGC.
Edit board: See below.
Help: Brings up a help screen. Press a key to get back to
About: Brings up a requester telling you a few things
Quit: Exit AGC.
Select Level: Brings up the playing-level menu you saw when you
Change colors: Brings up a palette requester, only if you have
Save colors: Save your color preferences to GNUCHESSDIR (or the
Reverse board: Changes orientation of chessboard.
Coordinates: Draw coordinates around chessboard.
Show thinking: Shows best line found, plus number of positions
(nodes) looked at, and a nodes/second count.
Random play: Slightly randomise the moves AGC plays.
Beep after move: Produce an audible beep after AGC has played its
Go: Tells computer to play a move.
Undo half-move: Take back last move.
Undo whole-move: Take back last move, and one before that.
Switch sides: Switch sides with computer.
Input both sides: Lets you play both sides until you 'switch'.
Redraw board: If screen becomes garbled (can't think why) select
Hint: Ask for a move suggestion. Of varying quality
NOTE: Drag-selection of menu items is not supported; this is because of the
nature of the interface between GNU Chess and the Amiga driver. Sorry.
There are a few other things you can do (see the help page) but the menus
cover most things. Consult other (standard GNU distribution) documents for
Editing the board
Sorry, but you can't use the mouse for this. A little menu appears at the
side of the board. It's use is almost self explanatory. To put a piece on
the board, type it's letter and the square coordinates, e.g. pd6 puts a
pawn on the d6 square (its color depends on what the menu shows).
I've used SAS/C 5.10a to compile AGC. While this is a fairly reliable and
robust compiler, it does have problems with large UNIX applications.
Version 6 may or may not overcome the difficulties outlined below, but I
don't have it yet.
The main philosophy of the Amiga stuff added was that the generic GNU Chess
code remain unaltered, so the Amiga routines were added to be seamless to
the program. This has the advantage that future versions of GNU Chess may
hopefully be adapted easily to the Amiga driver.
Firstly, transposition tables are out. When compiled in, the search routine
would sometimes score a line as about 20000 (abs(score) should be < 10000),
thus making it think it has found a really great move. Mostly it wont be.
This is surely not a bug with GNU Chess, but with the compiler -- such a
whopper would never have got out...
Secondly, Easy mode is permanently on, since SAS/C doesn't have the full
complement of signals and because it would be difficult to implement with
the Amiga driver. (Easy mode off means that the computer thinks while you
If you are going to compile AGC yourself, don't use optimisation, since it
produces incorrect code (in this program anyway). I have also compiled with
no stack checking (I'm told its buggy) to speed things up a bit, so stack
size should be set large enough (20K seems sufficient).
On the subject of stack sizes, LC1 needs a biggish stack (about 30000
bytes) to compile dspcom.c.
I've made very few changes to the basic GNU Chess code, and those I have
made are governed by #ifdefs mostly. The original makefile has taken a bit
of a hammering, though. The amidsp.c is based on nuxdsp.c (fancy curses)
of the standard distribution. I have not included that or any other files
that are unnecessary to generate the Amiga version of GNU Chess. Other
support stuff (for e.g. postscript printing of games) are available from
the F.S.F. (and various ftp sites around the world).
All Amiga-specific routines are in a subdirectory (amiga/) in the src/
directory. The graphics were made in dpaint and converted using iff2c from
an old fish disk.
I decided to use reqtools.library (of which Nico François holds copyright)
rather than asl.library. This is because reqtools is better, and I needed
it for the palette requester anyway. AGC runs without it, but I imagine
that most aware users have it installed.
All credits mentioned here relate only to the Amiga portions of the source.
See the standard distribution files for full credits.
Firstly thanks to Steve Koren for SKsh, and Mike Meyer et. al. for Mg3. I
was sorry to hear that Mike Meyer has dropped Amiga support for this
program. If your reading this Mike, how about releasing whatever beta it
was you had got upto before making this decision.
Thanks must also go to Nico François for reqtools.library, the authors
of iff2c, Gauthier Groult and Jean Michel Forgeas, and to Jaba Development
for GadToolsBox, the program used to generate the screen menus.
Of course, all the people who collaborated to make GNU Chess what it is
today deserve most credit.
Distribution + Contact
AGC is freely-redistributable, but I am a poor student and so not averse to
voluntary contributions :).
Anyway, I would like to hear from you if you like AGC, and especially if
you find a bug. Also, if you make any changes to AGC, I'd appreciate being
kept informed if you distribute it. There should be no commercial gain for
distribution of this version or others that you may make. Disk libraries
and P.D. companies that charge only a nominal amount to cover costs are
welcome to carry AGC on their lists. Magazines should request permission
from the F.S.F. if they intend carrying AGC on a cover-disk - I'm not sure
what the legalities are.
You can contact me by postal mail at:
Martin W. Scott,
23, Drum Brae North,
Edinburgh, EH4 8AT
or by email: mwscastle.ed.ac.uk
Note that I'll be making a transition to a new account in early October
'92, so if any mail bounces, please try again a couple of weeks later.
If it still bounces, then I've been allocated a different name, so try
Thank you for reading and enjoy!