Add a 'Set As Backdrop' item to the context menu description of targets with greyscal...
[kugel-rb.git] / manual / advanced_topics / main.tex
blob6247fe3a2ff146f2d6ad1daeb6b0cfa025997e02
1 % $Id$ %
2 \chapter{Advanced Topics}
4 \section{\label{ref:CustomisingUI}Customising the User Interface}
5 \opt{lcd_bitmap}{
6 \subsection{\label{ref:GettingExtras}Getting Extras}
8 Rockbox supports custom fonts. A collection of fonts is available for download
9 in the font package at \url{http://www.rockbox.org/daily.shtml}.}
11 \opt{lcd_bitmap}{
12 \subsection{\label{ref:Loadingfonts}Loading Fonts}\index{Fonts}
13 Rockbox can load fonts dynamically. Simply copy the \fname{.fnt} file to the
14 \dap{} and ``play'' it in the \setting{File Browser}. If you want a font to
15 be loaded automatically every time you start up, it must be located in the
16 \fname{/.rockbox/fonts} directory and the filename must be at most 24 characters
17 long. You can browse the fonts in \fname{/.rockbox/fonts} under
18 \setting{Settings $\rightarrow$ General Settings $\rightarrow$ Display
19 $\rightarrow$ Browse Fonts} in the \setting{Main Menu}.
20 \warn{Advanced Users Only: Any BDF font file up to 16 pixels high should
21 be usable with Rockbox. To convert from \fname{.bdf} to \fname{.fnt}, use
22 the \fname{convbdf} tool. This tool can be found in the \fname{tools}
23 directory of the Rockbox source code.}
26 \subsection{\label{ref:Loadinglanguages}Loading Languages}
27 \index{Language files}%
28 Rockbox can load language files at runtime. Simply copy the \fname{.lng} file
29 \emph{(do not use the .lang file)} to the \dap\ and ``play'' it in the
30 Rockbox directory browser or select \setting{Settings $\rightarrow$
31 General Settings $\rightarrow$ Languages }from the \setting{Main Menu}.
33 \note{If you want a language to be loaded automatically every time you start
34 up, it must be located in the \fname{/.rockbox/langs} directory and the filename
35 must be a maximum of 24 characters long.}
37 If your language is not yet supported and you want to write your own language
38 file find the instructions on the Rockbox website:
39 \wikilink{LangFiles}
41 \opt{lcd_color}{
42 \subsection{Changing Colours}
43 The colours used in the Rockbox interface can be changed to any combination
44 of background and foreground colour you like. To do this go to the
45 \setting{Settings $\rightarrow$ General Settings $\rightarrow$ Display}
46 and select \setting{Background Colour} or \setting{Foreground Colour}.
47 The colours set here are used in all menus, browsers and in the
48 \setting{While Playing Screen}.
49 \subsection{Changing Filetype Colours}
50 Rockbox has the capability to modify the File Browser to show different
51 filetypes in different colours depending upon the file extension.
52 See the \wikilink{CustomFiletypeColours} Wiki page for details.
55 \opt{lcd_non-mono}{%
56 \subsection{\label{ref:LoadingBackdrops}Loading Backdrops}
57 Rockbox supports showing an image as a backdrop in the \setting{File Browser}
58 and the menus. The backdrop image must be a \fname{.bmp} file of the exact
59 same dimensions as the display in your \dap{} (\genericimg{} with the last
60 number giving the colour depth in bits). To use an image as a backdrop browse
61 to it in the \setting{File Browser} and open the \setting{Context Menu}
62 (see \reference{ref:Contextmenu}) on it and select the option
63 \setting{Set As Backdrop}. If you want rockbox to remember your
64 backdrop the next time you start your \dap{} the backdrop must be placed in
65 the \fname{/.rockbox/backdrops} directory.
68 \section{\label{ref:ConfiguringtheWPS}Configuring the WPS}
70 \subsection{WPS -- General Info}
72 \begin{description}
73 \item[Description: ] The WPS or While Playing Screen is the name used to
74 describe the information displayed on the \daps\ screen whilst an audio track
75 is being played. The default WPS is a relatively simple screen displaying
76 Track name, Artist, Album etc. in the default font as a purely text based
77 layout. There are a number of WPS files included in Rockbox, and you can
78 load one of these at anytime by selecting it in
79 \setting{General Settings $\rightarrow$ Display $\rightarrow$ Browse .wps files}.
80 \opt{HAVE_REMOTE_LCD}{There is a related option to browse \fname{.rwps}
81 files for \daps{} with LCD remote controls installed. This will load a
82 similar WPS screen for the remote but with usually a simpler and more
83 concise layout.}
85 \note{``Playing'' a \fname{.wps} from the file browser has the same effect.}
87 \item [File Location: ]Custom WPS files may be located anywhere on the drive.
88 The only restriction is that they must end in \fname{.wps}. When you ``play''
89 a \fname{.wps} file, it will be used for future WPS screens, and if the
90 ``played'' \fname{.wps} file is located in the \fname{/.rockbox/wps} directory, it
91 will be remembered and used after reboot. The \fname{.wps} filename must be
92 no more than 24 characters long for it to be remembered.
93 \end{description}
95 \subsection{\label{ref:CreateYourOwnWPS}WPS -- Build Your Own}
96 Quite simply, enter the WPS code in your favourite text editor, Notepad on
97 Windows works fine. When you save it, instead of saving it as a \fname{.txt}
98 file, save it as a \fname{.wps} file. Example: Instead of \fname{Rockbox.txt},
99 save the file as \fname{Rockbox.wps}. To make sure non english characters
100 display correctly in your WPS you must save the .wps file with UTF-8 character
101 encoding. This can be done in most editors, for example Notepad in Windows 2000
102 or XP (but not in 9x/ME) can do this. See appendix \reference{ref:wps_tags} for
103 all the tags that are available.
105 \begin{itemize}
106 \item All characters not preceded by \% are displayed as typed.
107 \item Lines beginning with \# are comments and will be ignored.
108 \item Maximum file size used is
109 \opt{lcd_bitmap}{1600}
110 \opt{player}{400} bytes.
111 If you have a bigger WPS file, only the first part of it will be
112 loaded and used.
113 \end{itemize}
115 \note{Keep in mind that your \dap{} resolution is \genericimg{} (with
116 the last number giving the colour depth in bits) when
117 designing your own WPS, or if you use a WPS designed for another target.
118 \opt{HAVE_REMOTE_LCD}{The resolution of the remote is
119 \opt{h1xx,h300}{128x64x1}\opt{x5}{128x96x2} pixels.}}
121 \subsubsection{Conditional Tags}
123 \begin{description}
124 \item[If/else: ]
125 Syntax: \config{\%?xx{\textless}true{\textbar}false{\textgreater}}
127 If the tag specified by ``\config{xx}'' has a value, the text between the
128 ``\config{{\textless}}'' and the ``\config{{\textbar}}'' is displayed (the true
129 part), else the text between the ``\config{{\textbar}}'' and the
130 ``\config{{\textgreater}}'' is displayed (the false part).
131 The else part is optional, so the ``\config{{\textbar}}'' does not have to be
132 specified if no else part is desired. The conditionals nest, so the text in the
133 if and else part can contain all \config{\%} commands, including conditionals.
135 \item[Enumerations: ]
136 Syntax: \config{\%?xx{\textless}alt1{\textbar}alt2{\textbar}alt3{\textbar}\dots{\textbar}else{\textgreater}}
138 For tags with multiple values, like Play status, the conditional can hold a
139 list of alternatives, one for each value the tag can have.
140 Example enumeration:
141 \begin{example}
142 \%?mp{\textless}Stop{\textbar}\%Play{\textbar}Pause{\textbar}Ffwd{\textbar}Rew{\textgreater}
143 \end{example}
145 The last else part is optional, and will be displayed if the tag has no value.
146 The WPS parser will always display the last part if the tag has no value, or if
147 the list of alternatives is too short.
148 \end{description}
150 \subsubsection{Next Song Info}
151 You can display information about the next song -- the song that is
152 about to play after the one currently playing (unless you change the
153 plan).
155 If you use the upper-case versions of the
156 three tags: \config{F}, \config{I} and \config{D}, they will instead refer to
157 the next song instead of the current one. Example: \config{\%Ig} is the genre
158 name used in the next song and \config{\%Ff} is the mp3 frequency.
160 \note{The next song information \emph{will not} be available at all
161 times, but will most likely be available at the end of a song. We
162 suggest you use the conditional display tag a lot when displaying
163 information about the next song!}
165 \subsubsection{Alternating Sublines}
167 It is possible to group items on each line into 2 or more groups or
168 ``sublines''. Each subline will be displayed in succession on the line for a
169 specified time, alternating continuously through each defined subline.
171 Items on a line are broken into sublines with the semicolon
172 '\config{;}' character. The display time for
173 each subline defaults to 2 seconds unless modified by using the
174 '\config{\%t}' tag to specify an alternate
175 time (in seconds and optional tenths of a second) for the subline to be
176 displayed.
178 Subline related special characters and tags:
179 \begin{description}
180 \item[;] Split items on a line into separate sublines
181 \item[\%t] Set the subline display time. The
182 '\config{\%t}' is followed by either integer
183 seconds (\config{\%t5}), or seconds and tenths of a second (\config{\%t3.5}).
184 \end{description}
186 Each alternating subline can still be optionally scrolled while it is
187 being displayed, and scrollable formats can be displayed on the same
188 line with non{}-scrollable formats (such as track elapsed time) as long
189 as they are separated into different sublines.
190 Example subline definition:
191 \begin{example}
192 %s%t4%ia;%s%it;%t3%pc %pr : Display id3 artist for 4 seconds,
193 Display id3 title for 2 seconds,
194 Display current and remaining track time
195 for 3 seconds,
196 repeat...
197 \end{example}
199 Conditionals can be used with sublines to display a different set and/or number
200 of sublines on the line depending on the evaluation of the conditional.
201 Example subline with conditionals:
202 \begin{example}
203 %?it{\textless}%t8%s%it{\textbar}%s%fn{\textgreater};%?ia{\textless}%t3%s%ia{\textbar}%t0{\textgreater}\\
204 \end{example}
206 The format above will do two different things depending if ID3 tags are
207 present. If the ID3 artist and title are present:
208 \begin{itemize}
209 \item Display id3 title for 8 seconds,
210 \item Display id3 artist for 3 seconds,
211 \item repeat\dots
212 \end{itemize}
213 If the ID3 artist and title are not present:
214 \begin{itemize}
215 \item Display the filename continuously.
216 \end{itemize}
217 Note that by using a subline display time of 0 in one branch of a conditional,
218 a subline can be skipped (not displayed) when that condition is met.
220 \subsubsection{Using Images}
221 You can have as many as 52 images in your WPS. There are various ways of
222 displaying images:
223 \begin{enumerate}
224 \item Load and always show the image, using the \config{\%x} tag
225 \item Preload the image with \config{\%xl} and show it with \config{\%xd}.
226 This way you can have your images displayed conditionally.
227 \nopt{archos}{%
228 \item Load an image and show as backdrop using the \config{\%X} tag. The
229 image must be of the same exact dimensions as your display.
231 \end{enumerate}
233 \optv{swcodec}{% This doesn't depend on swcodec but we don't have a \noptv
234 % command.
235 Example on background image use:
236 \begin{example}
237 %X|background.bmp|
238 \end{example}
239 The image with filename \fname{background.bmp} is loaded and used in the WPS.
242 Example on bitmap preloading and use:
243 \begin{example}
244 %x|a|static_icon.bmp|50|50|
245 %xl|b|rep\_off.bmp|16|64|
246 %xl|c|rep\_all.bmp|16|64|
247 %xl|d|rep\_one.bmp|16|64|
248 %xl|e|rep\_shuffle.bmp|16|64|
249 %?mm<%xdb|%xdc|%xdd|%xde>
250 \end{example}
251 Four images at the same x and y position are preloaded in the example. Which
252 image to display is determined by the \config{\%mm} tag (the repeat mode).
254 \subsubsection{Example File}
255 \begin{example}
256 %s%?in<%in - >%?it<%it|%fn> %?ia<[%ia%?id<, %id>]>
257 %pb%pc/%pt
258 \end{example}
259 That is, ``tracknum -- title [artist, album]'', where most fields are only
260 displayed if available. Could also be rendered as ``filename'' or ``tracknum --
261 title [artist]''.
263 %\opt{lcd_bitmap}{
264 % \begin{verbatim}
265 % %s%?it<%?in<%in. |>%it|%fn>
266 % %s%?ia<%ia|%?d2<%d2|(root)>>
267 % %s%?id<%id|%?d1<%d1|(root)>> %?iy<(%iy)|>
269 % %al%pc/%pt%ar[%pp:%pe]
270 % %fbkBit %?fv<avg|> %?iv<(id3v%iv)|(no id3)>
271 % %pb
272 % %pm
273 % % \end{verbatim}
276 \section{\label{ref:manage_settings}Managing Rockbox Settings}
278 \subsection{Introduction to \fname{.cfg} Files.}
279 Rockbox allows users to store and load multiple settings through the use of
280 configuration files. A configuration file is simply a text file with the
281 extension \fname{.cfg}.
283 A configuration file may reside anywhere on the disk. Multiple
284 configuration files are permitted. So, for example, you could have
285 a \fname{car.cfg} file for the settings that you use while playing your
286 jukebox in your car, and a \fname{headphones.cfg} file to store the
287 settings that you use while listening to your \dap\ through headphones.
289 See \reference{ref:cfg_specs} below for an explanation of the format
290 for configuration files. See \reference{ref:manage_settings_menu} for an
291 explanation of how to create, edit and load configuration files.
293 \subsection{\label{ref:cfg_specs}Specifications for \fname{.cfg}
294 Files.}
296 The Rockbox configuration file is a plain text file, so once you use the
297 \setting{Save .cfg file} option to create the file, you can edit the file on
298 your computer using any text editor program. See
299 Appendix \reference{ref:config_file_options} for available settings. Configuration
300 files use the following formatting rules: %
302 \begin{enumerate}
303 \item Each setting must be on a separate line.
304 \item Each line has the format ``setting: value''.
305 \item Values must be within the ranges specified in this manual for each
306 setting.
307 \item Lines starting with \# are ignored. This lets you write comments into
308 your configuration files.
309 \end{enumerate}
311 Example of a configuration file:
312 \begin{example}
313 # Example configuration file
314 # volume: 70
315 # bass: 11
316 # treble: 12
317 # balance: 0
318 # time format: 12hour
319 # volume display: numeric
320 # show files: supported
321 # wps: /.rockbox/car.wps
322 # lang: /.rockbox/afrikaans.lng
323 \end{example}
325 \note{As you can see from the example, configuration files do not need to
326 contain all of the Rockbox options. You can create configuration files
327 that change only certain settings. So, for example, supppose you
328 typically use the \dap{} at one volume in the car, and another when using
329 headphones. Further, suppose you like to use an inverse LCD when you are
330 in the car, and a regular LCD setting when you are using headphones. You
331 could create configuration files that control only the volume and LCD
332 settings. Create a few different files with different settings, give
333 each file a different name (such as \fname{car.cfg},
334 \fname{headphones.cfg}, etc.), and you can then use the \setting{Browse .cfg
335 files} option to quickly change settings.}
337 A special case configuration file can be used to force a particular setting or settings every time Rockbox starts up (e.g. to set the volume to a safe level).
338 Format a new configuration file as above with the required setting(s) and save it into the \fname{/.rockbox} directory with the filename \fname{fixed.cfg}.
340 \subsection{\label{ref:manage_settings_menu}The \setting{Manage Settings}
341 menu} The \setting{Manage Settings} menu can be found in the \setting{Main
342 Menu}. The \setting{Manage Settings} menu allows you to save and load
343 \fname{.cfg} files. \opt{MASCODEC}{The \setting{Manage Settings} menu also
344 allows you to load or save different firmware versions.}
346 \begin{description}
348 \item [Browse .cfg Files]Opens the file browser in the \fname{/.rockbox}
349 directory and displays all \fname{.cfg} (configuration) files. Selecting a
350 \fname{.cfg} file will cause Rockbox to load the settings contained in that
351 file. Pressing \ButtonLeft\ will exit back to the \setting{Manage Settings}
352 menu. See the \setting{Write .cfg files} option on the
353 \setting{Manage Settings} menu for details of how to save and edit a
354 configuration file.
356 \item [Reset Settings]This wipes the saved settings
357 in the \dap\ and resets all settings to their default values.
359 \opt{IRIVER_H100_PAD,IRIVER_H300_PAD,IAUDIO_X5_PAD,SANSA_E200_PAD,SANSA_C200_PAD}{
360 \note{You can also reset all settings to their default
361 values by turning off the \dap, turning it back on, and holding the
362 \ButtonRec\ button immediately after the \dap\ turns on.}
364 \opt{IRIVER_H10_PAD}{\note{You can also reset all settings to
365 their default values by turning off the \dap, and turning it back on
366 with the \ButtonHold\ button on.}
368 \opt{IPOD_4G_PAD}{\note{You can also reset all settings to their default
369 values by turning off the \dap, turning it back on, and activating the
370 \ButtonHold\ button immediately after the backlight comes on.}
372 \opt{GIGABEAT_PAD}{\note{You can also reset all settings to their default
373 values by turning off the \dap, turning it back on and pressing the
374 \ButtonA\ button immediately after the \dap\ turns on.}
377 \item [Save .cfg File]This option writes a \fname{.cfg} file to
378 your \daps{} disk. The configuration file has the \fname{.cfg}
379 extension and is used to store all of the user settings that are described
380 throughout this manual.
382 Hint: Use the \setting{Save .cfg File} feature (\setting{Main Menu
383 $\rightarrow$ General Settings}) to save the current settings, then
384 use a text editor to customize the settings file. See Appendix
385 \reference{ref:config_file_options} for the full reference of available
386 options.
388 \item [Save Sound Settings]This option writes a \fname{.cfg} file to
389 your \daps\ disk. The configuration file has the \fname{.cfg}
390 extension and is used to store all of the sound related settings.
392 \item [Save Theme Settings]This option writes a \fname{.cfg} file to
393 your \daps\ disk. The configuration file has the \fname{.cfg}
394 extension and is used to store all of the theme related settings.
396 \end{description}
398 \section{\label{ref:FirmwareLoading}Firmware Loading}
399 \opt{player,recorder,recorderv2fm,ondio}{
400 When your \dap{} powers on, it loads the Archos firmware in ROM, which
401 automatically checks your \daps{} root directory for a file named
402 \firmwarefilename. Note that Archos firmware can only read the first
403 ten characters of each filename in this process, so do not rename your old
404 firmware files with names like \firmwarefilename.\fname{old} and so on,
405 because it is possible that the \dap{} will load a file other than the one
406 you intended.
409 \subsection{\label{ref:using_rolo}Using ROLO (Rockbox Loader)}
410 Rockbox is able to load and start another firmware file without rebooting.
411 You just ``play'' a file with the extension %
412 \opt{recorder,recorderv2fm,ondio}{\fname{.ajz}.} %
413 \opt{player}{\fname{.mod}.} %
414 \opt{h1xx,h300}{\fname{.iriver}.} %
415 \opt{ipod}{\fname{.ipod}.} %
416 \opt{iaudio}{\fname{.iaudio}.} %
417 \opt{sansa,h10,h10_5gb}{\fname{.mi4}.} %
418 This can be used to test new firmware versions without deleting your
419 current version.
421 \opt{archos}{\input{advanced_topics/archos-flashing.tex}}