1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html>
3<head>
4</head>
5<body>
6<big><span style="font-weight: bold;">Tinkering with Winboard<br>
7by Alessandro Scotti<br>
8</span></big><br>
9Last update: March 22, 2005.<br>
10<br>
11This readme is about some modifications I made to Winboard 4.2.7. Some
12will work in Xboard too, while others are for Winboard only.
13Regardless, everything here is absolutely experimental and has been
14tested very little... so no warranties ok?<br>
15<br>
16All modified sources are included in this archive, the rest can be
17downloaded from <a href="http://www.tim-mann.org/xboard.html">Tim
18Mann's Xboard page</a>. Please feel free to take my changes and use
19them as you like, they are released under the GPL.<br>
20<br>
21<big><span style="font-weight: bold;">Game adjudication</span></big><br>
22<br>
23User can adjudicate a game between two machines, using the "Action"
24menu. Note that this only works if two machines are playing.<br>
25<br>
26Also, it is possible to adjudicate a game automatically with this
27parameter:<br>
28<br>
29<div style="margin-left: 40px;">/adjudicateLossThreshold=-700<br>
30</div>
31<br>
32if set to a negative value, Winboard will adjudicate a game if a engine
33can't get a score above the specified threshold for 3 full moves (6
34plies). Note that both engines must agree on the score value, and also
35the game is only adjudicated after the last move from the losing engine.<br>
36<br>
37Adjudication is still under test!<br>
38<br>
39<big><span style="font-weight: bold;">Background textures</span></big><br>
40<br>
41Add the following to winboard.ini:<br>
42<br>
43<div style="margin-left: 40px;">/liteBackTextureFile="sandstone_w.bmp"<br>
44/darkBackTextureFile="sandstone_b.bmp"<br>
45/liteBackTextureMode=1<br>
46/darkBackTextureMode=1<br>
47</div>
48<br>
49Of course you can choose any file you like for texturing the light and
50dark squares, as long as it's a valid BMP (Windows bitmap) file. <br>
51<br>
52Valid texture modes are 1 (default) and 2. In mode 1 the squares are
53taken from portions of the texture bitmap and copied without further
54processing. In mode 2, squares can also be rotated, mirrored and so on
55in order to provide a little more variety to the texture. The
56operations are selected at random so the board will look slightly
57different every time the program is run.<br>
58<br>
59Note: to "comment out" a filename, put an asterisk in front of it, i.e.
60"*sandstone.bmp" will be skipped.<br>
61<br>
62Additionally it is possible to override the size of the "gap" between
63the squares, which is otherwise selected automatically. Add this to
64winboard.ini:<br>
65<br>
66<div style="margin-left: 40px;">/overrideLineGap=2<br>
67</div>
68<br>
69I have added this because textures usually look better with a smaller
70or no gap. Any negative value will ignore the override and use the
71standard value from Winboard.<br>
72<br>
73The combination of these parameters can produce very interesting
74effects, see for example <a
75 href="http://usuarios.lycos.es/alexwbtm/Test/">Alex Guerrero's page</a>.<br>
76<br>
77<big><span style="font-weight: bold;">Font-based rendering of chess
78pieces</span></big><br>
79<br>
80It is possible to use chess fonts to draw pieces, in place of the usual
81bitmaps. You have to specify the font name by adding the following to
82winboard.ini:<br>
83<br>
84<div style="margin-left: 40px;">/renderPiecesWithFont="Chess Leipzig"<br>
85</div>
86<br>
87Chances are the program will automatically recognize the font and
88select the proper mapping, i.e. the correspondence between a chess
89piece and the corresponding font character. So if the board looks good
90you're set and there's nothing else to do, otherwise you'll have to
91find the proper mapping and tell it to the program with&nbsp; this
92setting:<br>
93<br>
94<div style="margin-left: 40px;">/fontPieceToCharTable="phbrqkojntwl"<br>
95</div>
96<br>
97The piece are in order: white pawn, knight, bishop, rook, queen, king
98and black pawn, knight, bishop, rook, queen, king. So the example above
99tells the program to use the letter "p" for a white pawn, the letter
100"h" for a white knight, the letter "t" for a black rook and so on.<br>
101<br>
102Note: to "comment out" a font name, put an asterisk in front of it,
103i.e. "*Chess Merida" will be skipped because of the asterisk.<br>
104<br>
105It is possible to customize the font foreground and background color,
106with these settings:<br>
107<br>
108<div style="margin-left: 40px;">/fontPieceBackColorWhite=#ffffcc<br>
109/fontPieceForeColorWhite=#402010<br>
110/fontPieceBackColorBlack=#ffffcc<br>
111/fontPieceForeColorBlack=#301008<br>
112</div>
113<br>
114Colors are expressed in RGB notation. If you are not familiar with the
115RGB notation&nbsp; I would suggest to leave them alone until I manage
116to update the GUI. In this case, the program will take the board
117settings as for the usual piece set.<br>
118<br>
119It is also possible to control the size of the piece with respect to
120the square, for example this entry:<br>
121<br>
122<div style="margin-left: 40px;">/fontPieceSize=80<br>
123</div>
124<br>
125tells the program to make the pieces about 20% smaller than a square
126(i.e. the piece size is 80%). Note that different fonts may require
127different values for this parameter. Usually values in the 70-80 range
128provide the best values, however the program accepts anything from 50
129to 150.<br>
130<br>
131Font-based pieces are automatically given a "roundish" look. For now,
132this option is not mapped to a user-definable setting.<br>
133<br>
134<big><span style="font-weight: bold;">Fast clipboard pasting</span></big><br>
135<br>
136Press Ctrl-V to paste a PGN game or a FEN position from the clipboard,
137the program will try to autodetect the proper type.<br>
138<br>
139<big><span style="font-weight: bold;">Thread initialization bug</span></big><br>
140<br>
141I've tried to fix a bug reported (and fixed) by Anastasios Milikas (of
142AICE), where a thread could try to access a not yet initialized
143variable. I've used a different approach here, where threads are
144started in a "suspended" state and then released only when the variable
145has been initialized (this has the advantage of putting all the
146required fix code in one place, and the disadvantage of not having been
147tested by Anastasios).<br>
148<br>
149<big><span style="font-weight: bold;">Protection from some buffer
150overflows</span></big><br>
151<br>
152In just a few cases, I've tried to put some guard against buffer
153overflows. These are just quick attempts... a lot more work would be
154needed to provide some measurable benefits. I hope that bug **353 is
155finally fixed now. The buffer overflows were propagated across several
156functions so as soon as one was fixed another would crash!<br>
157<br>
158<big><span style="font-weight: bold;">Absolute scores can be converted
159to relative</span></big><br>
160<br>
161Some engines (e.g. Crafty, Delphi) always report scores from the white
162side (i.e. absolute), rather than the engine side (i.e. relative). This
163leads to confusion and breaks features such as automatic adjudication.
164In order to convert the scores to relative add the following to
165winboard.ini:<br>
166<br>
167<div style="margin-left: 40px;">/firstScoreAbs=false<br>
168</div>
169<br>
170If true, the score of the first program is absolute and will be negated
171when playing black. And similarly:<br>
172<br>
173<div style="margin-left: 40px;">/secondScoreAbs=false<br>
174</div>
175<br>
176if true, the score of the second program is absolute and will be
177negated when playing black.<br>
178<br>
179<big><span style="font-weight: bold;">Engine search info can be saved
180in a PGN file</span></big><br>
181<br>
182Add the following to winboard.ini:<br>
183<br>
184<div style="margin-left: 40px;">/pgnExtendedInfo=true<br>
185</div>
186<br>
187If true, and the PGN save game option is enabled, each move will be
188followed by a comment&nbsp; containing the engine score and thinking
189depth (when available).<br>
190<br>
191Note: can also be set from the General options dialog.<br>
192<br>
193<big><span style="font-weight: bold;">Engine search info can be hidden
194in human-computer games</span></big><br>
195<br>
196When "show thinking" is disabled, engine thinking is not generated at
197all, rather than simply hidden. It is now possible to generate the
198think lines (e.g. for logging or saving in the PGN) yet hide them when
199the engine is playing against a human player. Add the following to
200winboard.ini:<br>
201<br>
202<div style="margin-left: 40px;">/hideThinkingFromHuman=true<br>
203</div>
204<br>
205Note: can also be set from the General options dialog.<br>
206<br>
207<big><span style="font-weight: bold;">Asymmetric time controls</span></big><br>
208<br>
209Very experimental! You can enter two time controls in the usual dialog,
210separated by "/". If so, white will be assigned the first time and
211black the second. So for example "0:30/2:00" will give 30 seconds to
212white and 2 minutes to black.<br>
213<br>
214Note: for now these times stay with black and white, rather than the
215corresponding player.<br>
216<br>
217<big><span style="font-weight: bold;">User interface</span></big><br>
218<br>
219Options to "hide thinking from human" and "save extended info in PGN"
220now appears in the "General" options dialog.<br>
221<br>
222</body>
223</html>
224