Integrate into build system (compile time switch for confgure defaulting to off).
[kugel-rb.git] / manual / plugins / goban.tex
blob0799906f05bb132f802b0634fb190abe9ad6358e
1 \subsection{Goban}
2 \screenshot{plugins/images/ss-goban}{Goban}{The Rockbox Goban plugin}
3 Goban is a a plugin for playing, viewing and recording games of Go (also known
4 as Weiqi, Baduk, Igo and Goe). It uses standard Smart Game Format (SGF) files
5 for saving and loading games. You can find a short introduction to Go at
6 \url{http://senseis.xmp.net/?WhatIsGo} and more information about SGF files
7 can be read at \url{http://senseis.xmp.net/?SmartGameFormat} or the SGF
8 specification at \url{http://www.red-bean.com/sgf/}.\\
10 This plugin can load all modern SGF files (file format 3 or 4) with few problems.
11 It attempts to preserve SGF properties which it doesn't understand, and most common
12 SGF properties are handled fully. It is possible to view (and edit if you like)
13 Kogo's Joseki Dictionary (\url{http://waterfire.us/joseki.htm}) with this plugin,
14 although the load and save times can be on the order of a minute or two on
15 particularly slow devices. Large SGF files may stop audio playback for the duration
16 of the plugin's run in order to free up more memory and some very large SGF files will
17 not even load on devices with little available memory.\\
19 \note{The plugin does \emph{NOT} support SGF files with multiple games in
20 one file. These are rare, but if you have one don't even try it (the file will most
21 likely be corrupted if you save over it). You have been warned.\\}
23 The file \fname {/sgf/gbn\_def.sgf} is used by the plugin to store any unsaved
24 changes in the most recently loaded game. This means that if you forget to save your
25 changes, you should load \fname {/sgf/gbn\_def.sgf} immediately to offload the changes
26 to another file. If you load another file first then your changes will be lost
27 permanently. The \fname {/sgf/gbn\_def.sgf} file is also the file loaded if another
28 is not selected.\\
30 The information panel which displays the current move number may also contain
31 these markers:
33 \begin{table}
34 \begin{rbtabular}{\textwidth}{lX}%
35 {\textbf{Mark} & \textbf{Meaning}}{}{}
36 \emph{+ } & There are nodes after the current node in the SGF tree. \\
37 \emph{* } & There are sibling variations which can be navigated to using the %
38 \emph{Next Variation} menu option of the \emph{Context Menu}%
39 \opt{SANSA_E200_PAD,SANSA_C200_PAD,SANSA_FUZE_PAD,SANSA_CLIP_PAD,%
40 RECORDER_PAD,MROBE100_PAD,GIGABEAT_PAD,GIGABEAT_S_PAD,IRIVER_H100_PAD,%
41 IRIVER_H300_PAD,PBELL_VIBE500_PAD}{ or the %
42 \opt{SANSA_E200_PAD,SANSA_C200_PAD}{\ButtonRec}%
43 \opt{SANSA_FUZE_PAD,SANSA_CLIP_PAD}{\ButtonHome}%
44 \opt{RECORDER_PAD}{\ButtonOn}%
45 \opt{MROBE100_PAD}{\ButtonPower}%
46 \opt{GIGABEAT_PAD}{\ButtonA}%
47 \opt{GIGABEAT_S_PAD}{\ButtonPlay}%
48 \opt{PBELL_VIBE500_PAD}{\ButtonCancel}%
49 \opt{IRIVER_H100_PAD,IRIVER_H300_PAD}{\ButtonRec} button}. \\
50 \emph{C } & There is a comment at the current node. It can be viewed/edited using
51 the \emph{Add/Edit Comment} menu option of the \emph{Context Menu}. \\
52 \end{rbtabular}
53 \end{table}
55 \subsubsection{Controls}
56 \begin{table}
57 \begin{btnmap}{}{}
58 \nopt{IPOD_1G2G_PAD,IPOD_3G_PAD,IPOD_4G_PAD,IRIVER_H10_PAD,COWON_D2_PAD}
59 {\ButtonUp}%
60 \opt{IPOD_1G2G_PAD,IPOD_3G_PAD,IPOD_4G_PAD}{\ButtonMenu}%
61 \opt{IRIVER_H10_PAD}{\ButtonScrollUp}
62 \opt{COWON_D2_PAD}{\TouchTopMiddle}
64 \opt{HAVEREMOTEKEYMAP}{
66 Move cursor up
69 \nopt{IPOD_1G2G_PAD,IPOD_3G_PAD,IPOD_4G_PAD,IRIVER_H10_PAD,COWON_D2_PAD}
70 {\ButtonDown}%
71 \opt{IPOD_1G2G_PAD,IPOD_3G_PAD,IPOD_4G_PAD}{\ButtonPlay}%
72 \opt{IRIVER_H10_PAD}{\ButtonScrollDown}
73 \opt{COWON_D2_PAD}{\TouchBottomMiddle}
75 \opt{HAVEREMOTEKEYMAP}{
77 Move cursor down
80 \nopt{COWON_D2_PAD}{\ButtonLeft}
81 \opt{COWON_D2_PAD}{\TouchMidLeft}
83 \opt{HAVEREMOTEKEYMAP}{
85 Move cursor left
86 \opt{ONDIO_PAD}{if in \emph{board} navigation mode, or retreat one
87 node in the game tree if in \emph{tree} navigation mode}
90 \nopt{COWON_D2_PAD}{\ButtonRight}
91 \opt{COWON_D2_PAD}{\TouchMidRight}
93 \opt{HAVEREMOTEKEYMAP}{
95 Move cursor right
96 \opt{ONDIO_PAD}{if in \emph{board} navigation mode, or advance one
97 node in the game tree if in \emph{tree} navigation mode}
100 \opt{ONDIO_PAD}{
101 \ButtonOff
103 Toggle between \emph{board} and \emph{tree} navigation modes
107 \nopt{IRIVER_H10_PAD,COWON_D2_PAD,ONDIO_PAD,RECORDER_PAD,IAUDIO_M3_PAD%
108 ,PBELL_VIBE500_PAD}{%
109 \ButtonSelect}%
110 \opt{IRIVER_H10_PAD,RECORDER_PAD,PBELL_VIBE500_PAD}{\ButtonPlay}%
111 \opt{ONDIO_PAD}{\ButtonMenu}
112 \opt{COWON_D2_PAD}{\TouchCenter}
114 \opt{HAVEREMOTEKEYMAP}{
116 Play a move (or use a tool if play-mode has been changed).
119 \nopt{ONDIO_PAD}{
120 \opt{SANSA_E200_PAD,SANSA_FUZE_PAD,IPOD_1G2G_PAD,IPOD_3G_PAD%
121 ,IPOD_4G_PAD}{\ButtonScrollBack}%
122 \opt{SANSA_CLIP_PAD,SANSA_M200_PAD,SANSA_C200_PAD,GIGABEAT_PAD%
123 ,GIGABEAT_S_PAD}{\ButtonVolDown}%
124 \opt{IRIVER_H10_PAD}{\ButtonFF}%
125 \opt{IRIVER_H100_PAD,IRIVER_H300_PAD}{\ButtonOff}%
126 \opt{MROBE100_PAD}{\ButtonMenu}%
127 \opt{IAUDIO_X5_PAD}{\ButtonPlay}%
128 \opt{RECORDER_PAD}{\ButtonFOne}
129 \opt{COWON_D2_PAD}{\TouchBottomLeft}
130 \opt{PBELL_VIBE500_PAD}{\ButtonOK{} + \ButtonLeft}
132 \opt{HAVEREMOTEKEYMAP}{
134 Retreat one node in the game tree
137 \opt{scrollwheel}{\ButtonScrollFwd}%
138 \opt{SANSA_CLIP_PAD,SANSA_M200_PAD,SANSA_C200_PAD,GIGABEAT_PAD%
139 ,GIGABEAT_S_PAD}{\ButtonVolUp}%
140 \opt{IRIVER_H10_PAD}{\ButtonRew}%
141 \opt{IRIVER_H100_PAD,IRIVER_H300_PAD}{\ButtonOn}%
142 \opt{MROBE100_PAD}{\ButtonPlay}%
143 \opt{IAUDIO_X5_PAD}{\ButtonRec}%
144 \opt{RECORDER_PAD}{\ButtonFThree}
145 \opt{COWON_D2_PAD}{\TouchBottomRight}
146 \opt{PBELL_VIBE500_PAD}{\ButtonOK{} + \ButtonRight}
148 \opt{HAVEREMOTEKEYMAP}{
150 Advance one node in the game tree
154 \opt{SANSA_E200_PAD,SANSA_FUZE_PAD,SANSA_CLIP_PAD,SANSA_M200_PAD%
155 ,SANSA_C200_PAD,IRIVER_H10_PAD,IAUDIO_X5_PAD}{\ButtonPower}%
156 \opt{MROBE100_PAD}{\ButtonDisplay}%
157 \opt{IPOD_1G2G_PAD,IPOD_3G_PAD,IPOD_4G_PAD}{Long \ButtonSelect}%
158 \opt{GIGABEAT_PAD,GIGABEAT_S_PAD,PBELL_VIBE500_PAD}{\ButtonMenu}%
159 \opt{IRIVER_H100_PAD,IRIVER_H300_PAD}{\ButtonMode}%
160 \opt{RECORDER_PAD}{\ButtonFTwo}%
161 \opt{ONDIO_PAD}{Long \ButtonMenu}
162 \opt{COWON_D2_PAD}{\TouchTopLeft}
164 \opt{HAVEREMOTEKEYMAP}{
166 Main Menu
169 % \nopt{IPOD_1G2G_PAD,IPOD_3G_PAD,IPOD_4G_PAD,ONDIO_PAD,RECORDER_PAD}{%
170 \opt{SANSA_E200_PAD,SANSA_FUZE_PAD,SANSA_C200_PAD,GIGABEAT_PAD,GIGABEAT_S_PAD%
171 ,IRIVER_H100_PAD,IRIVER_H300_PAD,MROBE100_PAD,IAUDIO_X5_PAD,IRIVER_H10_PAD%
172 ,PBELL_VIBE500_PAD}{%
173 \nopt{IRIVER_H10_PAD,COWON_D2_PAD,PBELL_VIBE500_PAD}{Long \ButtonSelect}%
174 \opt{IRIVER_H10_PAD}{Long \ButtonPlay}
175 \opt{COWON_D2_PAD}{Long \TouchCenter}
176 \opt{PBELL_VIBE500_PAD}{\ButtonOK}
178 \opt{HAVEREMOTEKEYMAP}{
180 Context Menu
184 \opt{SANSA_E200_PAD,SANSA_C200_PAD,SANSA_FUZE_PAD,RECORDER_PAD,MROBE100_PAD%
185 ,GIGABEAT_PAD,GIGABEAT_S_PAD,IRIVER_H100_PAD,IRIVER_H300_PAD,SANSA_CLIP_PAD%
186 ,PBELL_VIBE500_PAD}{%
187 \opt{SANSA_E200_PAD,SANSA_C200_PAD,IRIVER_H100_PAD,IRIVER_H300_PAD}{%
188 \ButtonRec}%
189 \opt{SANSA_FUZE_PAD,SANSA_CLIP_PAD}{\ButtonHome}%
190 \opt{RECORDER_PAD}{\ButtonOn}%
191 \opt{MROBE100_PAD}{\ButtonPower}%
192 \opt{GIGABEAT_PAD}{\ButtonA}%
193 \opt{GIGABEAT_S_PAD}{\ButtonPlay}%
194 \opt{COWON_D2_PAD}{\TouchTopRight}
195 \opt{PBELL_VIBE500_PAD}{\ButtonCancel}
197 \opt{HAVEREMOTEKEYMAP}{
199 Go to the next variation when at the first node in a branch
202 \end{btnmap}
203 \end{table}
205 \subsubsection{Menus}
206 \begin {description}
207 \item [Main Menu. ]
208 The main menu for game setup and access to other menus.
209 \begin{description}
210 \item[New.] Create a new game with your choice of board size and handicaps.
211 \item[Save.] Save the current state of the game. It will be saved to
212 \fname {/sgf/gbn\_def.sgf} unless otherwise set.
213 \item[Save As.] Save to a specified file.
214 \item[Game Info.] View and modify the metadata of the current game.
215 \item[Playback Control.] Control the playback of the current playlist
216 and modify the volume of your player.
217 \item[Zoom Level.] Zoom in or out on the board. If you set the zoom level,
218 it will be saved and used again the next time you open this plugin.
219 \item[Options.] Open the Options Menu.
220 \item[Context Menu.] Open the Context Menu which allows you to set play
221 modes and other tools.
222 \item[Quit.] Leave the plugin. Any unsaved changes are saved to
223 \fname {/sgf/gbn\_def.sgf}.
224 \end{description}
225 \item [Game Info. ]
226 The menu for modifying game info (metadata) of the current game. This
227 information will be saved to the SGF file and can be viewed in almost all
228 SGF readers.
229 \begin{description}
230 \item[Basic Info.] Shows a quick view of the basic game metadata, if any
231 has been set (otherwise does nothing). This option does not allow
232 editing.
233 \item[Time Limit.] The time limit of the current game.
234 \item[Overtime.] The overtime settings of the current game.
235 \item[Result.] The result of the current game. This text must follow the
236 format specified at \url{http://www.red-bean.com/sgf/properties.html#RE}
237 to be read by other SGF readers. Some examples are
238 \emph {B+R} (Black wins by resignation),
239 \emph {B+5.5} (Black wins by 5.5 points),
240 \emph {W+T} (White wins on Time).
241 \item[Handicap.] The handicap of the current game.
242 \item[Komi.] The komi of the current game (compensation to the white
243 player for black having the first move).
244 \item[Ruleset.] The name of the ruleset in use for this game.
245 The \emph{NZ} and \emph{GOE} rulesets include suicide as a legal
246 move (for multi-stone suicide only); the rest do not.
247 \item[Black Player.] The name of the black player.
248 \item[Black Rank.] Black's rank, in dan or kyu.
249 \item[Black Team.] The name of black's team, if any.
250 \item[White Player.] The name of the white player.
251 \item[White Rank.] White's rank, in dan or kyu.
252 \item[White Team.] The name of white's team, if any.
253 \item[Date.] The date that this game took place. This text must follow
254 the format specified at \url{http://www.red-bean.com/sgf/properties.html#DT}
255 to be read by other SGF readers.
256 \item[Event.] The name of the event which this game was a part of, if any.
257 \item[Place.] The place that this game took place.
258 \item[Round.] If part of a tournament, the round number for this game.
259 \item[Done.] Return to the previous menu.
260 \end{description}
262 \item [Options. ]
263 Customize the behavior of the plugin in certain ways.
264 \begin{description}
265 \item[Show Child Variations?] Enable this to mark child variations on
266 he board if there are more than one. Note: variations which don't
267 start with a move are not visible in this way.
268 \item[Disable Idle Poweroff?] Enable this if you do not want the \dap{}
269 to turn off after a certain period of inactivity (depends on your
270 global Rockbox settings).
271 \item[Idle Autosave Time.] Set the amount of idle time to wait before
272 automatically saving any unsaved changes. These autosaves go to
273 the file \fname {/sgf/gbn\_def.sgf} regardless of if you have
274 loaded a game or used \setting{Save As} to save the game before or
275 not. Set to \setting{Off} to disable this functionality completely.
276 \item[Automatically Show Comments?] If this is enabled and you navigate
277 to a node containing game comments, they will automatically be
278 displayed.
279 \end{description}
281 \item [Context Menu. ]
282 The menu for choosing different play modes and tools, adding or editing
283 comments, adding pass moves, or switching between sibling variations.
284 \begin{description}
285 \item[Play Mode.] Play moves normally on the board. If there are child
286 moves from the current node, this mode will let you follow
287 variations by simply playing the first move in the sequence.
288 Unless it is following a variation, this mode will not allow you to
289 play illegal moves. This is the default mode before another is set
290 after loading a game or creating a new one.
291 \item[Add Black Mode.] Add black stones to the board as desired. These
292 stones are not moves and do not perform captures or count as ko threats.
293 \item[Add White Mode.] Add white stones to the board as desired. These
294 stones are not moves and do not perform captures or count as ko threats.
295 \item[Erase Stone Mode.] Remove stones from the board as desired. These
296 removed stones are not counted as captured, they are simply removed.
297 \item[Pass.] Play a single pass move. This does not change the mode of
298 play.
299 \item[Next Variation.] If the game is at the first move in a variation,
300 this will navigate to the next variation after the current one. This
301 is the only way to reach variations which start with adding or
302 removing stones, as you cannot follow them by ``playing'' the same move.
303 \item[Force Play Mode.] The same as Play Mode except that this mode will
304 allow you to play illegal moves such as retaking a ko immediately
305 without a ko threat, suicide on rulesets which don't allow it
306 (including single stone suicide), and playing a move where there
307 is already a stone.
308 \item[Mark Mode.] Add generic marks to the board, or remove them.
309 \item[Circle Mode.] Add circle marks to the board, or remove them.
310 \item[Square Mode.] Add square marks to the board, or remove them.
311 \item[Triangle Mode.] Add triangle marks to the board, or remove them.
312 \item[Label Mode.] Add one character labels to the board. Each label
313 starts at the letter 'a' and each subsequent application of a label
314 will increment the letter. To remove a label, click on it until it
315 cycles through the allowed letters and disappears.
316 \item[Add/Edit Comment.] Add or edit a comment at the current node.
317 \item[Done.] Go back to the previous screen.
318 \end{description}
319 \end{description}