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