added some comments and formated code
[xboard.git] / xboard.texi
1 \input texinfo  @c -*-texinfo-*-
2 @c %**start of header
3 @setfilename xboard.info
4 @settitle XBoard
5 @c %**end of header
6
7 @include version.texi
8
9 @ifinfo
10 @format
11 INFO-DIR-SECTION Games
12 START-INFO-DIR-ENTRY
13 * xboard: (xboard).         An X Window System graphical chessboard.
14 END-INFO-DIR-ENTRY
15 @end format
16 @end ifinfo
17
18 @titlepage
19 @title XBoard
20
21 @page
22 @vskip 0pt plus 1filll
23 @include copyright.texi
24
25 @end titlepage
26 @ifset man
27 .TH xboard 6 "$Date: " "GNU"
28 .SH NAME
29 .PP
30 xboard @- X graphical user interface for chess
31 .SH SYNOPSIS
32 .PP
33 .B xboard [options]
34 .br
35 .B xboard -ics -icshost hostname [options]
36 .br
37 .B xboard -ncp [options]
38 .br
39 .B |pxboard
40 .br
41 .B cmail [options]
42 @end ifset
43
44 @node Top
45 @top Introduction
46 @cindex introduction
47
48 @ifset man
49 .SH DESCRIPTION
50 @end ifset
51
52 XBoard is a graphical chessboard that can serve as a
53 user interface to chess engines (such as GNU Chess), the
54 Internet Chess Servers,
55 electronic mail correspondence chess, or your own collection of saved games.
56
57 This manual documents version @value{VERSION} of XBoard.
58
59 @menu
60 * Major modes::     The main things XBoard can do.
61 * Menus::           Menus, buttons, and keys.
62 * Options::         Command options supported by XBoard.
63 * Chess Servers::   Using XBoard with an Internet Chess Server (ICS).
64 * Firewalls::       Connecting to a chess server through a firewall.
65 * Environment::     Environment variables.
66 * Limitations::     Known limitations and/or bugs.
67 * Problems::        How and where to report any problems you run into.
68 * Contributors::    People who have helped developing XBoard.
69 * CMail::           Using XBoard for electronic correspondence chess.
70 * Other programs::  Other programs you can use with XBoard.
71 @ifnottex
72 * Copyright::       Copyright notice for this manual.
73 @end ifnottex
74 * Copying::         The GNU General Public License.
75
76 * Index::           Index of concepts and symbol names.
77 @end menu
78
79 @node Major modes
80 @chapter Major modes
81 @cindex Major modes
82
83 XBoard always runs in one of four major modes.  You select the
84 major mode from the command line when you start up XBoard.
85
86 @table @asis
87 @item xboard [options]
88 As an interface to GNU Chess or another chess engine running on your
89 machine, XBoard lets you play a game against the machine,
90 set up arbitrary positions, force variations, watch a game between two
91 chess engines, interactively analyze your stored games or set up and
92 analyze arbitrary positions.  (Note: Not all chess engines support
93 analysis.)
94 @item xboard -ics -icshost hostname [options]
95 As Internet Chess Server (ICS) interface, XBoard
96 lets you play against other ICS users, observe games
97 they are playing, or review games that have recently finished.  Most
98 of the ICS "wild" chess variants are supported, including bughouse.
99 @item xboard -ncp [options]
100 XBoard can also be used simply
101 as an electronic chessboard to play through games. It will read and
102 write game files and allow you to play through variations
103 manually. You can use it to browse games off the net or review games
104 you have saved.  These features are also available in the other modes.
105 @item |pxboard
106 If you want to pipe games into XBoard, use the supplied shell
107 script @file{pxboard}.  For example, from the news reader @file{xrn},
108 find a message with one or more games in it, click the Save button,
109 and type @samp{|pxboard} as the file name.
110 @item cmail [options]
111 As an interface to electronic mail correspondence chess, XBoard
112 works with the cmail program. See @ref{CMail} below for
113 instructions.
114 @end table
115
116 @node Menus
117 @chapter Menus, buttons, and keys
118 @cindex Menus
119
120 To move a piece, you can drag it with the left mouse button, or you
121 can click the left mouse button once on the piece, then once more on
122 the destination square.  To drop a new piece on a square (when
123 applicable), press the middle or the right mouse button over the
124 square and select from the pop-up menu.  In cases where you can drop
125 either a white or black piece, use the middle button (or shift+right)
126 for white and the right button (or shift+middle) for black.  When you
127 are playing a bughouse game on an Internet Chess Server, a list of the
128 off-board pieces that each player has available is shown in the window
129 title after the player's name; in addition, the piece menus show the
130 number of pieces available of each type. From version 4.3.14 on, it is
131 also possible in crazyhouse, bughouse or shogi to dag and drop pieces
132 to the board from the holdings squares displayed next to the board.
133
134 All other XBoard commands are available from the menu bar. The most
135 frequently used commands also have shortcut keys or on-screen buttons.
136
137 When XBoard is iconized, its graphical icon is a white knight if
138 it is White's turn to move, a black knight if it is Black's turn.  See
139 Iconize in @ref{Keys} below if you have problems getting this
140 feature to work.
141
142 @menu
143 * File Menu::       Accessing external games and positions.
144 * Mode Menu::       Selecting XBoard's mode.
145 * Action Menu::     Talking to the chess engine or ICS opponents.
146 * Step Menu::       Controlling the game.
147 * Options Menu::    User preferences.
148 * Help Menu::       Getting help.
149 * Keys::            Other shortcut keys.
150 @end menu
151
152 @node File Menu
153 @section File Menu
154 @cindex File Menu
155 @cindex Menu, File
156 @table @asis
157 @item New Game
158 @cindex New Game, Menu Item
159 Resets XBoard and the chess engine to the beginning of a new chess
160 game. The @kbd{r} key is a keyboard equivalent. In Internet Chess
161 Server mode, clears the current state of XBoard, then
162 resynchronizes with the ICS by sending a refresh command. If you want to
163 stop playing, observing, or examining an ICS game, use an
164 appropriate command from the Action menu, not @samp{New Game}.
165 @xref{Action Menu}.
166 @item New Shuffle Game
167 @cindex New Shuffle Game, Menu Item
168 Similar to @samp{New Game}, but allows you to specify a particular initial position 
169 (according to a standardized numbering system)
170 in chess variants which use randomized opening positions (e.g. Chess960).
171 The selected opening position will persistently be chosen on any following
172 New Game command until you use this menu to select another. Selecting
173 position number -1 will produce a newly randomized position on any new game.
174 Using this menu item in variants that normally do not shuffle their opening position
175 does cause these variants to become shuffle variants until you use the
176 @samp{New Shuffle Game} menu to explicitly switch the randomization off,
177 or select a new variant.
178 @item New Variant
179 @cindex New variant, Menu Item
180 Allows you to select a new chess variant in non-ICS mode. 
181 (In ICS play, the ICS is responsible for deciding which variant will be played,
182 and XBoard adapts automatically.) If you play with an engine, the engine must
183 be able to play the selected variant, or the command will be ignored.
184 XBoard supports all major variants, such as xiangqi, shogi, chess, chess960,
185 Capablanca Chess, shatranj, crazyhouse, bughouse.
186 (But not every board size has built-in bitmaps for un-orthodox pieces!)
187 @item Load Game
188 @cindex Load Game, Menu Item
189 Plays a game from a record file. The @kbd{g} key is a keyboard equivalent.
190 A pop-up dialog prompts you for the file name. If the file contains more
191 than one game, a second pop-up dialog
192 displays a list of games (with information drawn from their PGN tags, if
193 any), and you can select the one you want. Alternatively, you can load the
194 Nth game in the file directly, by typing the number @kbd{N} after the
195 file name, separated by a space.
196
197 The game file parser will accept PGN (portable game notation),
198 or in fact almost any file that contains moves in algebraic
199 notation. 
200 Notation of the form @samp{P@@f7}
201 is accepted for piece-drops in bughouse games;
202 this is a nonstandard extension to PGN.
203 If the file includes a PGN position (FEN tag), or an old-style
204 XBoard position diagram bracketed by @samp{[--} and @samp{--]}
205 before the first move, the game starts from that position. Text
206 enclosed in parentheses, square brackets, or curly braces is assumed to
207 be commentary and is displayed in a pop-up window. Any other
208 text in the file is ignored. PGN variations (enclosed in
209 parentheses) are treated as comments; XBoard is not able to walk
210 variation trees.
211 The nonstandard PGN tag [Variant "varname"] functions similarly to
212 the -variant command-line option (see below), allowing games in certain chess
213 variants to be loaded.  There is also a heuristic to 
214 recognize chess variants from the Event tag, by looking for the strings
215 that the Internet Chess Servers put there when saving variant ("wild") games.
216 @item Load Next Game
217 @cindex Load Next Game, Menu Item
218 Loads the next game from the last game record file you loaded.
219 The shifted @kbd{N} key is a keyboard equivalent.
220 @item Load Previous Game
221 @cindex Load Previous Game, Menu Item
222 Loads the previous game from the last game record file you
223 loaded.  The shifted @kbd{P} key is a keyboard equivalent.
224 Not available if the last game was loaded from a pipe.
225 @item Reload Same Game
226 @cindex Reload Same Game, Menu Item
227 Reloads the last game you loaded.
228 Not available if the last game was loaded from a pipe.
229 @item Save Game
230 @cindex Save Game, Menu Item
231 Appends a record of the current game to a file.
232 A pop-up dialog
233 prompts you for the file name. If the game did not begin with
234 the standard starting position, the game file includes the
235 starting position used. Games are saved in the PGN (portable
236 game notation) format, unless the oldSaveStyle option is true,
237 in which case they are saved in an older format that is specific
238 to XBoard. Both formats are human-readable, and both can be
239 read back by the @samp{Load Game} command.
240 Notation of the form @samp{P@@f7}
241 is accepted for piece-drops in bughouse games;
242 this is a nonstandard extension to PGN.
243 @item Copy Game
244 @cindex Copy Game, Menu Item
245 Copies a record of the current game to an internal clipboard in PGN
246 format and sets the X selection to the game text.  The game can be
247 pasted to another application (such as a text editor or another copy
248 of XBoard) using that application's paste command.  In many X
249 applications, such as xterm and emacs, the middle mouse button can be
250 used for pasting; in XBoard, you must use the Paste Game command.
251 @item Paste Game
252 @cindex Paste Game, Menu Item
253 Interprets the current X selection as a game record and loads it, as
254 with Load Game.
255 @item Load Position
256 @cindex Load Position, Menu Item
257 Sets up a position from a position file.  A pop-up dialog prompts
258 you for the file name. If the file contains more than one saved
259 position, and you want to load the Nth one, type the number N
260 after the file name, separated by a space. Position files must
261 be in FEN (Forsythe-Edwards notation), or in the format that the
262 Save Position command writes when oldSaveStyle is turned on.
263 @item Load Next Position
264 @cindex Load Next Position, Menu Item
265 Loads the next position from the last position file you loaded.
266 @item Load Previous Position
267 @cindex Load Previous Position, Menu Item
268 Loads the previous position from the last position file you
269 loaded.  Not available if the last position was loaded from a pipe.
270 @item Reload Same Position
271 @cindex Reload Same Position, Menu Item
272 Reloads the last position you loaded.
273 Not available if the last position was loaded from a pipe.
274 @item Save Position
275 @cindex Save Game, Menu Item
276 Appends a diagram of the current position to a file.
277 A pop-up dialog
278 prompts you for the file name. Positions are saved in
279 FEN (Forsythe-Edwards notation) format unless the @code{oldSaveStyle}
280 option is true, in which case they are saved in an older,
281 human-readable format that is specific to XBoard. Both formats
282 can be read back by the @samp{Load Position} command.
283 @item Copy Position
284 @cindex Copy Position, Menu Item
285 Copies the current position to an internal clipboard in FEN format and
286 sets the X selection to the position text.  The position can be pasted
287 to another application (such as a text editor or another copy of
288 XBoard) using that application's paste command.  In many X
289 applications, such as xterm and emacs, the middle mouse button can be
290 used for pasting; in XBoard, you must use the Paste Position command.
291 @item Paste Position
292 @cindex Paste Position, Menu Item
293 Interprets the current X selection as a FEN position and loads it, as
294 with Load Position.
295 @item Mail Move
296 @itemx Reload CMail Message
297 @cindex Mail Move, Menu Item
298 @cindex Reload CMail Message, Menu Item
299 See @ref{CMail}.
300 @item Exit
301 @cindex Exit, Menu Item
302 Exits from XBoard. The shifted @kbd{Q} key is a keyboard equivalent.
303 @end table
304
305 @node Mode Menu
306 @section Mode Menu
307 @cindex Menu, Mode
308 @cindex Mode Menu
309 @table @asis
310 @item Machine White
311 @cindex Machine White, Menu Item
312 Tells the chess engine to play White.
313 @item Machine Black
314 @cindex Machine Black, Menu Item
315 Tells the chess engine to play Black.
316 @item Two Machines
317 @cindex Two Machines, Menu Item
318 Plays a game between two chess engines.
319 @item Analysis Mode
320 @cindex Analysis Mode, Menu Item
321 XBoard tells the chess engine to start analyzing the current game/position
322 and shows you the analysis as you move pieces around.
323 Note: Some chess engines do not support Analysis mode.
324
325 To set up a position to analyze, you do the following:
326
327 1. Select Edit Position from the Mode Menu
328
329 2. Set up the position.  Use the middle and right buttons to
330 bring up the white and black piece menus.
331
332 3. When you are finished, click on either the Black or White
333 clock to tell XBoard which side moves first.
334
335 4. Select Analysis Mode from the Mode Menu to start the analysis.
336
337 The analysis function can also be used when observing games on an ICS
338 with an engine loaded (zippy mode); the engine then will analyse
339 the positions as they occur in the observed game.
340 @item Analyze File
341 @cindex Analyze File, Menu Item
342 This option lets you load a game from a file (PGN, XBoard format, etc.)
343 and analyze it. When you select this menu item, a pop-up window appears
344 and asks for a file name to load.
345 If the file contains multiple games, another pop up appears that lets
346 you select which game you wish to analyze.
347 After a game is loaded, use the XBoard arrow buttons to step
348 forwards/backwards through the game and watch the analysis.
349 Note: Some chess engines do not support Analysis mode.
350 @item ICS Client
351 @cindex ICS Client, Menu Item
352 This is the normal mode when XBoard
353 is connected to a chess server.  If you have moved into
354 Edit Game or Edit Position mode, you can select this option to get out.
355
356 To use xboard in ICS mode, run it in the foreground with the -ics
357 option, and use the terminal you started it from to type commands and
358 receive text responses from the chess server.  See
359 @ref{Chess Servers} below for more information.
360
361 XBoard activates some special position/game editing features when you
362 use the @kbd{examine} or @kbd{bsetup} commands on ICS and you have
363 @samp{ICS Client} selected on the Mode menu.  First, you can issue the
364 ICS position-editing commands with the mouse.  Move pieces by dragging
365 with mouse button 1.  To drop a new piece on a square, press mouse
366 button 2 or 3 over the square.  This brings up a menu of white pieces
367 (button 2) or black pieces (button 3).  Additional menu choices let
368 you empty the square or clear the board.  Click on the White or Black
369 clock to set the side to play.  You cannot set the side to play or
370 drag pieces to arbitrary squares while examining on ICC, but you can
371 do so in @kbd{bsetup} mode on FICS.  In addition, the menu commands
372 @samp{Forward}, @samp{Backward}, @samp{Pause}, and @samp{Stop Examining}
373 have special functions in this mode; see below.
374 @item Edit Game
375 @cindex Edit Game, Menu Item
376 Allows you to make moves for both Black and White, and to change
377 moves after backing up with the @samp{Backward} command. The clocks do
378 not run.
379
380 In chess engine mode, the chess engine continues to check moves for legality
381 but does not participate in the game. You can bring the chess engine
382 into the game by selecting @samp{Machine White}, @samp{Machine Black},
383 or @samp{Two Machines}.
384
385 In ICS mode, the moves are not sent to the ICS: @samp{Edit Game} takes
386 XBoard out of ICS Client mode and lets you edit games locally.
387 If you want to edit games on ICS in a way that other ICS users
388 can see, use the ICS @kbd{examine} command or start an ICS match
389 against yourself.
390 @item Edit Position
391 @cindex Edit Position, Menu Item
392 Lets you set up an arbitrary board position.
393 Use mouse button 1 to drag pieces to new squares, or to delete a piece
394 by dragging it off the board or dragging an empty square on top of it.
395 To drop a new piece on a square, press mouse button 2 or 3 over the
396 square. This brings up a menu of white pieces (button 2) or
397 black pieces (button 3). Additional menu choices let you empty the
398 square or clear the board. You can set the side to play next by
399 clicking on the word White or Black at the top of the screen.
400 Selecting @samp{Edit Position} causes XBoard to discard
401 all remembered moves in the current game.
402
403 In ICS mode, changes made to the position by @samp{Edit Position} are
404 not sent to the ICS: @samp{Edit Position} takes XBoard out of
405 @samp{ICS Client} mode and lets you edit positions locally. If you want to
406 edit positions on ICS in a way that other ICS users can see, use
407 the ICS @kbd{examine} command, or start an ICS match against yourself.
408 (See also the ICS Client topic above.)
409 @item Training
410 @cindex Training, Menu Item
411 Training mode lets you interactively guess the moves of a game for one
412 of the players. You guess the next move of the game by playing the
413 move on the board. If the move played matches the next move of the
414 game, the move is accepted and the opponent's response is auto-played.
415 If the move played is incorrect, an error message is displayed.  You
416 can select this mode only while loading a game (that is, after
417 selecting @samp{Load Game} from the File menu).  While XBoard is in 
418 @samp{Training} mode, the navigation buttons are disabled.
419 @item Show Game List
420 @cindex Show Game List, Menu Item
421 Shows or hides the list of games generated by the last @samp{Load Game}
422 command.
423 @item Show Move History
424 @cindex Show Move History, Menu Item
425 Shows or hides a list of moves of the current game.
426 This list allows you to move the display to any earlier position in the game
427 by clicking on the corresponding move.
428 @item Show Engine Output
429 @cindex Show Engine Output, Menu Item
430 Shows or hides a window in which the thinking output of any loaded engines
431 is displayed.
432 @item Edit Tags
433 @cindex Edit Tags, Menu Item
434 Lets you edit the PGN (portable game notation)
435 tags for the current game. After editing, the tags must still conform to
436 the PGN tag syntax:
437
438 @example
439 <tag-section> ::= <tag-pair> <tag-section>
440                         <empty>
441 <tag-pair> ::= [ <tag-name> <tag-value> ]
442 <tag-name> ::= <identifier>
443 <tag-value> ::= <string>
444 @end example
445 @noindent
446 See the PGN Standard for full details. Here is an example:
447
448 @example
449 [Event "Portoroz Interzonal"]
450 [Site "Portoroz, Yugoslavia"]
451 [Date "1958.08.16"]
452 [Round "8"]
453 [White "Robert J. Fischer"]
454 [Black "Bent Larsen"]
455 [Result "1-0"]
456 @end example
457 @noindent
458 Any characters that do not match this syntax are silently ignored. Note that
459 the PGN standard requires all games to have at least the seven tags shown
460 above. Any that you omit will be filled in by XBoard
461 with @samp{?} (unknown value), or @samp{-} (inapplicable value).
462 @item Edit Comment
463 @cindex Edit Comment, Menu Item
464 Adds or modifies a comment on the current position. Comments are
465 saved by @samp{Save Game} and are displayed by @samp{Load Game},
466 @samp{Forward}, and @samp{Backward}.
467 @item ICS Input Box
468 @cindex ICS Input Box, Menu Item
469 If this option is set in ICS mode,
470 XBoard
471 creates an extra window that you can use for typing in ICS commands.
472 The input box is especially useful if you want to type in something long or do
473 some editing on your input, because output from ICS doesn't get mixed
474 in with your typing as it would in the main terminal window.
475 @item Pause
476 @cindex Pause, Menu Item
477 Pauses updates to the board, and if you are playing against a chess engine,
478 also pauses your clock. To continue, select @samp{Pause} again, and the
479 display will automatically update to the latest position.
480 The @samp{P} button and keyboard @kbd{p} key are equivalents.
481
482 If you select Pause when you are playing against a chess engine and
483 it is not your move, the chess engine's clock
484 will continue to run and it will eventually make a move, at which point
485 both clocks will stop. Since board updates are paused, however,
486 you will not see the move until you exit from Pause mode (or select Forward).
487 This behavior is meant to simulate adjournment with a sealed move.
488
489 If you select Pause while you are observing or examining a game on a
490 chess server, you can step backward and forward in the current history
491 of the examined game without affecting the other observers and
492 examiners, and without having your display jump forward to the latest
493 position each time a move is made. Select Pause again to reconnect
494 yourself to the current state of the game on ICS.
495
496 If you select @samp{Pause} while you are loading a game, the game stops
497 loading. You can load more moves manually by selecting @samp{Forward}, or
498 resume automatic loading by selecting @samp{Pause} again.
499 @end table
500
501 @node Action Menu
502 @section Action Menu
503 @cindex Menu, Action
504 @cindex Action, Menu
505 @table @asis
506 @item Accept
507 @cindex Accept, Menu Item
508 Accepts a pending match offer. If there is more than one offer
509 pending, you will have to type in a more specific command
510 instead of using this menu choice.
511 @item Decline
512 @cindex Decline, Menu Item
513 Declines a pending offer (match, draw, adjourn, etc.). If there
514 is more than one offer pending, you will have to type in a more
515 specific command instead of using this menu choice.
516 @item Call Flag
517 @cindex Call Flag, Menu Item
518 Calls your opponent's flag, claiming a win on time, or claiming
519 a draw if you are both out of time. You can also call your
520 opponent's flag by clicking on his clock or by pressing the
521 keyboard @kbd{t} key.
522 @item Draw
523 @cindex Draw, Menu Item
524 Offers a draw to your opponent, accepts a pending draw offer
525 from your opponent, or claims a draw by repetition or the 50-move
526 rule, as appropriate. The @kbd{d} key is a keyboard equivalent.
527 @item Adjourn
528 @cindex Adjourn, Menu Item
529 Asks your opponent to agree to adjourning the current game, or
530 agrees to a pending adjournment offer from your opponent.
531 @item Abort
532 @cindex Abort, Menu Item
533 Asks your opponent to agree to aborting the current game, or
534 agrees to a pending abort offer from your opponent. An aborted
535 game ends immediately without affecting either player's rating.
536 @item Resign
537 @cindex Resign, Menu Item
538 Resigns the game to your opponent. The shifted @kbd{R} key is a
539 keyboard equivalent.
540 @item Stop Observing
541 @cindex Stop Observing, Menu Item
542 Ends your participation in observing a game, by issuing the ICS
543 observe command with no arguments. ICS mode only.
544 @item Stop Examining
545 @cindex Stop Examining, Menu Item
546 Ends your participation in examining a game, by issuing the ICS
547 unexamine command. ICS mode only.
548 @item Adjudicate to White
549 @itemx Adjudicate to Black
550 @itemx Adjudicate Draw
551 @cindex Adjudicate to White, Menu Item
552 @cindex Adjudicate to Black, Menu Item
553 @cindex Adjudicate Draw, Menu Item
554 Terminate an ongoing game in Two-Machines mode (including match mode),
555 with as result a win for white, for black, or a draw, respectively.
556 The PGN file of the game will accompany the result string
557 by the comment "user adjudication".
558 @end table
559
560 @node Step Menu
561 @section Step Menu
562 @cindex Step Menu
563 @cindex Menu, Step
564 @table @asis
565 @item Backward
566 @cindex Backward, Menu Item
567 @cindex <, Button
568 Steps backward through a series of remembered moves.
569 The @samp{[<]} button and the @kbd{b} key are equivalents,
570 as is turning the mouse wheel towards you.
571 In addition, pressing the Control key steps back one move, and releasing
572 it steps forward again.
573
574 In most modes, @samp{Backward} only lets you look back at old positions;
575 it does not retract moves. This is the case if you are playing against
576 a chess engine, playing or observing a game on an ICS, or loading a game.
577 If you select @samp{Backward} in any of these situations, you will not
578 be allowed to make a different move. Use @samp{Retract Move} or
579 @samp{Edit Game} if you want to change past moves.
580
581 If you are examining an ICS game, the behavior of @samp{Backward}
582 depends on whether XBoard is in Pause mode. If Pause mode is
583 off, @samp{Backward} issues the ICS backward command, which backs up
584 everyone's view of the game and allows you to make a different
585 move. If Pause mode is on, @samp{Backward} only backs up your local
586 view.
587 @item Forward
588 @cindex Forward, Menu Item
589 @cindex >, Button
590 Steps forward through a series of remembered moves (undoing the
591 effect of @samp{Backward}) or forward through a game file. The
592 @samp{[>]} button and the @kbd{f} key are equivalents,
593 as is turning the mouse wheel away from you.
594
595 If you are examining an ICS game, the behavior of Forward
596 depends on whether XBoard is in Pause mode. If Pause mode is
597 off, @samp{Forward} issues the ICS forward command, which moves
598 everyone's view of the game forward along the current line. If
599 Pause mode is on, @samp{Forward} only moves your local view forward,
600 and it will not go past the position that the game was in when
601 you paused.
602 @item Back to Start
603 @cindex Back to Start, Menu Item
604 @cindex <<, Button
605 Jumps backward to the first remembered position in the game.
606 The @samp{[<<]} button and the shifted @kbd{B} key are equivalents.
607
608 In most modes, Back to Start only lets you look back at old
609 positions; it does not retract moves. This is the case if you
610 are playing against a local chess engine, playing or observing a game on
611 a chess server, or loading a game. If you select @samp{Back to Start} in any
612 of these situations, you will not be allowed to make different
613 moves. Use @samp{Retract Move} or @samp{Edit Game} if you want to change past
614 moves; or use Reset to start a new game.
615
616 If you are examining an ICS game, the behavior of @samp{Back to
617 Start} depends on whether XBoard is in Pause mode. If Pause mode
618 is off, @samp{Back to Start} issues the ICS @samp{backward 999999}
619 command, which backs up everyone's view of the game to the start and
620 allows you to make different moves. If Pause mode is on, @samp{Back
621 to Start} only backs up your local view.
622 @item Forward to End
623 @cindex Forward to End, Menu Item
624 @cindex >>, Button
625 Jumps forward to the last remembered position in the game. The
626 @samp{[>>]} button and the shifted @kbd{F} key are equivalents.
627
628 If you are examining an ICS game, the behavior of @samp{Forward to
629 End} depends on whether XBoard is in Pause mode. If Pause mode
630 is off, @samp{Forward to End} issues the ICS @samp{forward 999999}
631 command, which moves everyone's view of the game forward to the end of
632 the current line. If Pause mode is on, @samp{Forward to End} only moves
633 your local view forward, and it will not go past the position
634 that the game was in when you paused.
635 @item Revert
636 @cindex Revert, Menu Item
637 If you are examining an ICS game and Pause mode is off, issues
638 the ICS command @samp{revert}.
639 @item Truncate Game
640 @cindex Truncate Game, Menu Item
641 Discards all remembered moves of the game beyond the current
642 position. Puts XBoard into @samp{Edit Game} mode if it was not there
643 already.
644 @item Move Now
645 @cindex Move Now, Menu Item
646 Forces the chess engine to move immediately. Chess engine mode only.
647 @item Retract Move
648 @cindex Retract Move, Menu Item
649 Retracts your last move. In chess engine mode, you can do this only
650 after the chess engine has replied to your move; if the chess engine is still
651 thinking, use @samp{Move Now} first. In ICS mode, @samp{Retract Move}
652 issues the command @samp{takeback 1} or @samp{takeback 2}
653 depending on whether it is your opponent's move or yours.
654 @end table
655
656 @node Options Menu
657 @section Options Menu
658 @cindex Menu, Options
659 @cindex Options Menu
660 @table @asis
661 @item Flip View
662 @cindex Flip View, Menu Item
663 Inverts your view of the chess board for the duration of the
664 current game. Starting a new game returns the board to normal.
665 The @kbd{v} key is a keyboard equivalent.
666 @item Adjudications
667 @cindex Adjudications, Menu Item
668 Pops up a sub-menu where you can enable or disable various adjudications
669 that XBoard can perform in engine-engine games.
670 You can instruct XBoard to detect and terminate the game on checkmate
671 or stalemate, even if the engines would not do so, to verify engine
672 result claims (forfeiting engines that make false claims), rather than
673 naively following the engine, to declare draw on positions
674 which can never be won for lack of mating material, (e.g. KBK),
675 or which are impossible to win unless the opponent seeks its own demise 
676 (e.g. KBKN).
677 For these adjudications to work, @samp{Test Legality} should be switched on.
678 It is also possible to instruct XBoard to enforce a 50-move or 3-fold-repeat
679 rule and automatically declare draw (after a user-adjustable number of moves
680 or repeats) even if the engines are prepared to go on.
681 It is also possible to have XBoard declare draw on games that seem to drag on 
682 forever, or adjudicate a loss if both engines agree (for 3 consecutive moves) that one
683 of them is behind more than a user-adjustable score threshold.
684 For the latter adjudication to work, XBoard should be able to properly understand
685 the engine's scores. To facilitate the latter, you can inform xboard here if
686 the engines report scores from the viewpoint of white, or from that of their own color.
687 @item Engine Settings
688 Pops up a sub-menu where you can set some engine parameters common to most engines,
689 such as hash-table size, tablebase cache size, maximum number of processors
690 that SMP engines can use, and where to find the Polyglot adapter needed
691 to run UCI engines under XBoard. The feature that allows setting of these parameters on
692 engines is new since XBoard 4.3.15, so not many WinBoard engines respond
693 to it yet, but UCI engines should.
694 It is also possible to specify a GUI opening book here, i.e. an opening
695 book that XBoard consults for any position a playing engine gets in.
696 It then forces the engine to play the book move, rather than to think up its own,
697 if that position is found in the book.
698 The book can switched on and off independently for either engine.
699 @item Time Control
700 @cindex Time Control, Menu Item
701 Pops up a sub-menu where you can set the time-control parameters interactively.
702 Allows you to select classical or incremental time controls,
703 set the moves per session, session duration, and time increment.
704 Also allows specification of time-odds factors for one or both engines.
705 If an engine is given a time-odds factor N, all time quota it gets, 
706 be it at the beginning of a session or through the time increment or
707 fixed time per move, will be divided by N.
708 @item Always Queen
709 @cindex Always Queen, Menu Item
710 If this option is off, XBoard brings up a dialog
711 box whenever you move a pawn to the last rank, asking what piece
712 you want to promote it to. If the option is true, your pawns are
713 always promoted to queens. Your opponent can still under-promote.
714 @item Animate Dragging
715 @cindex Animate Dragging, Menu Item
716 If Animate Dragging is on, while you are dragging a piece with the
717 mouse, an image of the piece follows the mouse cursor.
718 If Animate Dragging is off, there is no visual feedback while you are
719 dragging a piece, but if Animate Moving is on, the move will be
720 animated when it is complete. 
721 @item Animate Moving
722 @cindex Animate Moving, Menu Item
723 If Animate Moving is on, all piece moves are animated.  An image of the
724 piece is shown moving from the old square to the new square when the
725 move is completed (unless the move was already animated by Animate Dragging).
726 If Animate Moving is off, a moved piece instantly disappears from its
727 old square and reappears on its new square when the move is complete.
728 @item Auto Comment
729 @cindex Auto Comment, Menu Item
730 If this option is on, any remarks made on ICS while you are observing or
731 playing a game are recorded as a comment on the current move.  This includes
732 remarks made with the ICS commands @kbd{say}, @kbd{tell}, @kbd{whisper},
733 and @kbd{kibitz}.
734 Limitation: remarks that you type yourself are not recognized;
735 XBoard scans only the output from ICS, not the input you type to it.
736 @item Auto Flag
737 @cindex Auto Flag, Menu Item
738 If this option is on and one player runs out of time
739 before the other,
740 XBoard
741 will automatically call his flag, claiming a win on time.
742 In ICS mode, Auto Flag will only call your opponent's flag, not yours,
743 and the ICS may award you a draw instead of a win if you have
744 insufficient mating material.  In local chess engine mode,
745 XBoard
746 may call either player's flag and will not take material into account.
747 @item Auto Flip View
748 @cindex Auto Flip View, Menu Item
749 If the Auto Flip View option is on when you start a game, the board
750 will be automatically oriented so that your pawns move from the bottom
751 of the window towards the top.
752 @item Auto Observe
753 @cindex Auto Observe, Menu Item
754 If this option is on and you add a player to your @code{gnotify}
755 list on ICS, XBoard will automatically observe all of that
756 player's games, unless you are doing something else (such as
757 observing or playing a game of your own) when one starts.
758 The games are displayed 
759 from the point of view of the player on your gnotify list; that is, his
760 pawns move from the bottom of the window towards the top.
761 Exceptions:  If both players in a game are on your gnotify list, if
762 your ICS 
763 @code{highlight}
764 variable is set to 0, or if the ICS you are using does not 
765 properly support observing from Black's point of view,
766 you will see the game from White's point of view.
767 @item Auto Raise Board
768 @cindex Auto Raise Board, Menu Item
769 If this option is on, whenever a new game begins, the chessboard window
770 is deiconized (if necessary) and raised to the top of the stack of windows.
771 @item Auto Save
772 @cindex Auto Save, Menu Item
773 If this option is true, at the end of every game XBoard prompts
774 you for a file name and appends a record of the game to the file
775 you specify. 
776 Disabled if the @code{saveGameFile} command-line
777 option is set, as in that case all games are saved to the specified file.
778 @xref{Load and Save options}.
779 @item Blindfold
780 @cindex Blindfold, Menu Item
781 If this option is on, XBoard displays the board as usual but does
782 not display pieces or move highlights.  You can still move in the
783 usual way (with the mouse or by typing moves in ICS mode), even though
784 the pieces are invisible.
785 @item Flash Moves
786 @cindex Flash Moves, Menu Item
787 If this option is on, whenever a move is completed, the moved piece flashes.
788 The number of times to flash is set by the flashCount command-line
789 option; it defaults to 3 if Flash Moves is first turned on from the menu.
790
791 If you are playing a game on an ICS, the board is always
792 oriented at the start of the game so that your pawns move from
793 the bottom of the window towards the top. Otherwise, the starting
794 orientation is determined by the @code{flipView} command line option;
795 if it is false (the default), White's pawns move from bottom to top
796 at the start of each game; if it is true, Black's pawns move from
797 bottom to top. @xref{User interface options}.
798 @item Get Move List
799 @cindex Get Move List, Menu Item
800 If this option is on, whenever XBoard
801 receives the first board of a new ICS game (or a different game from
802 the one it is currently displaying), it
803 retrieves the list of past moves from the ICS.
804 You can then review the moves with the @samp{Forward} and @samp{Backward}
805 commands
806 or save them with @samp{Save Game}.  You might want to
807 turn off this option if you are observing several blitz games at once,
808 to keep from wasting time and network bandwidth fetching the move lists over
809 and over.
810 When you turn this option on from the menu, XBoard
811 immediately fetches the move list of the current game (if any).
812 @item Highlight Last Move
813 @cindex Highlight Last Move, Menu Item
814 If Highlight Last Move is on, after a move is made, the starting and
815 ending squares remain highlighted. In addition, after you use Backward
816 or Back to Start, the starting and ending squares of the last move to
817 be unmade are highlighted.
818 @item Move Sound
819 @cindex Move Sound, Menu Item
820 If this option is on, XBoard alerts you by playing a sound
821 after each of your opponent's moves (or after every
822 move if you are observing a game on the Internet Chess Server).
823 The sound is not played after moves you make or moves read from a
824 saved game file. By default, the
825 sound is the terminal bell, but on some systems you can change it
826 to a sound file using the soundMove option; see below.
827
828 If you turn on this option when using XBoard with the Internet
829 Chess Server, you will probably want to give the
830 @kbd{set bell 0}
831 command to the ICS, since otherwise the ICS will ring the terminal bell
832 after every move (not just yours). (The @file{.icsrc} file
833 is a good place for this; see @ref{ICS options}.)
834 @item ICS Alarm
835 @cindex ICS Alarm, Menu Item
836 When this option is on, an alarm sound is played when your clock
837 counts down to the icsAlarmTime (by default, 5 seconds) in an ICS
838 game.  For games with time controls that include an increment, the
839 alarm will sound each time the clock counts down to the icsAlarmTime.
840 By default, the alarm sound is the terminal bell, but on some systems
841 you can change it to a sound file using the soundIcsAlarm option; see
842 below.
843 @item Old Save Style
844 @cindex Old Save Style, Menu Item
845 If this option is off, XBoard saves games in PGN
846 (portable game notation) and positions in FEN (Forsythe-Edwards
847 notation).  If the option is on, a save style that is compatible
848 with older versions of XBoard is used instead.
849 The old position style is more human-readable
850 than FEN; the old game style has no particular advantages.
851 @item Periodic Updates
852 @cindex Periodic Updates, Menu Item
853 If this option is off (or if
854 you are using a chess engine that does not support periodic updates),
855 the analysis window
856 will only be updated when the analysis changes. If this option is
857 on, the Analysis Window will be updated every two seconds.
858 @item Ponder Next Move
859 @cindex Ponder Next Move, Menu Item
860 If this option is off, the chess engine will think only when it is on
861 move.  If the option is on, the engine will also think while waiting
862 for you to make your move.
863 @item Popup Exit Message
864 @cindex Popup Exit Message, Menu Item
865 If this option is on, when XBoard wants to display a message just
866 before exiting, it brings up a modal dialog box and waits for you to
867 click OK before exiting.  If the option is off, XBoard prints the
868 message to standard error (the terminal) and exits immediately.
869 @item Popup Move Errors
870 @cindex Popup Move Errors, Menu Item
871 If this option is off, when you make an error in moving (such as
872 attempting an illegal move or moving the wrong color piece), the
873 error message is displayed in the message area.  If the option is
874 on, move errors are displayed in small pop-up windows like other errors.
875 You can dismiss an error pop-up either by clicking its OK button or by
876 clicking anywhere on the board, including down-clicking to start a move.
877 @item Premove
878 @cindex Premove, Menu Item
879 If this option is on while playing a game on an ICS, you can register
880 your next planned move before it is your turn.  Move the piece with
881 the mouse in the ordinary way, and the starting and ending squares
882 will be highlighted with a special color (red by default).  When it is
883 your turn, if your registered move is legal, XBoard will send it to
884 ICS immediately; if not, it will be ignored and you can make a
885 different move.  If you change your mind about your premove, either
886 make a different move, or double-click on any piece to cancel the move
887 entirely.
888 @item Quiet Play
889 @cindex Quiet Play, Menu Item
890 If this option is on, XBoard will automatically issue an ICS
891 @kbd{set shout 0}
892 command whenever you start a game and a
893 @kbd{set shout 1}
894 command whenever you finish one.  Thus, you will not be distracted
895 by shouts from other ICS users while playing.
896 @item Show Coords
897 @cindex Show Coords, Menu Item
898 If this option is on, XBoard displays algebraic coordinates
899 along the board's left and bottom edges.
900 @item Hide Thinking
901 @cindex Hide Thinking, Menu Item
902 If this option is off, the chess engine's notion of the score and best
903 line of play from the current position is displayed as it is
904 thinking. The score indicates how many pawns ahead (or if negative,
905 behind) the chess engine thinks it is. In matches between two
906 machines, the score is prefixed by @samp{W} or @samp{B} to indicate
907 whether it is showing White's thinking or Black's, and only the thinking
908 of the engine that is on move is shown.
909 @item Test Legality
910 @cindex Test Legality, Menu Item
911 If this option is on, XBoard tests whether the moves you try to make
912 with the mouse are legal and refuses to let you make an illegal move.
913 Moves loaded from a file with @samp{Load Game} are also checked.  If
914 the option is off, all moves are accepted, but if a local chess engine
915 or the ICS is active, they will still reject illegal moves.  Turning
916 off this option is useful if you are playing a chess variant with
917 rules that XBoard does not understand.  (Bughouse, suicide, and wild
918 variants where the king may castle after starting on the d file are
919 generally supported with Test Legality on.)
920 @end table
921
922 @node Help Menu
923 @section Help Menu
924 @cindex Menu, Help
925 @cindex Help Menu
926 @table @asis
927 @item Info XBoard
928 @cindex Info XBoard, Menu Item
929 Displays the XBoard documentation in info format.  For this feature to
930 work, you must have the GNU info program installed on your system, and
931 the file @file{xboard.info} must either be present in the current
932 working directory, or have been installed by the @samp{make install}
933 command when you built XBoard.
934 @item Man XBoard
935 @cindex Man XBoard, Menu Item
936 Displays the XBoard documentation in man page format.  For this
937 feature to work, the file @file{xboard.6} must have been installed by
938 the @samp{make install} command when you built XBoard, and the
939 directory it was placed in must be on the search path for your
940 system's @samp{man} command.
941 @item Hint
942 @cindex Hint, Menu Item
943 Displays a move hint from the chess engine.
944 @item Book
945 @cindex Book, Menu Item
946 Displays a list of possible moves from the chess engine's opening
947 book.  The exact format depends on what chess engine you are using.
948 With GNU Chess 4, the first column gives moves, the second column
949 gives one possible response for each move, and the third column shows
950 the number of lines in the book that include the move from the first
951 column. If you select this option and nothing happens, the chess
952 engine is out of its book or does not support this feature.
953 @item About XBoard
954 @cindex About XBoard, Menu Item
955 Shows the current XBoard version number.
956 @end table
957
958 @node Keys
959 @section Other Shortcut Keys
960 @cindex Keys
961 @cindex Shortcut keys
962 @table @asis
963 @item Iconize
964 Pressing the @kbd{i} or @kbd{c} key iconizes XBoard. The graphical
965 icon displays a white knight if it is White's move, or a black knight
966 if it is Black's move. If your X window manager displays only text
967 icons, not graphical ones, check its documentation; there is probably
968 a way to enable graphical icons.  If you get black and white reversed,
969 we would like to hear about it; see @ref{Problems} below for
970 instructions on how to report this problem.
971 @end table
972
973 You can add or remove shortcut keys using the X resources
974 @code{form.translations}. Here is an example of what would go in your
975 @file{.Xresources} file:
976
977 @example
978 XBoard*form.translations: \
979   Shift<Key>?: AboutGameProc() \n\
980   <Key>y: AcceptProc() \n\
981   <Key>n: DeclineProc() \n\
982   <Key>i: NothingProc()
983 @end example
984 @noindent
985 Binding a key to @code{NothingProc} makes it do nothing, thus removing
986 it as a shortcut key. The XBoard commands that can be bound to keys
987 are:
988
989 @example
990 AbortProc, AboutGameProc, AboutProc, AcceptProc, AdjournProc,
991 AlwaysQueenProc, AnalysisModeProc, AnalyzeFileProc,
992 AnimateDraggingProc, AnimateMovingProc, AutobsProc, AutoflagProc,
993 AutoflipProc, AutoraiseProc, AutosaveProc, BackwardProc,
994 BlindfoldProc, BookProc, CallFlagProc, CopyGameProc, CopyPositionProc,
995 DebugProc, DeclineProc, DrawProc, EditCommentProc, EditGameProc,
996 EditPositionProc, EditTagsProc, EnterKeyProc, FlashMovesProc,
997 FlipViewProc, ForwardProc, GetMoveListProc, HighlightLastMoveProc,
998 HintProc, Iconify, IcsAlarmProc, IcsClientProc, IcsInputBoxProc,
999 InfoProc, LoadGameProc, LoadNextGameProc, LoadNextPositionProc,
1000 LoadPositionProc, LoadPrevGameProc, LoadPrevPositionProc,
1001 LoadSelectedProc, MachineBlackProc, MachineWhiteProc, MailMoveProc,
1002 ManProc, MoveNowProc, MoveSoundProc, NothingProc, OldSaveStyleProc,
1003 PasteGameProc, PastePositionProc, PauseProc, PeriodicUpdatesProc,
1004 PonderNextMoveProc, PopupExitMessageProc, PopupMoveErrorsProc,
1005 PremoveProc, QuietPlayProc, QuitProc, ReloadCmailMsgProc,
1006 ReloadGameProc, ReloadPositionProc, RematchProc, ResetProc,
1007 ResignProc, RetractMoveProc, RevertProc, SaveGameProc,
1008 SavePositionProc, ShowCoordsProc, ShowGameListProc, ShowThinkingProc,
1009 StopExaminingProc, StopObservingProc, TestLegalityProc, ToEndProc,
1010 ToStartProc, TrainingProc, TruncateGameProc, and TwoMachinesProc.
1011 @end example
1012
1013 @node Options
1014 @chapter Options
1015 @cindex Options
1016 @cindex Options
1017
1018 This section documents the command-line options to XBoard.  You can
1019 set these options in two ways: by typing them on the shell command
1020 line you use to start XBoard, or by setting them as X resources
1021 (typically in your @file{.Xresources} file).  Many of the options
1022 cannot be changed while XBoard is running; others set the initial
1023 state of items that can be changed with the @ref{Options} menu.
1024
1025 Most of the options have both a long name and a short name. To turn a
1026 boolean option on or off from the command line, either give its long
1027 name followed by the value true or false
1028 (@samp{-longOptionName true}), or give just the short name to turn the
1029 option on (@samp{-opt}), or the short name preceded by @samp{x} to
1030 turn the option off (@samp{-xopt}). For options that take strings or
1031 numbers as values, you can use the long or short option names
1032 interchangeably.
1033
1034 Each option corresponds to an X resource with the same name, so
1035 if you like, you can set options in your @file{.Xresources} file
1036 or in a file named @file{XBoard} in your home directory.
1037 For options that have two names, the longer one is the name of
1038 the corresponding X resource; the short name is not recognized.
1039 To turn a boolean option on or off as an
1040 X resource, give its long name followed by the value
1041 true or false (@samp{XBoard*longOptionName: true}).
1042
1043 @menu
1044 * Chess engine options::        Controlling the chess engine.
1045 * UCI + WB Engine Settings::    Setting some very common engine parameters
1046 * ICS options::                 Connecting to and using ICS.
1047 * Load and Save options::       Input/output options.
1048 * User interface options::      Look and feel options.
1049 * Adjudication Options::        Control adjudication of engine-engine games.
1050 * Other options::               Miscellaneous.
1051 @end menu
1052
1053 @node Chess engine options
1054 @section Chess Engine Options
1055 @cindex options, Chess engine
1056 @cindex Chess engine options
1057 @table @asis
1058 @item -tc or -timeControl minutes[:seconds]
1059 @cindex tc, option
1060 @cindex timeControl, option
1061 Each player begins with his clock set to the @code{timeControl} period.
1062 Default: 5 minutes.
1063 The additional options @code{movesPerSession} and @code{timeIncrement}
1064 are mutually exclusive.  
1065 @item -mps or -movesPerSession moves
1066 @cindex mps, option
1067 @cindex movesPerSession, option
1068 When both players have made @code{movesPerSession} moves, a
1069 new @code{timeControl} period is added to both clocks.  Default: 40 moves.
1070 @item -inc or -timeIncrement seconds
1071 @cindex inc, option
1072 @cindex timeIncrement, option
1073 If this option is specified, @code{movesPerSession} is ignored.
1074 Instead, after each player's move, @code{timeIncrement} seconds are
1075 added to his clock.  
1076 Use @samp{-inc 0} if you want to require the entire
1077 game to be played in one @code{timeControl} period, with no increment.
1078 Default: -1, which specifies @code{movesPerSession} mode.
1079 @item -clock/-xclock or -clockMode true/false
1080 @cindex clock, option
1081 @cindex clockMode, option
1082 Determines whether or not to display the chess clocks. If clockMode is
1083 false, the clocks are not shown, but the side that is to play next
1084 is still highlighted. Also, unless @code{searchTime}
1085 is set, the chess engine still keeps track of the clock time and uses it to
1086 determine how fast to make its moves.
1087 @item -st or -searchTime minutes[:seconds]
1088 @cindex st, option
1089 @cindex searchTime, option
1090 Tells the chess engine to spend at most the given amount of time
1091 searching for each of its moves. Without this option, the chess engine
1092 chooses its search time based on the number of moves and amount
1093 of time remaining until the next time control.
1094 Setting this option also sets clockMode to false.
1095 @item -depth or -searchDepth number
1096 @cindex sd, option
1097 @cindex searchDepth, option
1098 Tells the chess engine to look ahead at most the given number of moves
1099 when searching for a move to make. Without this option, the chess
1100 engine chooses its search depth based on the number of moves and
1101 amount of time remaining until the next time control.  With the option,
1102 the engine will cut off its search early if it reaches the specified depth.
1103 @item -firstNPS number
1104 @itemx -secondNPS number
1105 @cindex firstNPS, option
1106 @cindex secondNPS, option
1107 Tells the chess engine to use an internal time standard based on its node count, 
1108 rather then wall-clock time, to make its timing decisions. 
1109 The time in virtual seconds should be obtained by dividing the node count 
1110 through the given number, like the number was a rate in nodes per second. 
1111 Xboard will manage the clocks in accordance with this, relying on the number 
1112 of nodes reported by the engine in its thinking output. If the given number equals zero, 
1113 it can obviously not be used to convert nodes to seconds, and the time reported 
1114 by the engine is used to decrement the XBoard clock in stead. The engine is supposed to 
1115 report in CPU time it uses, rather than wall-clock time, in this mode. This option 
1116 can provide fairer conditions for engine-engine matches on heavily loaded machines, 
1117 or with very fast games (where the wall clock is too inaccurate). 
1118 @code{showThinking} must be on for this option to work. Default: -1 (off).
1119 Not many engines might support this yet!
1120 @item -firstTimeOdds factor
1121 @itemx -secondTimeOdds factor
1122 @cindex firstTimeOdds, option
1123 @cindex secondTimeOdds, option
1124 Reduces the time given to the mentioned engine by the given factor. 
1125 If pondering is off, the effect is indistinguishable from what would happen 
1126 if the engine was running on an n-times slower machine. Default: 1.
1127 @item -timeOddsMode mode
1128 @cindex timeOddsMode, option
1129 This option determines how the case is handled where both engines have a time-odds handicap. 
1130 If mode=1, the engine that gets the most time will always get the nominal time, 
1131 as specified by the time-control options, and its opponent's time is renormalized accordingly. 
1132 If mode=0, both play with reduced time. Default: 0.
1133 @item -hideThinkingFromHuman true/false
1134 Controls the Hide Thinking option. @xref{Options Menu}. Default: true.
1135 (Replaces the Show-Thinking option of older xboard versions.)
1136 @item -thinking/-xthinking or -showThinking true/false
1137 @cindex thinking, option
1138 @cindex showThinking, option
1139 Forces the engine to send thinking output to xboard. 
1140 Used to be the only way to control if thinking output was displayed 
1141 in older xboard versions,
1142 but as the thinking output in xboard 4.3 is also used for several other
1143 purposes (adjudication, storing in PGN file) the display of it is now controlled
1144 by the new option Hide Thinking. @xref{Options Menu}. Default: false.
1145 (But if xboard needs the thinking output for some purpose,
1146 it makes the engine send it despite the setting of this option.)
1147 @item -ponder/-xponder or -ponderNextMove true/false
1148 @cindex ponder, option
1149 @cindex ponderNextMove, option
1150 Sets the Ponder Next Move menu option. @xref{Options Menu}. Default: true.
1151 @item -smpCores number
1152 Specifies the maximum number of CPUs an SMP engine is allowed to use.
1153 Only works for engines that support the WinBoard-protocol cores feature.
1154 @item -mg or -matchGames n
1155 @cindex mg, option
1156 @cindex matchGames, option
1157 Automatically runs an n-game match between two chess engines,
1158 with alternating colors.
1159 If the @code{loadGameFile} or @code{loadPositionFile} option is set,
1160 XBoard
1161 starts each game with the given opening moves or the given position;
1162 otherwise, the games start with the standard initial chess position.
1163 If the @code{saveGameFile} option is set, a move record for the
1164 match is appended to the specified file. If the @code{savePositionFile}
1165 option is set, the final position reached in each game of the match is appended
1166 to the specified file. When the match is over, XBoard
1167 displays the match score and exits. Default: 0 (do not run a match).
1168 @item -mm/-xmm or -matchMode true/false
1169 @cindex mm, option
1170 @cindex matchMode, option
1171 Setting @code{matchMode} to true is equivalent to setting
1172 @code{matchGames} to 1.
1173 @item -sameColorGames n
1174 @cindex sameColorGames, option
1175 Automatically runs an n-game match between two chess engines,
1176 without alternating colors.
1177 Otherwise the same applies as for the @samp{-matchGames} option,
1178 over which it takes precedence if both are specified. (See there.)
1179 Default: 0 (do not run a match).
1180 @item -fcp or -firstChessProgram program
1181 @cindex fcp, option
1182 @cindex firstChessProgram, option
1183 Name of first chess engine.
1184 Default: @file{Fairy-Max}.
1185 @item -scp or -secondChessProgram program
1186 @cindex scp, option
1187 @cindex secondChessProgram, option
1188 Name of second chess engine, if needed.
1189 A second chess engine is started only in Two Machines (match) mode.
1190 Default: @file{Fairy-Max}.
1191 @item -fb/-xfb or -firstPlaysBlack true/false
1192 @cindex fb, option
1193 @cindex firstPlaysBlack, option
1194 In games between two chess engines, firstChessProgram normally plays
1195 white.  If this option is true, firstChessProgram plays black.  In a
1196 multi-game match, this option affects the colors only for the first
1197 game; they still alternate in subsequent games.
1198 @item -fh or -firstHost host
1199 @itemx -sh or -secondHost host
1200 @cindex fh, option
1201 @cindex firstHost, option
1202 @cindex sh, option
1203 @cindex secondHost, option
1204 Hosts on which the chess engines are to run. The default for
1205 each is @file{localhost}. If you specify another host, XBoard
1206 uses @file{rsh} to run the chess engine there. (You can substitute a
1207 different remote shell program for rsh using the @code{remoteShell}
1208 option described below.)
1209 @item -fd or -firstDirectory dir
1210 @itemx -sd or -secondDirectory dir
1211 @cindex fd, option
1212 @cindex firstDirectory, option
1213 @cindex sd, option
1214 @cindex secondDirectory, option
1215 Working directories in which the chess engines are to be run.
1216 The default is "", which means to run the chess engine
1217 in the same working directory as XBoard
1218 itself.  (See the CHESSDIR environment variable.)
1219 This option is effective only when the chess engine is being run
1220 on the local host; it does not work if the engine is run remotely
1221 using the -fh or -sh option.
1222 @item -initString string
1223 @itemx -secondInitString string
1224 @cindex initString, option
1225 @cindex secondInitString, option
1226 The string that is sent to initialize each chess engine for a new game.
1227 Default:
1228
1229 @example
1230 new
1231 random
1232 @end example
1233 @noindent
1234 Setting this option from the command line is tricky, because you must
1235 type in real newline characters, including one at the very end.
1236 In most shells you can do this by
1237 entering a @samp{\} character followed by a newline. It is easier to set
1238 the option from your @file{.Xresources} file; in that case you can
1239 include the character sequence @samp{\n} in the string, and it will
1240 be converted to a newline.
1241
1242 If you change this option, don't remove the @samp{new} 
1243 command; it is required by all chess engines to
1244 start a new game.
1245
1246 You can remove the @samp{random} command if you like; including it
1247 causes GNU Chess 4 to randomize its move selection slightly so that it
1248 doesn't play the same moves in every game.  Even without
1249 @samp{random}, GNU Chess 4 randomizes its choice of moves from its
1250 opening book.  Many other chess engines ignore this command entirely
1251 and always (or never) randomize.
1252
1253 You can also try adding other commands to the initString; see the
1254 documentation of the chess engine you are using for details.
1255 @item -firstComputerString string
1256 @itemx -secondComputerString string
1257 @cindex firstComputerString, option
1258 @cindex secondComputerString, option
1259 The string that is sent to the chess engine if its opponent is another
1260 computer chess engine.  The default is @samp{computer\n}.  Probably the
1261 only useful alternative is the empty string (@samp{}), which keeps the
1262 engine from knowing that it is playing another computer.
1263 @item -reuse/-xreuse or -reuseFirst true/false
1264 @itemx -reuse2/-xreuse2 or -reuseSecond true/false
1265 @cindex reuse, option
1266 @cindex reuseFirst, option
1267 @cindex reuse2, option
1268 @cindex reuseSecond, option
1269 If the option is false,
1270 XBoard kills off the chess engine after every game and starts
1271 it again for the next game.  
1272 If the option is true (the default), 
1273 XBoard starts the chess engine only once
1274 and uses it repeatedly to play multiple games.
1275 Some old chess engines may not work properly when
1276 reuse is turned on, but otherwise games will start faster if it is left on.
1277 @item -firstProtocolVersion version-number
1278 @itemx -secondProtocolVersion version-number
1279 @cindex firstProtocolVersion, option
1280 @cindex secondProtocolVersion, option
1281 This option specifies which version of the chess engine communication
1282 protocol to use.  By default, version-number is 2.  In version 1, the
1283 "protover" command is not sent to the engine; since version 1 is a
1284 subset of version 2, nothing else changes.  Other values for
1285 version-number are not supported.
1286 @item -firstScoreAbs true/false
1287 @itemx -secondScoreAbs true/false
1288 @cindex firstScoreAbs, option
1289 @cindex secondScoreAbs, option
1290 If this option is set, the score reported by the engine is taken to be 
1291 that in favor of white, even when the engine plays black. 
1292 Important when XBoard uses the score for adjudications, or in PGN reporting. 
1293 @item -niceEngines priority
1294 @cindex niceEngines, option
1295 This option allows you to lower the priority of the engine processes, 
1296 so that the generally insatiable hunger for CPU time of chess engines does not interfere so much 
1297 with smooth operation of WinBoard (or the rest of your system). 
1298 Negative values could increase the engine priority, which is not recommended.
1299 @item -firstOptions string
1300 @itemx -secondOptions string
1301 @cindex firstOptions, option
1302 @cindex secondOptions, option
1303 The given string is a comma-separated list of (option name=option value) pairs, 
1304 like the following example: "style=Karpov,blunder rate=0". 
1305 If the options announced by the engine at startup through the feature commands of WinBoard protocol 
1306 matches one of the option names (i.e. "style" or "blunder rate"), 
1307 it would be set to the given value (i.e. "Karpov" or 0) 
1308 through a corresponding option command to the engine. 
1309 This provided that the type of the value (text or numeric) matches as well.
1310 @item -firstNeedsNoncompliantFEN string
1311 @itemx -secondNeedsNoncompliantFEN string
1312 @cindex firstNeedsNoncompliantFEN, option
1313 @cindex secondNeedsNoncompliantFEN, option
1314 The castling rights and e.p. fields of the FEN sent to the mentioned engine 
1315 with the setboard command will be replaced by the given string. This can for 
1316 instance be used to run engines that do not understand Chess960 FENs in 
1317 variant fischerandom, to make them at least understand the opening position, 
1318 through setting the string to "KQkq -". (Note you also have to give the e.p. field!) 
1319 Other possible applications are to provide work-arounds for engines that want to see 
1320 castling and e.p. fields in variants that do not have castling or e.p. 
1321 (shatranj, courier, xiangqi, shogi) so that WinBoard would normally omit them 
1322 (string = "- -"), or to add variant-specific fields that are not yet supported by WinBoard 
1323 (e.g. to indicate the number of checks in 3check).
1324 @end table
1325
1326 @node UCI + WB Engine Settings
1327 @section UCI + WB Engine Settings
1328 @cindex Engine Settings
1329 @cindex Settings, Engine
1330 @table @asis
1331 @item -fUCI or -firstIsUCI true/false
1332 @itemx -sUCI or -secondIsUCI true/false
1333 @cindex fUCI, option
1334 @cindex sUCI, option
1335 @cindex firstIsUCI, option
1336 @cindex secondIsUCI, option
1337 Indicates if the mentioned engine executable file is an UCI engine, 
1338 and should be run with the aid of the Polyglot adapter rather than directly. 
1339 Xboard will then pass the other UCI options and engine name to Polyglot 
1340 through a .ini temporary file created for the purpose.
1341 @item -PolyglotDir filename
1342 @cindex PolyglotDir, option
1343 Gives the name of the directory in which the Polyglot adapter for UCI engines expects its files.
1344 Default: "/usr/local/share/polyglot".
1345 @item -usePolyglotBook true/false
1346 @cindex usePolyglotBook, option
1347 Specifies if the Polyglot book should be used.
1348 @item -PolyglotBook filename
1349 @cindex PolyglotBook, option
1350 Gives the filename of the opening book that Polyglot should use. 
1351 From XBoard 4.3.15 on, native WinBoard engines will also use the opening book specified here, 
1352 provided the @code{usePolyglotBook} option is set to true,
1353 and the option @code{firstHasOwnBookUCI} or @code{secondHasOwnBookUCI} applying to the engine
1354 is set to false.
1355 The engine will be kept in force mode as long as the current position is in book, 
1356 and XBoard will select the book moves for it. Default "".
1357 @item -fNoOwnBookUCI or -firstXBook or -firstHasOwnBookUCI true/false
1358 @itemx -sNoOwnBookUCI or -secondXBook or -secondHasOwnBookUCI true/false
1359 @cindex fNoOwnBookUCI, option
1360 @cindex sNoOwnBookUCI, option
1361 @cindex firstHasOwnBookUCI, option
1362 @cindex secondHasOwnBookUCI, option
1363 @cindex firstXBook, option
1364 @cindex secondXBook, option
1365 Indicates if the mentioned engine has its own opening book it should play from,
1366 rather than using the external book through XBoard. Default: false.
1367 @item -defaultHashSize n
1368 @cindex defaultHashSize, option
1369 Sets the size of the hash table to n MegaBytes. Together with the EGTB cache size 
1370 this number is also used to calculate the memory setting of WinBoard engines, 
1371 for those that support the memory feature of WinBoard protocol. Default: 64.
1372 @item -defaultCacheSizeEGTB n
1373 @cindex defaultCacheSizeEGTB, option
1374 Sets the size of the EGTB cache to n MegaBytes. Together with the hash-table size 
1375 this number is also used to calculate the memory setting of WinBoard engines, 
1376 for those that support the memory feature of WinBoard protocol. Default: 4.
1377 @item -defaultPathEGTB filename
1378 @cindex defaultPathEGTB, option
1379 Gives the name of the directory where the end-game tablebases are installed, for UCI engines.
1380 Default: "/usr/local/share/egtb".
1381 @item -egtFormats string
1382 @cindex egtFormats, option
1383 Specifies which end-game tables are installed on the computer, and where. 
1384 The argument is a comma-separated list of format specifications, 
1385 each specification consisting of a format name, a colon, and a directory path name, 
1386 e.g. "nalimov:/usr/local/share/egtb". 
1387 If the name part matches that of a format that the engine requests through a feature command, 
1388 xboard will relay the path name for this format to the engine through an egtpath command. 
1389 One egtpath command for each matching format will be sent. 
1390 Popular formats are "nalimov" DTM tablebases and "scorpio" bitbases.
1391 Default: "".
1392 @end table
1393
1394 @node ICS options
1395 @section ICS options
1396 @cindex ICS options
1397 @cindex Options, ICS
1398 @table @asis
1399 @item -ics/-xics or -internetChessServerMode true/false
1400 @cindex ics, option
1401 @cindex internetChessServerMode, option
1402 Connect with an Internet Chess Server to play chess against its
1403 other users, observe games they are playing, or review games
1404 that have recently finished. Default: false.
1405 @item -icshost or -internetChessServerHost host
1406 @cindex icshost, option
1407 @cindex internetChessServerHost, option
1408 The Internet host name or address of the chess server to connect
1409 to when in ICS mode. Default: @code{chessclub.com}.
1410 Another popular chess server to try is @code{freechess.org}.
1411 If your site doesn't have a working Internet name server, try
1412 specifying the host address in numeric form. 
1413 You may also need
1414 to specify the numeric address when using the icshelper option
1415 with timestamp or timeseal (see below).
1416 @item -icsport or -internetChessServerPort port-number
1417 @cindex icsport, option
1418 @cindex internetChessServerPort, option
1419 The port number to use when connecting to a chess server in ICS
1420 mode. Default: 5000.
1421 @item -icshelper or -internetChessServerHelper prog-name
1422 @cindex icshelper, option
1423 @cindex internetChessServerHelper, option
1424 An external helper program used to communicate with the chess server.
1425 You would set it to "timestamp" for ICC (chessclub.com) or
1426 "timeseal" for FICS (freechess.org), after
1427 obtaining the correct version of timestamp or timeseal for your
1428 computer.  See "help timestamp" on ICC and "help timeseal" on FICS.
1429 This option is shorthand for @code{-useTelnet -telnetProgram program}.
1430 @item -telnet/-xtelnet or -useTelnet true/false
1431 @cindex telnet, option
1432 @cindex useTelnet, option
1433 This option is poorly named; it should be called useHelper.
1434 If set to true, it instructs XBoard to run an external
1435 program to communicate with the Internet Chess Server. 
1436 The program to use is given by the telnetProgram option.
1437 If the option is
1438 false (the default), XBoard opens a TCP socket and uses its own
1439 internal implementation of the telnet protocol to communicate with the
1440 ICS. @xref{Firewalls}.
1441 @item -telnetProgram prog-name
1442 @cindex telnetProgram, option
1443 This option is poorly named; it should be called helperProgram.
1444 It gives the name of the telnet program to be used with
1445 the @code{gateway} and @code{useTelnet} options.  The default is
1446 @file{telnet}. The telnet program is invoked with the value of
1447 @code{internetChessServerHost} as its first argument and the value
1448 of @code{internetChessServerPort} as its second argument.
1449 @xref{Firewalls}.
1450 @item -gateway host-name
1451 @cindex gateway, option
1452 If this option is set to a host name, XBoard communicates with the
1453 Internet Chess Server by using @file{rsh} to run
1454 the @code{telnetProgram} on the given host,
1455 instead of using its own internal implementation
1456 of the telnet protocol. You can substitute a different remote shell
1457 program for @file{rsh} using the @code{remoteShell} option described below.
1458 @xref{Firewalls}.
1459 @item -internetChessServerCommPort or -icscomm dev-name
1460 @cindex internetChessServerCommPort, option
1461 @cindex icscomm, option
1462 If this option is set, XBoard communicates with the ICS through
1463 the given character I/O device instead of opening a TCP connection.
1464 Use this option if your system does not have any kind of
1465 Internet connection itself (not even a SLIP or PPP connection),
1466 but you do have dial-up access (or a hardwired terminal line) to
1467 an Internet service provider from which you can telnet to the ICS.
1468
1469 The support for this option in XBoard is minimal. You need to
1470 set all communication parameters and tty modes before you enter
1471 XBoard.
1472
1473 Use a script something like this:
1474
1475 @example
1476 stty raw -echo 9600 > /dev/tty00
1477 xboard -ics -icscomm /dev/tty00
1478 @end example
1479
1480 Here replace @samp{/dev/tty00} with the name of the device that your
1481 modem is connected to. You might have to add several more
1482 options to these stty commands. See the man pages for @file{stty}
1483 and @code{tty} if you run into problems. Also, on many systems stty
1484 works on its standard input instead of standard output, so you
1485 have to use @samp{<} instead of @samp{>}.
1486
1487 If you are using linux, try starting with the script below.
1488 Change it as necessary for your installation.
1489
1490 @example
1491 #!/bin/sh -f
1492 # configure modem and fire up XBoard
1493
1494 # configure modem
1495 (
1496   stty 2400 ; stty raw ; stty hupcl ; stty -clocal
1497   stty ignbrk ; stty ignpar ; stty ixon ; stty ixoff
1498   stty -iexten ; stty -echo
1499 ) < /dev/modem
1500 xboard -ics -icscomm /dev/modem
1501 @end example
1502 @noindent
1503 After you start XBoard in this way, type whatever commands are
1504 necessary to dial out to your Internet provider and log in.
1505 Then telnet to ICS, using a command like
1506 @kbd{telnet chessclub.com 5000}.
1507 Important: See the paragraph below about extra echoes, 
1508 in @ref{Limitations}.
1509 @item -icslogon or -internetChessServerLogonScript file-name
1510 @cindex icslogon, option
1511 @cindex internetChessServerLogonScript, option
1512 @cindex .icsrc
1513 Whenever XBoard connects to the Internet Chess Server,
1514 if it finds a file with the name given in this option, it feeds the
1515 file's contents to the ICS as commands. The default file name
1516 is @file{.icsrc}.
1517 Usually the first two lines of the file should be
1518 your ICS user name and password.
1519 The file can be either in $CHESSDIR, in XBoard's working
1520 directory if CHESSDIR is not set, or in your home directory.
1521 @item -msLoginDelay delay
1522 @cindex msLoginDelay, option
1523 If you experience trouble logging on to an ICS when using the
1524 @code{-icslogon} option, inserting some delay between characters
1525 of the logon script may help. This option adds @code{delay}
1526 milliseconds of delay between characters. Good values to try
1527 are 100 and 250.
1528 @item -icsinput/-xicsinput or -internetChessServerInputBox true/false
1529 @cindex icsinput, option
1530 @cindex internetChessServerInputBox, option
1531 Sets the ICS Input Box menu option. @xref{Mode Menu}. Default: false.
1532 @item -autocomm/-xautocomm or -autoComment true/false
1533 @cindex autocomm, option
1534 @cindex autoComment, option
1535 Sets the Auto Comment menu option. @xref{Options Menu}. Default: false.
1536 @item -autoflag/-xautoflag or -autoCallFlag true/false
1537 @cindex autoflag, option
1538 @cindex autoCallFlag, option
1539 Sets the Auto Flag menu option.  @xref{Options Menu}. Default: false.
1540 @item -autobs/-xautobs or -autoObserve true/false
1541 @cindex autobs, option
1542 @cindex autoObserve, option
1543 Sets the Auto Observe menu option.  @xref{Options Menu}. Default: false.
1544 @item -autoKibitz
1545 @cindex autoKibitz, option
1546 Enables kibitzing of the engines last thinking output (depth, score, time, speed, PV) 
1547 before it moved
1548 to the ICS, in zippy mode. The option @code{showThinking} must be switched on for 
1549 this option to work.
1550 Also diverts similar kibitz information of an opponent engine that is playing you 
1551 through the ICS to the engine-output window, as if the engine was playing locally.
1552 @item -moves/-xmoves or -getMoveList true/false
1553 @cindex moves, option
1554 @cindex getMoveList, option
1555 Sets the Get Move List menu option.  @xref{Options Menu}.  Default: true.
1556 @item -alarm/-xalarm or -icsAlarm true/false
1557 @cindex alarm, option
1558 @cindex icsAlarm, option
1559 Sets the ICS Alarm menu option.  @xref{Options Menu}. Default: true.
1560 @item -icsAlarmTime ms
1561 @cindex icsAlarmTime, option
1562 Sets the time in milliseconds for the ICS Alarm menu option.
1563 @xref{Options Menu}. Default: 5000.
1564 @item lowTimeWarning true/false
1565 @cindex lowTimeWarning, option
1566 Controls a color change of the board as a warning your time is running out.
1567 @xref{Options Menu}. Default: false.
1568 @item -pre/-xpre \fRor\fB -premove true/false
1569 @cindex pre, option
1570 @cindex premove, option
1571 Sets the Premove menu option. @xref{Options Menu}. Default: true.
1572 @item -quiet/-xquiet or -quietPlay true/false
1573 @cindex quiet, option
1574 @cindex quietPlay, option
1575 Sets the Quiet Play menu option.  @xref{Options Menu}.  Default: false.
1576 @item -colorizeMessages or -colorize
1577 @cindex Colors
1578 @cindex colorize, option
1579 Setting colorizeMessages
1580 to true tells XBoard to colorize the messages received from
1581 the ICS.  Colorization works only if your xterm 
1582 supports ISO 6429 escape sequences for changing text colors.
1583 @item -colorShout foreground,background,bold
1584 @itemx -colorSShout foreground,background,bold
1585 @itemx -colorChannel1 foreground,background,bold
1586 @itemx -colorChannel foreground,background,bold
1587 @itemx -colorKibitz foreground,background,bold
1588 @itemx -colorTell foreground,background,bold
1589 @itemx -colorChallege foreground,background,bold
1590 @itemx -colorRequest foreground,background,bold
1591 @itemx -colorSeek foreground,background,bold
1592 @itemx -colorNormal foreground,background,bold
1593 @cindex Colors
1594 @cindex colorShout, option
1595 @cindex colorSShout, option
1596 @cindex colorChannel1, option
1597 @cindex colorChannel, option
1598 @cindex colorKibitz, option
1599 @cindex colorTell, option
1600 @cindex colorChallenge, option
1601 @cindex colorRequest, option
1602 @cindex colorSeek, option
1603 @cindex colorNormal, option
1604 These options set the colors used when colorizing ICS messages.
1605 All ICS messages are grouped into one of these categories:
1606 shout, sshout, channel 1, other channel, kibitz, tell, challenge, 
1607 request (including abort, adjourn, draw, pause, and takeback), or
1608 normal (all other messages).  
1609
1610 Each foreground or background argument can be one of the following:
1611 black, red, green, yellow, blue, magenta, cyan, white, or default.
1612 Here ``default'' means the default foreground or background color of
1613 your xterm.  Bold can be 1 or 0.  If background is omitted, ``default''
1614 is assumed; if bold is omitted, 0 is assumed.
1615
1616 Here is an example of how to set the colors in your @file{.Xresources} file.
1617 The colors shown here are the default values; you will get
1618 them if you turn @code{-colorize} on without specifying your own colors.
1619
1620 @example
1621 xboard*colorizeMessages: true   
1622 xboard*colorShout: green
1623 xboard*colorSShout: green, black, 1
1624 xboard*colorChannel1: cyan
1625 xboard*colorChannel: cyan, black, 1
1626 xboard*colorKibitz: magenta, black, 1
1627 xboard*colorTell: yellow, black, 1
1628 xboard*colorChallenge: red, black, 1
1629 xboard*colorRequest: red
1630 xboard*colorSeek: blue
1631 xboard*colorNormal: default
1632 @end example
1633 @item -soundProgram progname
1634 @cindex soundProgram, option
1635 @cindex Sounds
1636 If this option is set to a sound-playing program that is installed and
1637 working on your system, XBoard can play sound files when certain
1638 events occur, listed below.  The default program name is "play".  If
1639 any of the sound options is set to "$", the event rings the terminal
1640 bell by sending a ^G character to standard output, instead of playing
1641 a sound file.  If an option is set to the empty string "", no sound is
1642 played for that event.
1643 @item -soundShout filename
1644 @itemx -soundSShout filename
1645 @itemx -soundChannel filename
1646 @itemx -soundKibitz filename
1647 @itemx -soundTell filename
1648 @itemx -soundChallenge filename
1649 @itemx -soundRequest filename
1650 @itemx -soundSeek filename
1651 @cindex soundShout, option
1652 @cindex soundSShout, option
1653 @cindex soundChannel, option
1654 @cindex soundKibitz, option
1655 @cindex soundTell, option
1656 @cindex soundChallenge, option
1657 @cindex soundRequest, option
1658 @cindex soundSeek, option
1659 These sounds are triggered in the same way as the colorization events
1660 described above.  They all default to "", no sound.  They are played
1661 only if the colorizeMessages is on.
1662 @item -soundMove filename
1663 @cindex soundMove, option
1664 This sound is used by the Move Sound menu option.  Default: "$".
1665 @item -soundIcsAlarm filename
1666 @cindex soundIcsAlarm, option
1667 This sound is used by the ICS Alarm menu option.  Default: "$".
1668 @item -soundIcsWin filename
1669 @cindex soundIcsWin, option
1670 This sound is played when you win an ICS game.  Default: "" (no sound).
1671 @item -soundIcsLoss filename
1672 @cindex soundIcsLoss, option
1673 This sound is played when you lose an ICS game.  Default: "" (no sound).
1674 @item -soundIcsDraw filename
1675 @cindex soundIcsDraw, option
1676 This sound is played when you draw an ICS game.  Default: "" (no sound).
1677 @item -soundIcsUnfinished filename
1678 @cindex soundIcsUnfinished, option
1679 This sound is played when an ICS game that you are participating in is
1680 aborted, adjourned, or otherwise ends inconclusively.  Default: "" (no
1681 sound).
1682
1683 Here is an example of how to set the sounds in your @file{.Xresources} file:
1684
1685 @example
1686 xboard*soundShout: shout.wav
1687 xboard*soundSShout: sshout.wav
1688 xboard*soundChannel1: channel1.wav
1689 xboard*soundChannel: channel.wav
1690 xboard*soundKibitz: kibitz.wav
1691 xboard*soundTell: tell.wav
1692 xboard*soundChallenge: challenge.wav
1693 xboard*soundRequest: request.wav
1694 xboard*soundSeek: seek.wav
1695 xboard*soundMove: move.wav
1696 xboard*soundIcsWin: win.wav
1697 xboard*soundIcsLoss: lose.wav
1698 xboard*soundIcsDraw: draw.wav
1699 xboard*soundIcsUnfinished: unfinished.wav
1700 xboard*soundIcsAlarm: alarm.wav
1701 @end example
1702 @end table
1703
1704 @node Load and Save options
1705 @section Load and Save options
1706 @cindex Options, Load and Save
1707 @cindex Load and Save options
1708 @table @asis
1709 @item -lgf or -loadGameFile file
1710 @itemx -lgi or -loadGameIndex index
1711 @cindex lgf, option
1712 @cindex loadGameFile, option
1713 @cindex lgi, option
1714 @cindex loadGameIndex, option
1715 If the @code{loadGameFile} option is set, XBoard loads the specified
1716 game file at startup. The file name @file{-} specifies the standard
1717 input. If there is more than one game in the file, XBoard
1718 pops up a menu of the available games, with entries based on their PGN 
1719 (Portable Game Notation) tags.
1720 If the @code{loadGameIndex} option is set to @samp{N}, the menu is suppressed
1721 and the N th game found in the file is loaded immediately.
1722 The menu is also suppressed if @code{matchMode} is enabled or if the game file
1723 is a pipe; in these cases the first game in the file is loaded immediately.
1724 Use the @file{pxboard} shell script provided with XBoard if you
1725 want to pipe in files containing multiple games and still see the menu.
1726 If the loadGameIndex specifies an index -1, this triggers auto-increment
1727 of the index in @code{matchMode}, which means that after every game the
1728 index is incremented by one, causing each game of the match to be played
1729 from the next game in the file. Similarly, specifying an index value of -2
1730 causes the index to be incremented every two games, so that each game
1731 in the file is used twice (with reversed colors).
1732 The @code{rewindIndex} option causes the index to be reset to the
1733 first game of the file when it has reached a specified value.
1734 @item -rewindIndex n
1735 Causes a position file or game file to be rewound to its beginning after n
1736 positions or games in auto-increment @code{matchMode}. 
1737 See @code{loadPositionIndex} and @code{loadGameIndex}.
1738 default: 0 (no rewind).
1739 @item -td or -timeDelay seconds
1740 @cindex td, option
1741 @cindex timeDelay, option
1742 Time delay between moves during @samp{Load Game}. Fractional seconds
1743 are allowed; try @samp{-td 0.4}. A time delay value of -1 tells
1744 XBoard not to step through game files automatically. Default: 1
1745 second.
1746 @item -sgf or -saveGameFile file
1747 @cindex sgf, option
1748 @cindex saveGameFile, option
1749 If this option is set, XBoard appends a record of every game
1750 played to the specified file. The file name @file{-} specifies the
1751 standard output.
1752 @item -autosave/-xautosave or -autoSaveGames true/false
1753 @cindex autosave, option
1754 @cindex autoSaveGames, option
1755 Sets the Auto Save menu option.  @xref{Options Menu}.  Default: false.
1756 Ignored if @code{saveGameFile} is set.
1757 @item -lpf or -loadPositionFile file
1758 @itemx -lpi or -loadPositionIndex index
1759 @cindex lpf, option
1760 @cindex loadPositionFile, option
1761 @cindex lpi, option
1762 @cindex loadPositionIndex, option
1763 If the @code{loadPositionFile} option is set, XBoard loads the
1764 specified position file at startup. The file name @file{-} specifies the
1765 standard input. If the @code{loadPositionIndex} option is set to N,
1766 the Nth position found in the file is loaded; otherwise the
1767 first position is loaded.
1768 If the loadPositionIndex specifies an index -1, this triggers auto-increment
1769 of the index in @code{matchMode}, which means that after every game the
1770 index is incremented by one, causing each game of the match to be played
1771 from the next position in the file. Similarly, specifying an index value of -2
1772 causes the index to be incremented every two games, so that each position
1773 in the file is used twice (with the engines playing opposite colors).
1774 The @code{rewindIndex} option causes the index to be reset to the
1775 first position of the file when it has reached a specified value.
1776 @item -spf or -savePositionFile file
1777 @cindex spf, option
1778 @cindex savePositionFile, option
1779 If this option is set, XBoard appends the final position reached
1780 in every game played to the specified file. The file name @file{-}
1781 specifies the standard output.
1782 @item -pgnExtendedInfo true/false
1783 @cindex pgnExtendedInfo, option`
1784 If this option is set, WinBoard saves depth, score and time used for each 
1785 move that the engine found as a comment in the PGN file.
1786 Default: false.
1787 @item -pgnEventHeader string
1788 @cindex pgnEventHeader, option`
1789 Sets the name used in the PGN event tag to string. 
1790 Default: "Computer Chess Game".
1791 @item -saveOutOfBookInfo true/false
1792 @cindex saveOutOfBookInfo, option`
1793 Include the information on how the engine(s) game out of its opening book in a special 'annotator' tag with the PGN file.
1794 @item -oldsave/-xoldsave or -oldSaveStyle true/false
1795 @cindex oldsave, option
1796 @cindex oldSaveStyle, option
1797 Sets the Old Save Style menu option.  @xref{Options Menu}.  Default: false.
1798 @item -gameListTags string
1799 @cindex gameListTags, option
1800 The character string lists the PGN tags that should be printed in the
1801 Game List, and their order. The meaning of the codes is e=event,
1802 s=site, d=date, o=round, p=players, r=result, w=white Elo, b=black Elo,
1803 t=time control, v=variant, a=out-of-book info.
1804 Default: "eprd"
1805 @end table
1806
1807 @node User interface options
1808 @section User interface options
1809 @cindex User interface options
1810 @cindex Options, User interface
1811 @table @asis
1812 @item -display
1813 @itemx -geometry
1814 @itemx -iconic
1815 @cindex display, option
1816 @cindex geometry, option
1817 @cindex iconic, option
1818 These and most other standard Xt options are accepted.
1819 @item -noGUI
1820 @cindex noGUI, option
1821 Suppresses all GUI functions of XBoard 
1822 (to speed up automated ultra-fast engine-engine games, which you donÂ’t want to watch). 
1823 There will be no board or clock updates, no printing of moves, 
1824 and no update of the icon on the task bar in this mode.
1825 @item -movesound/-xmovesound or -ringBellAfterMoves true/false
1826 @cindex movesound, option
1827 @cindex bell, option
1828 @cindex ringBellAfterMoves, option
1829 Sets the Move Sound menu option.  @xref{Options Menu}.  Default: false.
1830 For compatibility with old XBoard versions, -bell/-xbell are also 
1831 accepted as abbreviations for this option.
1832 @item -exit/-xexit or -popupExitMessage true/false
1833 @cindex exit, option
1834 @cindex popupExitMessage, option
1835 Sets the Popup Exit Message menu option.  @xref{Options Menu}. Default: true.
1836 @item -popup/-xpopup or -popupMoveErrors true/false
1837 @cindex popup, option
1838 @cindex popupMoveErrors, option
1839 Sets the Popup Move Errors menu option.  @xref{Options Menu}. Default: false.
1840 @item -queen/-xqueen or -alwaysPromoteToQueen true/false
1841 @cindex queen, option
1842 @cindex alwaysPromoteToQueen, option
1843 Sets the Always Queen menu option.  @xref{Options Menu}.  Default: false.
1844 @item -legal/-xlegal or -testLegality true/false
1845 @cindex legal, option
1846 @cindex testLegality, option
1847 Sets the Test Legality menu option.  @xref{Options Menu}.  Default: true.
1848 @item -size or -boardSize (sizeName | n1,n2,n3,n4,n5,n6,n7)
1849 @cindex size, option
1850 @cindex boardSize, option
1851 @cindex board size
1852 Determines how large the board will be, by selecting the pixel size
1853 of the pieces and setting a few related parameters.
1854 The sizeName can be one of: Titanic, giving 129x129 pixel pieces,
1855 Colossal 116x116, Giant 108x108, Huge 95x95, Big 87x87, Large 80x80, Bulky 72x72,
1856 Medium 64x64, Moderate 58x58, Average 54x54, Middling 49x49, Mediocre
1857 45x45, Small 40x40, Slim 37x37, Petite 33x33, Dinky 29x29, Teeny 25x25,
1858 or Tiny 21x21.
1859 Pieces of all these sizes are built into XBoard.
1860 Other sizes can
1861 be used if you have them; see the pixmapDirectory and bitmapDirectory
1862 options.
1863 The default depends on the size of your screen; it is approximately the
1864 largest size that will fit without clipping.
1865
1866 You can select other sizes or vary other layout parameters by providing
1867 a list of comma-separated values (with no spaces) as the argument.
1868 You do not need to provide all the values; for any you omit from the
1869 end of the list, defaults are taken from the nearest built-in size.
1870 The value @code{n1} gives the piece size, @code{n2} the width of the
1871 black border
1872 between squares, @code{n3} the desired size for the 
1873 clockFont, @code{n4} the desired size for the coordFont,
1874 @code{n5} the desired size for the default font,
1875 @code{n6} the smallLayout flag (0 or 1), 
1876 and @code{n7} the tinyLayout flag (0 or 1).  
1877 All dimensions are in pixels.
1878 If the border between squares is eliminated (0 width), the various
1879 highlight options will not work, as there is nowhere to draw the highlight.
1880 If smallLayout is 1 and @code{titleInWindow} is true, 
1881 the window layout is rearranged to make more room for the title.
1882 If tinyLayout is 1, the labels on the menu bar are abbreviated
1883 to one character each and the buttons in the button bar are made narrower.
1884 @item -coords/-xcoords or -showCoords true/false
1885 @cindex coords, option
1886 @cindex showCoords, option
1887 Sets the Show Coords menu option.  @xref{Options Menu}.  Default: false.
1888 The @code{coordFont} option specifies what font to use.
1889 @item -autoraise/-xautoraise or -autoRaiseBoard true/false
1890 @cindex autoraise, option
1891 @cindex autoRaiseBoard, option
1892 Sets the Auto Raise Board menu option.  @xref{Options Menu}.  Default: true.
1893 @item -autoflip/-xautoflip or -autoFlipView true/false
1894 @cindex autoflip, option
1895 @cindex autoFlipView, option
1896 Sets the Auto Flip View menu option.  @xref{Options Menu}.  Default: true.
1897 @item -flip/-xflip or -flipView true/false
1898 @cindex flip, option
1899 @cindex flipView, option
1900 If Auto Flip View is not set, or if you are observing but not participating
1901 in a game, then the positioning of the board at the start of each game
1902 depends on the flipView option.  If flipView is false (the default),
1903 the board is positioned so that the white pawns move from the bottom to the
1904 top; if true, the black pawns move from the bottom to the top.
1905 In any case, the Flip menu option (see @ref{Options Menu})
1906 can be used to flip the board after
1907 the game starts.
1908 @item -title/-xtitle or -titleInWindow true/false
1909 @cindex title, option
1910 @cindex titleInWindow, option
1911 If this option is true, XBoard displays player names (for ICS
1912 games) and game file names (for @samp{Load Game}) inside its main
1913 window. If the option is false (the default), this information is
1914 displayed only in the window banner. You probably won't want to
1915 set this option unless the information is not showing up in the
1916 banner, as happens with a few X window managers.
1917 @item -buttons/-xbuttons or -showButtonBar True/False
1918 @cindex buttons, option
1919 @cindex showButtonBar, option
1920 If this option is False, xboard omits the [<<] [<] [P] [>] [>>] button
1921 bar from the window, allowing the message line to be wider.  You can
1922 still get the functions of these buttons using the menus or their keyboard
1923 shortcuts.  Default: true.
1924 @item -mono/-xmono or -monoMode true/false
1925 @cindex mono, option
1926 @cindex monoMode, option
1927 Determines whether XBoard displays its pieces and squares with
1928 two colors (true) or four (false). You shouldn't have to
1929 specify @code{monoMode}; XBoard will determine if it is necessary.
1930 @item -flashCount count
1931 @itemx -flashRate rate
1932 @itemx -flash/-xflash
1933 @cindex flashCount, option
1934 @cindex flashRate, option
1935 @cindex flash, option
1936 @cindex xflash, option
1937 These options enable flashing of pieces when they
1938 land on their destination square.
1939 @code{flashCount}
1940 tells XBoard how many times to flash a piece after it
1941 lands on its destination square.
1942 @code{flashRate}
1943 controls the rate of flashing (flashes/sec).
1944 Abbreviations:
1945 @code{flash}
1946 sets flashCount to 3.
1947 @code{xflash}
1948 sets flashCount to 0.
1949 Defaults:  flashCount=0 (no flashing), flashRate=5.
1950 @item -highlight/-xhighlight or -highlightLastMove true/false
1951 @cindex highlight, option
1952 @cindex highlightLastMove, option
1953 Sets the Highlight Last Move menu option. @xref{Options Menu}. Default: false.
1954 @item -blind/-xblind or -blindfold true/false
1955 @cindex blind, option
1956 @cindex blindfold, option
1957 Sets the Blindfold menu option.  @xref{Options Menu}.  Default: false.
1958 @item -clockFont font
1959 @cindex clockFont, option
1960 @cindex Font, clock
1961 The font used for the clocks. If the option value is a pattern
1962 that does not specify the font size, XBoard tries to choose an
1963 appropriate font for the board size being used.
1964 Default: -*-helvetica-bold-r-normal--*-*-*-*-*-*-*-*.
1965 @item -coordFont font
1966 @cindex coordFont, option
1967 @cindex Font, coordinates
1968 The font used for rank and file coordinate labels if @code{showCoords}
1969 is true. If the option value is a pattern that does not specify
1970 the font size, XBoard tries to choose an appropriate font for
1971 the board size being used.
1972 Default: -*-helvetica-bold-r-normal--*-*-*-*-*-*-*-*.
1973 @item -font font
1974 @cindex font, option
1975 @cindex Font
1976 The font used for popup dialogs, menus, comments, etc.
1977 If the option value is a pattern that does not specify
1978 the font size, XBoard tries to choose an appropriate font for
1979 the board size being used.
1980 Default: -*-helvetica-medium-r-normal--*-*-*-*-*-*-*-*.
1981 @item -fontSizeTolerance tol
1982 @cindex fontSizeTolerance, option
1983 In the font selection algorithm, a nonscalable font will be preferred
1984 over a scalable font if the nonscalable font's size differs
1985 by @code{tol} pixels
1986 or less from the desired size.  A value of -1 will force
1987 a scalable font to always be used if available; a value of 0 will
1988 use a nonscalable font only if it is exactly the right size; 
1989 a large value (say 1000) will force a nonscalable font to always be
1990 used if available.  Default: 4.
1991 @item -bm or -bitmapDirectory dir
1992 @itemx -pixmap or -pixmapDirectory dir
1993 @cindex bm, option
1994 @cindex bitmapDirectory, option
1995 @cindex pixmap, option
1996 @cindex pixmapDirectory, option
1997 These options control what piece images xboard uses.  The XBoard
1998 distribution includes one set of pixmap pieces in xpm format, in the
1999 directory @file{pixmaps}, and one set of bitmap pieces in xbm format,
2000 in the directory @file{bitmaps}.  Pixmap
2001 pieces give a better appearance on the screen: the white pieces have
2002 dark borders, and the black pieces have opaque internal details.  With
2003 bitmaps, neither piece color has a border, and the internal details
2004 are transparent; you see the square color or other background color
2005 through them.
2006
2007 If XBoard is configured and compiled on a system that includes libXpm,
2008 the X pixmap library, the xpm pixmap pieces are compiled in as the
2009 default.  A different xpm piece set can be selected at runtime with
2010 the @code{pixmapDirectory} option, or a bitmap piece set can be selected
2011 with the @code{bitmapDirectory} option.
2012
2013 If XBoard is configured and compiled on a system that does not include
2014 libXpm (or the @code{--disable-xpm} option is given to the configure
2015 program), the bitmap pieces are compiled in as the default.  It is not
2016 possible to use xpm pieces in this case, but pixmap pieces in another
2017 format called "xim" can be used by giving the @code{pixmapDirectory} option.
2018 Or again, a different bitmap piece set can be selected with the
2019 @code{bitmapDirectory} option.
2020
2021 Files in the @code{bitmapDirectory} must be named as follows:
2022 The first character of a piece bitmap name gives the piece it 
2023 represents (@samp{p}, @samp{n}, @samp{b}, @samp{r}, @samp{q}, or @samp{k}),
2024 the next characters give the size in pixels, the
2025 following character indicates whether the piece is
2026 solid or outline (@samp{s} or @samp{o}),
2027 and the extension is @samp{.bm}.
2028 For example, a solid 80x80 knight would be named @file{n80s.bm}.
2029 The outline bitmaps are used only in monochrome mode.
2030 If bitmap pieces are compiled in and the bitmapDirectory is missing
2031 some files, the compiled in pieces are used instead.
2032
2033 If the bitmapDirectory option is given,
2034 it is also possible to replace xboard's icons and menu checkmark,
2035 by supplying files named @file{icon_white.bm}, @file{icon_black.bm}, and
2036 @file{checkmark.bm}.
2037
2038 For more information about pixmap pieces and how to get additional
2039 sets, see @ref{zic2xpm} below.
2040 @item -whitePieceColor color
2041 @itemx -blackPieceColor color
2042 @itemx -lightSquareColor color
2043 @itemx -darkSquareColor color
2044 @itemx -highlightSquareColor color
2045 @itemx -lowTimeWarningColor color
2046 @cindex Colors
2047 @cindex whitePieceColor, option
2048 @cindex blackPieceColor, option
2049 @cindex lightSquareColor, option
2050 @cindex darkSquareColor, option
2051 @cindex highlightSquareColor, option
2052 @cindex lowTimeWarningColor, option
2053 Colors to use for the pieces, squares, and square highlights.
2054 Defaults:
2055
2056 @example
2057 -whitePieceColor       #FFFFCC
2058 -blackPieceColor       #202020
2059 -lightSquareColor      #C8C365
2060 -darkSquareColor       #77A26D
2061 -highlightSquareColor  #FFFF00
2062 -premoveHighlightColor #FF0000
2063 -lowTimeWarningColor   #FF0000
2064 @end example
2065
2066 On a grayscale monitor you might prefer:
2067
2068 @example
2069 -whitePieceColor       gray100
2070 -blackPieceColor       gray0
2071 -lightSquareColor      gray80
2072 -darkSquareColor       gray60
2073 -highlightSquareColor  gray100
2074 -premoveHighlightColor gray70
2075 -lowTimeWarningColor   gray70
2076 @end example
2077 @item -drag/-xdrag or -animateDragging true/false
2078 @cindex drag, option
2079 @cindex animateDragging, option
2080 Sets the Animate Dragging menu option. @xref{Options Menu}.  Default: true.
2081 @item -animate/-xanimate or -animateMoving true/false
2082 @cindex animate, option
2083 @cindex animateMoving, option
2084 Sets the Animate Moving menu option. @xref{Options Menu}.  Default: true.
2085 @item -animateSpeed n
2086 @cindex -animateSpeed, option
2087 Number of milliseconds delay between each animation frame when Animate
2088 Moves is on.
2089 @end table
2090
2091 @node Adjudication Options
2092 @section Adjudication Options
2093 @cindex Options, adjudication
2094 @table @asis
2095 @item -adjudicateLossThreshold n
2096 @cindex adjudicateLossThreshold, option
2097 If the given value is non-zero, XBoard adjudicates the game as a loss 
2098 if both engines agree for a duration of 6 consecutive ply that the score 
2099 is below the given score threshold for that engine. Make sure the score 
2100 is interpreted properly by XBoard, 
2101 using @code{-firstScoreAbs} and @code{-secondScoreAbs} if needed. 
2102 Default: 0 (no adjudication)
2103 @item -adjudicateDrawMoves n
2104 @cindex adjudicateDrawMoves, option
2105 If the given value is non-zero, XBoard adjudicates the game as a draw 
2106 if after the given number of moves it was not yet decided. Default: 0 (no adjudication)
2107 @item -checkMates true/false
2108 @cindex checkMates, option
2109 If this option is set, XBoard detects all checkmates and stalemates, 
2110 and ends the game as soon as they occur. 
2111 Legality-testing must be switched on for this option to work.
2112 Default: true
2113 @item -testClaims true/false
2114 @cindex testClaims, option
2115 If this option is set, XBoard verifies all result claims made by engines, 
2116 and those who send false claims will forfeit the game because of it. 
2117 Legality-testing must be switched on for this option to work. Default: true
2118 @item -materialDraws true/false
2119 @cindex materialDraws, option
2120 If this option is set, XBoard adjudicates games as draws when there is 
2121 no sufficient material left to inflict a checkmate. 
2122 This applies to KBKB with like bishops (any number, actually), and to KBK, KNK and KK. 
2123 Legality-testing must be switched on for this option to work. Default: true
2124 @item -trivialDraws true/false
2125 @cindex trivialDraws, option
2126 If this option is set, XBoard adjudicates games as draws that cannot be 
2127 usually won without opponent cooperation. This applies to KBKB with unlike bishops, 
2128 and to KBKN, KNKN, KNNK, KRKR and KQKQ. The draw is called after 6 ply into these end-games, 
2129 to allow quick mates that can occur in some exceptional positions to be found by the engines. 
2130 KQKQ does not really belong in this category, and might be taken out in the future. 
2131 (When bitbase-based adjudications are implemented.) 
2132 Legality-testing must be on for this option to work. Default: false
2133 @item -ruleMoves n
2134 @cindex ruleMoves, option
2135 If the given value is non-zero, XBoard adjudicates the game as a draw after the given 
2136 number of consecutive reversible moves. Engine draw claims are always accepted after 50 moves, 
2137 irrespective of the given value of n.
2138 @item -repeatsToDraw n
2139 If the given value is non-zero, xboard adjudicates the game as a draw if a position 
2140 is repeated the given number of times. Engines draw claims are always accepted after 3 repeats, 
2141 (on the 3rd occurrence, actually), irrespective of the value of n. 
2142 Beware that positions that have different castling or en-passant rights do not count 
2143 as repeats, XBoard is fully e.p. and castling aware!
2144 @end table
2145
2146 @node Other options
2147 @section Other options
2148 @cindex Options, miscellaneous
2149 @table @asis
2150 @item -ncp/-xncp or -noChessProgram true/false
2151 @cindex ncp, option
2152 @cindex noChessProgram, option
2153 If this option is true, XBoard acts as a passive chessboard; it
2154 does not start a chess engine at all. Turning on this option
2155 also turns off clockMode. Default: false.
2156 @item -mode or -initialMode modename
2157 @cindex mode, option
2158 @cindex initalMode, option
2159 If this option is given, XBoard selects the given modename
2160 from the Mode menu after starting and (if applicable) processing the
2161 loadGameFile or loadPositionFile option. Default: "" (no selection). 
2162 Other supported values are 
2163 MachineWhite, MachineBlack, TwoMachines, Analysis, 
2164 AnalyzeFile, EditGame, EditPosition, and Training.
2165 @item -variant varname
2166 @cindex variant, option
2167 Activates preliminary, partial support for playing chess variants
2168 against a local engine or editing variant games.  This flag is not
2169 needed in ICS mode.  Recognized variant names are:
2170
2171 @example
2172 normal        Normal chess
2173 wildcastle    Shuffle chess, king can castle from d file
2174 nocastle      Shuffle chess, no castling allowed
2175 fischerandom  Fischer Random shuffle chess
2176 bughouse      Bughouse, ICC/FICS rules
2177 crazyhouse    Crazyhouse, ICC/FICS rules
2178 losers        Lose all pieces or get mated (ICC wild 17)
2179 suicide       Lose all pieces including king (FICS)
2180 giveaway      Try to have no legal moves (ICC wild 26)
2181 twokings      Weird ICC wild 9
2182 kriegspiel    Opponent's pieces are invisible
2183 atomic        Capturing piece explodes (ICC wild 27)
2184 3check        Win by giving check 3 times (ICC wild 25)
2185 shatranj      An ancient precursor of chess (ICC wild 28)
2186 xiangqi       Chinese Chess (on a 9x10 board)
2187 shogi         Japanese Chess (on a 9x9 board & piece drops) 
2188 capablanca    Capablanca Chess (10x8 board, with Archbishop 
2189               and Chancellor pieces)
2190 gothic        similar, with a better initial position
2191 caparandom    An FRC-like version of Capablanca Chess (10x8) 
2192 janus         A game with two Archbishops (10x8 board)
2193 courier       Medieval intermediate between shatranj and 
2194               modern Chess (on 12x8 board) 
2195 falcon        Patented 10x8 variant with two Falcon pieces
2196 berolina      Pawns capture straight ahead, and move diagonal 
2197 cylinder      Pieces wrap around the board edge
2198 knightmate    King moves as Knight, and vice versa 
2199 super         Superchess (shuffle variant with 4 exo-pieces)
2200 fairy         A catchall variant in which all piece types 
2201               known to XBoard can participate (8x8)
2202 unknown       Catchall for other unknown variants
2203 @end example
2204
2205 NOT ALL BOARDSIZES PROVIDE A COMPLETE SET OF BUILT-IN BITMAPS FOR ALL
2206 UN-ORTHODOX PIECES, though. Only in @code{boardSize} middling and bulky
2207 all 22 piece types are provided, while -boardSize petite has most
2208 of them. Archbishop, Chancellor and Amazon are supported in every
2209 size from petite to bulky. Kings or Amazons are substituted for
2210 missing bitmaps. You can still play variants needing un-orthodox
2211 pieces in other board sizes providing your own bitmaps through the
2212 @code{bitmapDirectory} or @code{pixmapDirectory} options.
2213
2214 In the shuffle variants, XBoard now does shuffle the pieces, although
2215 you can still do it by hand using Edit Position.  Some variants are
2216 supported only in ICS mode, including bughouse, and
2217 kriegspiel.  The winning/drawing conditions in crazyhouse (off-board
2218 interposition on mate) are not fully understood, but losers, suicide, 
2219 giveaway, atomic, and 3check should be OK.
2220 Berolina and cylinder chess can only be played with legality testing off.
2221 In crazyhouse, XBoard now does keep
2222 track of off-board pieces.  In shatranj it does implement the baring
2223 rule when mate detection is switched on.
2224 @item -boardHeight N
2225 @cindex boardHeight, option
2226 Allows you to set a non-standard number of board ranks in any variant. 
2227 If the height is given as -1, the default height for the variant is used.
2228 Default: -1
2229 @item -boardWidth N
2230 @cindex boardWidth, option
2231 Allows you to set a non-standard number of board files in any variant. 
2232 If the width is given as -1, the default width for the variant is used. 
2233 With a non-standard width, the initial position will always be an empty board, 
2234 as the usual opening array will not fit.
2235 Default: -1
2236 @item -holdingsSize N
2237 @cindex holdingsSize, option
2238 Allows you to set a non-standard size for the holdings in any variant. 
2239 If the size is given as -1, the default holdings size for the variant is used. 
2240 The first N piece types will go into the holdings on capture, and you will be 
2241 able to drop them on the board in stead of making a normal move. If size equals 0, 
2242 there will be no holdings.
2243 Default: -1
2244 @item -defaultFrcPosition N
2245 @cindex defaultFrcPosition, option
2246 Specifies the number of the opening position in shuffle games like Chess960. 
2247 A value of -1 means the position is randomly generated by XBoard
2248 at the beginning of every game.
2249 Default: -1
2250 @item -pieceToSquareTable string
2251 @cindex pieceToSquareTable, option
2252 The characters that are used to represent the piece types XBoard knows in FEN 
2253 diagrams and SAN moves. The string argument has to have an even length 
2254 (or it will be ignored), as white and black pieces have to be given separately 
2255 (in that order). The last letter for each color will be the King. 
2256 The letters before that will be PNBRQ and then a whole host of fairy pieces 
2257 in an order that has not fully crystallized yet (currently FEACWMOHIJGDVSLU, 
2258 F=Ferz, Elephant, A=Archbishop, C=Chancellor, W=Wazir, M=Commoner, O=Cannon, 
2259 H=Nightrider). You should list at least all pieces that occur in the variant 
2260 you are playing. If you have less than 44 characters in the string, the pieces 
2261 not mentioned will get assigned a period, and you will not be able to distinguish 
2262 them in FENs. You can also explicitly assign pieces a period, in which case they 
2263 will not be counted in deciding which captured pieces can go into the holdings.
2264 A tilde '~' as a piece name does mean this piece is used to represent a promoted 
2265 Pawn in crazyhouse-like games, i.e. on capture it turns back onto a Pawn. 
2266 A '+' similarly indicates the piece is a shogi-style promoted piece, that should 
2267 revert to its non-promoted version on capture (rather than to a Pawn).
2268 Note that promoted pieces are represented by pieces 11 further in the list.
2269 You should not have to use this option often: each variant has its own default 
2270 setting for the piece representation in FEN, which should be sufficient in normal use.
2271 Default: ""
2272 @item -debug/-xdebug or -debugMode true/false
2273 @cindex debug, option
2274 @cindex debugMode, option
2275 Turns on debugging printout.
2276 @item -debugFile filename or -nameOfDebugFile filename
2277 @cindex debugFile, option
2278 @cindex nameOfDebugFile, option
2279 Sets the name of the file to which WinBoard saves debug information 
2280 (including all communication to and from the engines).
2281 @item -engineDebugOutput number
2282 @cindex engineDebugOutput, option
2283 Specifies how WinBoard should handle unsolicited output from the engine, 
2284 with respect to saving it in the debug file. 
2285 The output is further (hopefully) ignored. 
2286 If number=0, WinBoard refrains from writing such spurious output to the debug file. 
2287 If number=1, all engine output is written faithfully to the debug file. 
2288 If number=2, any protocol-violating line is prefixed with a '#' character, 
2289 as the engine itself should have done if it wanted to submit info for inclusion in the debug file.
2290 This option is provided for the benefit of applications that use the debug file 
2291 as a source of information, such as the broadcaster of live games TLCV / TLCS. 
2292 Such applications can be protected from spurious engine output that might otherwise confuse them.
2293 @item -rsh or -remoteShell shell-name
2294 @cindex rsh, option
2295 @cindex remoteShell, option
2296 Name of the command used to run programs remotely. The default
2297 is @file{rsh} or @file{remsh}, determined when XBoard is
2298 configured and compiled.
2299 @item -ruser or -remoteUser user-name
2300 @cindex ruser, option
2301 @cindex remoteUser, option
2302 User name on the remote system when running programs with the
2303 @code{remoteShell}. The default is your local user name.
2304 @item -userName username
2305 @cindex userName, option
2306 Name under which the Human player will be listed in the PGN file. 
2307 Default is the login name on your local computer.
2308 @item -delayBeforeQuit number
2309 @itemx -delayAfterQuit number
2310 @cindex delayBeforeQuit, option
2311 @cindex delayAfterQuit, option
2312 These options specify how long WinBoard has to wait before sending a termination signal to rogue engine processes, that do not want to react to the 'quit' command. The second one determines the pause after killing the engine, to make sure it dies.
2313
2314 @end table
2315
2316 @node Chess Servers
2317 @chapter Chess Servers
2318 @cindex ICS
2319 @cindex ICS, addresses
2320 @cindex Internet Chess Server
2321 An @dfn{Internet Chess Server}, or @dfn{ICS}, is a place on the
2322 Internet where people can get together to play chess, watch other
2323 people's games, or just chat.  You can use either @code{telnet} or a
2324 client program like XBoard to connect to the server.  There are
2325 thousands of registered users on the different ICS hosts, and it is
2326 not unusual to meet 200 on both chessclub.com and freechess.org.
2327
2328 Most people can just type @kbd{xboard -ics} to start XBoard as an ICS
2329 client.  Invoking XBoard in this way connects you to the Internet
2330 Chess Club (ICC), a commercial ICS.  You can log in there as a guest
2331 even if you do not have a paid account.  To connect to the largest
2332 Free ICS (FICS), use the command @kbd{xboard -ics -icshost freechess.org}
2333 instead, or substitute a different host name to connect to your
2334 favorite ICS.
2335 For a full description of command-line options that control 
2336 the connection to ICS and change the default values of ICS options, see
2337 @ref{ICS options}.  
2338
2339 While you are running XBoard as an ICS client,
2340 you use the terminal window that you started XBoard from
2341 as a place to type in commands and read information that is
2342 not available on the chessboard.
2343
2344 The first time you need to use the terminal is to enter your login name
2345 and password, if you are a registered player. (You don't need to do
2346 this manually; the @code{icsLogon} option can do it for you.
2347 @pxref{ICS options}.)  If you are not registered, 
2348 enter @kbd{g} as your name, and the server will pick a
2349 unique guest name for you.
2350
2351 Some useful ICS commands
2352 include
2353 @table @kbd
2354 @item help <topic>
2355 @cindex help, ICS command
2356 to get help on the given <topic>. To get a list of possible topics type
2357 @dfn{help} without topic.  Try the help command before you ask other
2358 people on the server for help.
2359
2360 For example @kbd{help register} tells you how to become a registered
2361 ICS player.
2362 @item who <flags>
2363 @cindex who, ICS command
2364 to see a list of people who are logged on.  Administrators
2365 (people you should talk to if you have a problem) are marked
2366 with the character @samp{*}, an asterisk. The <flags> allow you to
2367 display only selected players: For example, @kbd{who of} shows a
2368 list of players who are interested in playing but do not have
2369 an opponent.
2370 @item games
2371 @cindex games, ICS command
2372 to see what games are being played
2373 @item match <player> [<mins>] [<inc>]
2374 to challenge another player to a game. Both opponents get <mins> minutes
2375 for the game, and <inc> seconds will be added after each move.
2376 If another player challenges you, the server asks if you want to
2377 accept the challenge; use the @kbd{accept} or @kbd{decline} commands
2378 to answer.
2379 @item accept
2380 @itemx decline
2381 @cindex accept, ICS command
2382 @cindex decline, ICS command
2383 to accept or decline another player's offer. 
2384 The offer may be to start a new game, or to agree to a 
2385 @kbd{draw}, @kbd{adjourn} or @kbd{abort} the current game. @xref{Action Menu}.
2386
2387 If you have more than one pending offer (for example, if more than one player
2388 is challenging you, or if your opponent offers both a draw and to adjourn the
2389 game), you have to supply additional information, by typing something
2390 like @kbd{accept <player>}, @kbd{accept draw}, or @kbd{draw}.
2391 @item draw
2392 @itemx adjourn
2393 @itemx abort
2394 @cindex draw, ICS command
2395 @cindex adjourn, ICS command
2396 @cindex abort, ICS command
2397 asks your opponent to terminate a game by mutual agreement. Adjourned
2398 games can be continued later. 
2399 Your opponent can either @kbd{decline} your offer or accept it (by typing the
2400 same command or typing @kbd{accept}).  In some cases these commands work
2401 immediately, without asking your opponent to agree.  For example, you can
2402 abort the game unilaterally if your opponent is out of time, and you can claim
2403 a draw by repetition or the 50-move rule if available simply by typing 
2404 @kbd{draw}.
2405 @item finger <player>
2406 @cindex finger, ICS command
2407 to get information about the given <player>. (Default: yourself.)
2408 @item vars
2409 @cindex vars, ICS command
2410 to get a list of personal settings
2411 @item set <var> <value>
2412 @cindex set, ICS command
2413 to modify these settings
2414 @item observe <player>
2415 @cindex observe, ICS command
2416 to observe an ongoing game of the given <player>.
2417 @item examine
2418 @itemx oldmoves
2419 @cindex examine, ICS command
2420 @cindex oldmoves, ICS command
2421 to review a recently completed game
2422 @end table
2423
2424 Some special XBoard features are activated when you are
2425 in examine mode on ICS.  See the descriptions of the menu commands
2426 @samp{Forward}, @samp{Backward}, @samp{Pause}, @samp{ICS Client}, 
2427 and @samp{Stop Examining} on the @ref{Step Menu}, @ref{Mode Menu}, and
2428 @ref{Options Menu}.
2429
2430 @node Firewalls
2431 @chapter Firewalls
2432 By default, XBoard communicates with an Internet Chess Server
2433 by opening a TCP socket directly from the machine it is running on
2434 to the ICS. If there is a firewall between your machine and the ICS,
2435 this won't work. Here are some recipes for getting around common
2436 kinds of firewalls using special options to XBoard.
2437 Important: See the paragraph in the below about extra echoes, in
2438 @ref{Limitations}.
2439
2440 Suppose that you can't telnet directly to ICS, but you can telnet
2441 to a firewall host, log in, and then telnet from there to ICS.
2442 Let's say the firewall is called @samp{firewall.example.com}. Set
2443 command-line options as follows:
2444
2445 @example
2446 xboard -ics -icshost firewall.example.com -icsport 23
2447 @end example
2448 @noindent
2449 Or in your @file{.Xresources} file:
2450
2451 @example
2452 XBoard*internetChessServerHost: firewall.example.com
2453 XBoard*internetChessServerPort: 23
2454 @end example
2455 @noindent
2456 Then when you run XBoard in ICS mode, you will be prompted
2457 to log in to the firewall host. This works because port 23 is the
2458 standard telnet login service. Do so, then telnet to ICS, using a
2459 command like @samp{telnet chessclub.com 5000}, or whatever command
2460 the firewall provides for telnetting to port 5000.
2461
2462 If your firewall lets you telnet (or rlogin) to remote hosts but
2463 doesn't let you telnet to port 5000, you may be able to connect to the
2464 chess server on port 23 instead, which is the port the telnet program
2465 uses by default.  Some chess servers support this (including
2466 chessclub.com and freechess.org), while some do not.
2467
2468 If your chess server does not allow connections on port 23 and your
2469 firewall does not allow you to connect to other ports, you may be able
2470 to connect by hopping through another host outside the firewall that
2471 you have an account on.  For instance, suppose you have a shell
2472 account at @samp{foo.edu}. Follow the recipe above, but instead of
2473 typing @samp{telnet chessclub.com 5000} to the firewall, type
2474 @samp{telnet foo.edu} (or @samp{rlogin foo.edu}), log in there, and
2475 then type @samp{telnet chessclub.com 5000}.
2476
2477 Suppose that you can't telnet directly to ICS, but you can use rsh
2478 to run programs on a firewall host, and that host can telnet to ICS.
2479 Let's say the firewall is called @samp{rsh.example.com}. Set
2480 command-line options as follows:
2481
2482 @example
2483 xboard -ics -gateway rsh.example.com -icshost chessclub.com
2484 @end example
2485
2486 @noindent
2487 Or in your @file{.Xresources} file:
2488
2489 @example
2490 XBoard*gateway: rsh.example.com
2491 XBoard*internetChessServerHost: chessclub.com
2492 @end example
2493
2494 Then when you run XBoard in ICS mode, it will connect to
2495 the ICS by using @file{rsh} to run the command
2496 @samp{telnet chessclub.com 5000} on host @samp{rsh.example.com}.
2497
2498 Suppose that you can telnet anywhere you want, but you have to
2499 run a special program called @file{ptelnet} to do so.
2500
2501 First, we'll consider the easy case, in which
2502 @samp{ptelnet chessclub.com 5000} gets you to the chess server.
2503 In this case set command line options as follows:
2504
2505 @example
2506 xboard -ics -telnet -telnetProgram ptelnet
2507 @end example
2508
2509 @noindent
2510 Or in your @file{.Xresources} file:
2511
2512 @example
2513 XBoard*useTelnet: true
2514 XBoard*telnetProgram: ptelnet
2515 @end example
2516
2517 @noindent
2518 Then when you run XBoard in ICS mode, it will issue the
2519 command @samp{ptelnet chessclub.com 5000} to connect to the ICS.
2520
2521 Next, suppose that @samp{ptelnet chessclub.com 5000} doesn't work;
2522 that is, your @file{ptelnet} program doesn't let you connect to
2523 alternative ports. As noted above, your chess server may allow you to
2524 connect on port 23 instead.  In that case, just add the option
2525 @samp{-icsport ""} to the above command, or add
2526 @samp{XBoard*internetChessServerPort:} to your @file{.Xresources} file.
2527 But if your chess server doesn't let you connect on port 23, you will have
2528 to find some other host outside the firewall and hop through it. For
2529 instance, suppose you have a shell account at @samp{foo.edu}. Set
2530 command line options as follows:
2531
2532 @example
2533 xboard -ics -telnet -telnetProgram ptelnet -icshost foo.edu -icsport ""
2534 @end example
2535
2536 @noindent
2537 Or in your @file{.Xresources} file:
2538
2539 @example
2540 XBoard*useTelnet: true
2541 XBoard*telnetProgram: ptelnet
2542 XBoard*internetChessServerHost: foo.edu
2543 XBoard*internetChessServerPort:
2544 @end example
2545
2546 @noindent
2547 Then when you run XBoard in ICS mode, it will issue the
2548 command @samp{ptelnet foo.edu} to connect to your account at
2549 @samp{foo.edu}. Log in there, then type @samp{telnet chessclub.com 5000}.
2550
2551 ICC timestamp and FICS timeseal do not work through some
2552 firewalls.  You can use them only if your firewall gives a clean TCP
2553 connection with a full 8-bit wide path.  If your firewall allows you
2554 to get out only by running a special telnet program, you can't use
2555 timestamp or timeseal across it.  But if you have access to a
2556 computer just outside your firewall, and you have much lower netlag
2557 when talking to that computer than to the ICS, it might be worthwhile
2558 running timestamp there.  Follow the instructions above for hopping
2559 through a host outside the firewall (foo.edu in the example),
2560 but run timestamp or timeseal on that host instead of telnet.
2561
2562 Suppose that you have a SOCKS firewall that will give you a clean
2563 8-bit wide TCP connection to the chess server, but only after you
2564 authenticate yourself via the SOCKS protocol.  In that case, you could
2565 make a socksified version of XBoard and run that.  If you are using
2566 timestamp or timeseal, you will to socksify it, not XBoard; this may
2567 be difficult seeing that ICC and FICS do not provide source code for
2568 these programs.  Socksification is beyond the scope of this document,
2569 but see the SOCKS Web site at http://www.socks.permeo.com/.
2570 If you are missing SOCKS, try http://www.funbureau.com/.
2571
2572 @node Environment
2573 @chapter Environment variables
2574 @cindex Environment variables
2575 @cindex CHESSDIR
2576 Game and position files are found in a directory named by the
2577 @code{CHESSDIR} environment variable. If this variable is not set, the
2578 current working directory is used. If @code{CHESSDIR} is set,
2579 XBoard actually changes its working directory to
2580 @code{$CHESSDIR}, so any files written by the chess engine
2581 will be placed there too.
2582
2583 @node Limitations
2584 @chapter Limitations and known bugs
2585 @cindex Limitations
2586 @cindex Bugs
2587 There is no way for two people running copies of XBoard to play
2588 each other without going through an Internet Chess Server.
2589
2590 Under some circumstances, your ICS password may be echoed when you log on.
2591
2592 If you are connecting to the ICS by running telnet on an Internet
2593 provider or firewall host, you may find that each line you type is
2594 echoed back an extra time after you hit @key{Enter}. If your Internet
2595 provider is a Unix system, you can probably turn its echo off by
2596 typing @kbd{stty -echo} after you log in, and/or typing
2597 @key{^E}@key{Enter} (Ctrl+E followed by the Enter key) to the telnet
2598 program after you have logged into ICS.  It is a good idea to do this
2599 if you can, because the extra echo can occasionally confuse XBoard's
2600 parsing routines.
2601
2602 The game parser recognizes only algebraic notation.
2603
2604 Many of the following points used to be limitations in XBoard 4.2.7 and earlier, 
2605 but are now fixed:
2606 The internal move legality tester in XBoard 4.3.xx does look at the game history, 
2607 and is fully aware of castling or en-passant-capture rights. It permits castling with 
2608 the king on the d file because this is possible in some "wild 1" games on ICS. 
2609 The piece-drop menu does not check piece drops in bughouse to see if you actually hold 
2610 the piece you are trying to drop. But this way of dropping pieces should be considered 
2611 an obsolete feature, now that pieces can be dropped by dragging them from the holdings 
2612 to the board. Anyway, if you would attempt an illegal move when using a chess engine or the ICS, 
2613 WinBoard will accept the error message that comes back, undo the move, and let you try another.
2614 FEN positions saved by XBoard do include correct information about whether castling or 
2615 en passant are legal, and also handle the 50-move counter.
2616 The mate detector does not understand that non-contact mate is not really mate in bughouse. 
2617 The only problem this causes while playing is minor: a "#" (mate indicator) character will 
2618 show up after a non-contact mating move in the move list. XBoard will not assume the game 
2619 is over at that point, not even when the option Detect Mates is on.
2620 Edit Game mode always uses the rules of the selected variant, 
2621 which can be a variant that uses piece drops.  
2622 You can load and edit games that contain piece drops. 
2623 The (obsolete) piece menus are not active, 
2624 but you can perform piece drops by dragging pieces from the holdings.
2625 Edit Position mode does not allow you to edit the crazyhouse holdings properly. 
2626 You cannot drag pieces to the holding, and using the popup menu to put pieces 
2627 there does not adapt the holding counts and leads to an inconsistent state. 
2628 Set up crazyhouse positions by loading / pasting a bFEN, from there you can set the holdings.
2629 Fischer Random castling is fully understood. 
2630 You can enter castlings by dragging the King on top of your Rook. 
2631 You can probably also play Fischer Random successfully on ICS by typing 
2632 castling moves into the ICS Interaction window.
2633
2634 The menus may not work if your keyboard is in Caps Lock or Num Lock mode.
2635 This seems to be a problem with the Athena menu widget,
2636 not an XBoard bug.
2637
2638 Also see the ToDo file included with the distribution for many other
2639 possible bugs, limitations, and ideas for improvement that have been
2640 suggested.
2641 @node Problems
2642 @chapter Reporting problems
2643 @cindex Bugs
2644 @cindex Bug reports
2645 @cindex Reporting bugs
2646 @cindex Problems
2647 @cindex Reporting problems
2648
2649 Report bugs and problems with XBoard to @code{<bug-xboard@@gnu.org>}.
2650
2651 Please use the @file{script} program to start a typescript, run 
2652 XBoard with the @samp{-debug} option, and include the typescript
2653 output in your message.
2654 Also tell us what kind of machine and what operating system version
2655 you are using.  The command @samp{uname -a} will often tell you this.
2656 Here is a sample of approximately what you should type:
2657
2658 @example
2659 script
2660 uname -a
2661 ./configure
2662 make
2663 ./xboard -debug
2664 exit
2665 mail bug-xboard@@gnu.org
2666 Subject: Your short description of the problem
2667 Your detailed description of the problem
2668 ~r typescript
2669 .
2670 @end example
2671
2672 The WinBoard / XBoard 4.3 line is being developed by H.G. Muller 
2673 independently of the GNU Savannah xboard project. 
2674 Bug reports on this version, and suggestions for improvements and additions, 
2675 are best posted in the WinBoard forum, 
2676 WinBoard-development section (http://www.open-aurec.com/wbforum). 
2677
2678 If you improve XBoard, please send a message about your changes,
2679 and we will get in touch with you about merging them in
2680 to the main line of development.
2681 Also see our Web site at http://savannah.gnu.org/projects/xboard/.
2682
2683 @node Contributors
2684 @chapter Authors and contributors
2685 @cindex Authors
2686 @cindex Contributors
2687
2688 Tim Mann has been responsible for XBoard versions 1.3 and beyond, and
2689 for WinBoard, a port of XBoard to Microsoft Win32 (Windows NT and
2690 Windows 95). H.G.Muller is responsible for version 4.3.
2691
2692 Mark Williams contributed the initial (WinBoard-only) implementation
2693 of many new features added to both XBoard and WinBoard in version
2694 4.1.0, including copy/paste, premove, icsAlarm, autoFlipView, training
2695 mode, auto raise, and blindfold.  Ben Nye contributed X copy/paste
2696 code for XBoard.
2697
2698 Hugh Fisher added animated piece movement to XBoard, and Henrik Gram
2699 (henrikg@@funcom.com) added it to WinBoard.  Frank McIngvale added
2700 click/click moving, the Analysis modes, piece flashing, ZIICS import,
2701 and ICS text colorization to XBoard.  Jochen Wiedmann ported XBoard to
2702 the Amiga, creating AmyBoard, and converted the documentation to
2703 texinfo.  Elmar Bartel contributed the new piece bitmaps introduced in
2704 version 3.2.  John Chanak contributed the initial implementation of
2705 ICS mode.  The color scheme and the old 80x80 piece bitmaps were taken
2706 from Wayne Christopher's @code{XChess} program.
2707
2708 Chris Sears and Dan Sears wrote the original XBoard.  They were
2709 responsible for versions 1.0 through 1.2.
2710
2711 Evan Welsh wrote @code{CMail}.  Patrick Surry helped in designing,
2712 testing, and documenting CMail.
2713
2714 Alessandro Scotti added many elements to the user interface of WinBoard, 
2715 including the board textures and font-based rendering, the evaluation-graph, 
2716 move-history and engine-output window. 
2717 He was also responsible for adding the UCI support. 
2718
2719 H.G. Muller made WinBoard castling- and e.p.-aware, 
2720 added variant support with adjustable board sizes, 
2721 the crazyhouse holdings, and the fairy pieces. 
2722 In addition he added most of the adjudication options, 
2723 made WinBoard more robust in dealing with buggy and crashing engines, 
2724 and extended time control with a time-odds and node-count-based modes.
2725 Most of the options that initially were WinBoard only have now been back-ported to XBoard.
2726
2727 Michel van den Bergh provided the code for reading Polyglot opening books.
2728
2729 Arun Persaud worked with H.G. Muller to combine all the features of the never-released WinBoard 4.2.8 
2730 of the Savannah project (mainly by Daniel Mehrmann), 
2731 and the never-released 4.3.16 into a unified WinBoard 4.4, 
2732 which is now available both from the Savannah web site and the WinBoard forum.
2733 @node CMail
2734 @chapter CMail
2735 @cindex cmail
2736 The @file{cmail} program can help you play chess by email with opponents of
2737 your choice using XBoard as an interface.
2738
2739 You will usually run @file{cmail} without giving any options.
2740
2741 @menu
2742 * CMail options::    Invoking CMail.
2743 * CMail game::       Starting a CMail game.
2744 * CMail answer::     Answering a move.
2745 * CMail multi::      Multiple games in one message.
2746 * CMail completion:: Completing a game.
2747 * CMail trouble::    Known CMail problems.
2748 @end menu
2749
2750 @node CMail options
2751 @section CMail options
2752 @table @asis
2753 @item -h
2754 Displays @file{cmail} usage information.
2755 @item -c
2756 Shows the conditions of the GNU General Public License.
2757 @xref{Copying}.
2758 @item -w
2759 Shows the warranty notice of the GNU General Public License.
2760 @xref{Copying}.
2761 @item -v
2762 @itemx -xv
2763 Provides or inhibits verbose output from @file{cmail} and XBoard,
2764 useful for debugging. The
2765 @code{-xv}
2766 form also inhibits the cmail introduction message.
2767 @item -mail
2768 @itemx -xmail
2769 Invokes or inhibits the sending of a mail message containing the move.
2770 @item -xboard
2771 @itemx -xxboard
2772 Invokes or inhibits the running of XBoard on the game file.
2773 @item -reuse
2774 @itemx -xreuse
2775 Invokes or inhibits the reuse of an existing XBoard to display the
2776 current game.
2777 @item -remail
2778 Resends the last mail message for that game. This inhibits running
2779 XBoard.
2780 @item -game <name>
2781 The name of the game to be processed.
2782 @item -wgames <number>
2783 @itemx -bgames <number>
2784 @itemx -games <number>
2785 Number of games to start as White, as Black or in total. Default is 1 as
2786 white and none as black. If only one color is specified then none of the
2787 other color is assumed. If no color is specified then equal numbers of
2788 White and Black games are started, with the extra game being as White if an
2789 odd number of total games is specified.
2790 @item -me <short name>
2791 @itemx -opp <short name>
2792 A one-word alias for yourself or your opponent.
2793 @item -wname <full name>
2794 @itemx -bname <full name>
2795 @itemx -name <full name>
2796 @itemx -oppname <full name>
2797 The full name of White, Black, yourself or your opponent.
2798 @item -wna <net address>
2799 @itemx -bna <net address>
2800 @itemx -na <net address>
2801 @itemx -oppna <net address>
2802 The email address of White, Black, yourself or your opponent.
2803 @item -dir <directory>
2804 The directory in which @file{cmail} keeps its files. This defaults to the
2805 environment variable @code{$CMAIL_DIR} or failing that, @code{$CHESSDIR},
2806 @file{$HOME/Chess} or @file{~/Chess}. It will be created if it does not exist.
2807 @item -arcdir <directory>
2808 The directory in which @file{cmail} archives completed games. Defaults to
2809 the environment variable @code{$CMAIL_ARCDIR} or, in its absence, the same
2810 directory as cmail keeps its working files (above).
2811 @item -mailprog <mail program>
2812 The program used by cmail to send email messages. This defaults to the
2813 environment variable @code{$CMAIL_MAILPROG} or failing that
2814 @file{/usr/ucb/Mail}, @file{/usr/ucb/mail} or @file{Mail}. You will need
2815 to set this variable if none of the above paths fit your system.
2816 @item -gamesFile <file>
2817 @cindex .cmailgames
2818 A file containing a list of games with email addresses. This defaults to
2819 the environment variable @code{$CMAIL_GAMES} or failing that
2820 @file{.cmailgames}.
2821 @item -aliasesFile <file>
2822 @cindex .cmailaliases
2823 A file containing one or more aliases for a set of email addresses. This
2824 defaults to the environment variable @code{$CMAIL_ALIASES} or failing
2825 that @file{.cmailaliases}.
2826 @item -logFile <file>
2827 A file in which to dump verbose debugging messages that are invoked with
2828 the @samp{-v}
2829 option.
2830 @item -event <event>
2831 The PGN Event tag (default @samp{Email correspondence game}).
2832 @item -site <site>
2833 The PGN Site tag (default @samp{NET}).
2834 @item -round <round>
2835 The PGN Round tag (default @samp{-}, not applicable).
2836 @item -mode <mode>
2837 The PGN Mode tag (default @samp{EM}, Electronic Mail).
2838 @item Other options
2839 Any option flags not listed above are passed through to XBoard.
2840 Invoking XBoard through CMail changes the default values of two XBoard
2841 options: The default value for @samp{-noChessProgram} is changed to
2842 true; that is, by default no chess engine is started.  The default
2843 value for @samp{-timeDelay} is changed to 0; that is, by default
2844 XBoard immediately goes to the end of the game as played so far,
2845 rather than stepping through the moves one by one.  You can still set
2846 these options to whatever values you prefer by supplying them on
2847 CMail's command line.  @xref{Options}.
2848 @end table
2849
2850 @node CMail game
2851 @section Starting a CMail Game
2852 Type @file{cmail} from a shell to start a game as white. After an opening
2853 message, you will be prompted for a game name, which is optional---if you
2854 simply press @key{Enter}, the game name will take the form
2855 @samp{you-VS-opponent}. You will next be prompted for the short name
2856 of your opponent. If you haven't played this person before, you will also
2857 be prompted for his/her email address. @file{cmail} will then invoke
2858 XBoard in the background. Make your first move and select
2859 @samp{Mail Move} from the @samp{File} menu. @xref{File Menu}. If all is well,
2860 @file{cmail} will mail a copy of the move to your opponent. If you select
2861 @samp{Exit} without having selected @samp{Mail Move} then no move will be
2862 made.
2863
2864 @node CMail answer
2865 @section Answering a Move
2866 When you receive a message from an opponent containing a move in one of
2867 your games, simply pipe the message through @file{cmail}. In some mailers
2868 this is as simple as typing @kbd{| cmail} when viewing the message, while in
2869 others you may have to save the message to a file and do @kbd{cmail < file}
2870 at the command line. In either case @file{cmail} will display the game using
2871 XBoard. If you didn't exit XBoard when you made your first move
2872 then @file{cmail} will do its best to use the existing XBoard instead
2873 of starting a new one. As before, simply make a move and select
2874 @samp{Mail Move} from the @samp{File} menu. @xref{File Menu}. @file{cmail}
2875 will try to use the
2876 XBoard that was most recently used to display the current game. This
2877 means that many games can be in progress simultaneously, each with its own
2878 active XBoard.
2879
2880 If you want to look at the history or explore a variation, go ahead, but
2881 you must return to the current position before XBoard will allow you
2882 to mail a move. If you edit the game's history you must select
2883 @samp{Reload Same Game} from the @samp{File} menu to get back to the original
2884 position, then make the move you want and select @samp{Mail Move}.
2885 As before, if you decide you aren't ready to make a move just yet you can
2886 either select @samp{Exit} without sending a move or just leave
2887 XBoard running until you are ready.
2888
2889 @node CMail multi
2890 @section Multi-Game Messages
2891
2892 It is possible to have a @file{cmail} message carry more than one game.
2893 This feature was implemented to handle IECG (International Email Chess
2894 Group) matches, where a match consists of one game as white and one as black,
2895 with moves transmitted simultaneously. In case there are more general uses,
2896 @file{cmail} itself places no limit on the number of black/white games
2897 contained in a message; however, XBoard does.
2898
2899 @node CMail completion
2900 @section Completing a Game
2901 Because XBoard can detect checkmate and stalemate, @file{cmail}
2902 handles game termination sensibly. As well as resignation, the
2903 @samp{Action} menu allows draws to be offered and accepted for
2904 @file{cmail} games.
2905
2906 For multi-game messages, only unfinished and just-finished games will be
2907 included in email messages. When all the games are finished, they are
2908 archived in the user's archive directory, and similarly in the opponent's
2909 when he or she pipes the final message through @file{cmail}. The archive
2910 file name includes the date the game was started.
2911
2912 @node CMail trouble
2913 @section Known CMail Problems
2914 It's possible that a strange conjunction of conditions may occasionally
2915 mean that @file{cmail} has trouble reactivating an existing
2916 XBoard. If this should happen, simply trying it again should work.
2917 If not, remove the file that stores the XBoard's PID
2918 (@file{game.pid}) or use the @samp{-xreuse} option to force
2919 @file{cmail} to start a new XBoard.
2920
2921 Versions of @file{cmail} after 2.16 no longer understand the old file format
2922 that XBoard used to use and so cannot be used to correspond with
2923 anyone using an older version.
2924
2925 Versions of @file{cmail} older than 2.11 do not handle multi-game messages,
2926 so multi-game correspondence is not possible with opponents using an older
2927 version.
2928
2929 @node Other programs
2930 @chapter Other programs you can use with XBoard
2931 @cindex Other programs
2932
2933 Here are some other programs you can use with XBoard
2934
2935 @menu
2936 * GNU Chess::        The GNU Chess engine.
2937 * Fairy-Max::        The Fairy-Max chess engine.
2938 * HoiChess::         The HoiChess chess engine.
2939 * Crafty::           The Crafty chess engine.
2940 * zic2xpm::          The program used to import chess sets from ZIICS.
2941 @end menu
2942
2943 @node GNU Chess
2944 @section GNU Chess
2945
2946 The GNU Chess engine is available from:
2947
2948 ftp://ftp.gnu.org/gnu/gnuchess/
2949
2950 You can use XBoard to play a game against GNU Chess, or to
2951 interface GNU Chess to an ICS.
2952
2953 @node Fairy-Max
2954 @section Fairy-Max
2955
2956 Fairy-Max is a derivative from the once World's smallest Chess program micro-Max,
2957 which measures only about 100 lines of source code.
2958 The main difference with micro-Max is that Fairy-Max loads its move-generator
2959 tables from a file, so that the rules for piece movement can be easily configured
2960 to implement unorthodox pieces.
2961 Fairy-Max can therefore play a large number of variants, normal Chess being one of those.
2962 In addition it plays Knightmate, Capablanca and Gothic Chess, Shatranj, Courier Chess,
2963 Cylinder chess, Berolina Chess, while the user can easily define new variants.
2964 It can be obtained from:
2965
2966 http://home.hccnet.nl/h.g.muller/dwnldpage.html
2967
2968 @node HoiChess
2969 @section HoiChess
2970
2971 HoiChess is a not-so-very-strong Chess engine, which comes with a derivative HoiXiangqi,
2972 able to play Chinese Chess. It can be obtained from the standard Linux repositories
2973 through:
2974
2975 sudo apt-get install hoichess
2976
2977 @node Crafty
2978 @section Crafty
2979
2980 Crafty is a chess engine written by Bob Hyatt.
2981 You can use XBoard to play a game against Crafty, hook Crafty up
2982 to an ICS, or use Crafty to interactively analyze games and positions
2983 for you.
2984
2985 Crafty is a strong, rapidly evolving chess program. This rapid
2986 pace of development is good, because it means Crafty is always
2987 getting better.  This can sometimes cause problems with
2988 backwards compatibility, but usually the latest version of Crafty
2989 will work well with the latest version of XBoard.
2990 Crafty can be obtained from its author's FTP site:
2991 ftp://ftp.cis.uab.edu/hyatt/.
2992
2993 To use Crafty with XBoard, give the -fcp and -fd options as follows, where
2994 <crafty's directory> is the directory in which you installed Crafty
2995 and placed its book and other support files.
2996
2997 @node zic2xpm
2998 @section zic2xpm
2999
3000 The ``zic2xpm'' program is used to import chess sets from the ZIICS(*)
3001 program into XBoard. ``zic2xpm'' is part of the XBoard distribution.
3002 ZIICS is available from:
3003
3004 ftp://ftp.freechess.org/pub/chess/DOS/ziics131.exe
3005
3006 To import ZIICS pieces, do this:
3007 @table @asis
3008 @item 1. Unzip ziics131.exe into a directory:
3009
3010 @example
3011 unzip -L ziics131.exe -d ~/ziics
3012 @end example
3013 @item 2. Use zic2xpm to convert a set of pieces to XBoard format.
3014
3015 For example, let's say you want to use the
3016 FRITZ4 set. These files are named ``fritz4.*'' in the ZIICS distribution.
3017
3018 @example
3019 mkdir ~/fritz4
3020 cd ~/fritz4
3021 zic2xpm ~/ziics/fritz4.*
3022 @end example
3023 @item 3. Give XBoard the ``-pixmap'' option when starting up, e.g.:
3024
3025 @example
3026 xboard -pixmap ~/fritz4
3027 @end example
3028
3029 Alternatively, you can add this line to your @file{.Xresources} file:
3030
3031 @example
3032 xboard*pixmapDirectory: ~/fritz4
3033 @end example
3034 @end table
3035
3036 (*) ZIICS is a separate copyrighted work of Andy McFarland.
3037 The ``ZIICS pieces'' are copyrighted works of their respective
3038 creators. Files produced by ``zic2xpm'' are for PERSONAL USE ONLY
3039 and may NOT be redistributed without explicit permission from
3040 the original creator(s) of the pieces.
3041
3042 @ifnottex
3043 @node Copyright
3044 @unnumbered Copyright
3045 @include copyright.texi
3046 @end ifnottex
3047
3048 @node Copying
3049 @unnumbered GNU GENERAL PUBLIC LICENSE
3050 @include gpl.texinfo
3051
3052 @c noman
3053 @node Index
3054 @unnumbered Index
3055
3056 @printindex cp
3057 @contents
3058 @c end noman
3059
3060 @bye