checkwps: Do not error out on rwps for non-remote targets.
[maemo-rb.git] / manual / advanced_topics / main.tex
blob60c1b800ba255c2f7d4d8a87e3220b5cad6d92ba
1 % $Id$ %
2 \chapter{Advanced Topics}
4 \section{\label{ref:CustomisingUI}Customising the User Interface}
6 \subsection{\label{ref:CustomisingTheMainMenu}Customising The Main Menu}
8 It is possible to customise the main menu, i.e. to reorder or to hide some
9 of its items (only the main menu can be customised, submenus can not).
10 To accomplish this, load a \fname{.cfg} file (as described in
11 \reference{ref:manage_settings}) containing the following line:
12 \config{root~menu~order:items}, where ``items'' is a comma separated list
13 (no spaces around the commas!) of the following
14 words: \config{bookmarks}, \config{files}, \opt{tagcache}{\config{database}, }%
15 \config{wps}, \config{settings}, \opt{recording}{\config{recording}, }%
16 \opt{radio}{\config{radio}, }\config{playlists}, \config{plugins},
17 \config{system\_menu}, \opt{PLAYER_PAD}{\config{shutdown}, }\config{shortcuts}.
18 Each of the words, if it occurs in the list, activates the appropriate item
19 in the main menu. The order of the items is given by the order of the words
20 in the list. The items whose words do not occur in the list will be hidden,
21 with one exception: the menu item \setting{Settings} will be shown even if
22 its word is not in the list (it is added as the last item then).
24 The following configuration example will change the main menu so that it will
25 contain only the items for the file browser, for resuming the playback, and
26 for changing the settings (the latter will be added automatically).
27 \begin{example}
28 \config{root menu order:files,wps}
29 \end{example}
32 To reset the menu items to the default, use \config{root~menu~order:-} (i.e.
33 use a hyphen instead of ``items'').
35 This configuration entry can only be created and edited with a text editor. It is
36 not possible to change this setting via the settings menu.
38 \opt{lcd_bitmap}{
39 \subsection{\label{ref:GettingExtras}Getting Extras}
41 Rockbox supports custom fonts. A collection of fonts is available for download
42 in the font package at \url{http://www.rockbox.org/daily.shtml}.}
44 \opt{lcd_bitmap}{
45 \subsection{\label{ref:Loadingfonts}Loading Fonts}\index{Fonts}
46 Rockbox can load fonts dynamically. Simply copy the \fname{.fnt} file to the
47 \dap{} and ``play'' it in the \setting{File Browser}. If you want a font to
48 be loaded automatically every time you start up, it must be located in the
49 \fname{/.rockbox/fonts} directory and the filename must be at most 24 characters
50 long. You can browse the fonts in \fname{/.rockbox/fonts} under
51 \setting{Settings $\rightarrow$ Theme Settings $\rightarrow$ Font}
52 in the \setting{Main Menu}.\\
54 \note{Advanced Users Only: Any BDF font should
55 be usable with Rockbox. To convert from \fname{.bdf} to \fname{.fnt}, use
56 the \fname{convbdf} tool. This tool can be found in the \fname{tools}
57 directory of the Rockbox source code. See \wikilink{CreateFonts\#ConvBdf}
58 for more details. Or just run \fname{convbdf} without any parameters to
59 see the possible options.}
62 \subsection{\label{ref:Loadinglanguages}Loading Languages}
63 \index{Language files}%
64 Rockbox can load language files at runtime. Simply copy the \fname{.lng} file
65 \emph{(do not use the .lang file)} to the \dap\ and ``play'' it in the
66 Rockbox directory browser or select \setting{Settings $\rightarrow$
67 General Settings $\rightarrow$ Language }from the \setting{Main Menu}.\\
69 \note{If you want a language to be loaded automatically every time you start
70 up, it must be located in the \fname{/.rockbox/langs} directory and the filename
71 must be a maximum of 24 characters long.\\}
73 If your language is not yet supported and you want to write your own language
74 file find the instructions on the Rockbox website:
75 \wikilink{LangFiles}
77 \opt{lcd_color}{
78 \subsection{\label{ref:ChangingFiletypeColours}Changing Filetype Colours}
79 Rockbox has the capability to modify the \setting{File Browser} to show
80 files of different types in different colours, depending on the file extension.
82 \subsubsection{Set-up}
83 There are two steps to changing the filetype colours -- creating
84 a file with the extension \fname{.colours} and then activating it using
85 a config file. The \fname{.colours} files \emph{must} be stored in
86 the \fname{/.rockbox/themes/} directory.
87 The \fname{.colours} file is just a text file, and can be edited with
88 your text editor of choice.
90 \subsubsection{Creating the .colours file}
91 The \fname{.colours} file consists of the file extension
92 (or \fname{folder}) followed by a colon and then the colour desired
93 as an RGB value in hexadecimal, as in the following example:\\*
95 \config{folder:808080}\\
96 \config{mp3:00FF00}\\
97 \config{ogg:00FF00}\\
98 \config{txt:FF0000}\\
99 \config{???:FFFFFF}\\*
101 The permissible extensions are as follows:\\*
103 \config{folder, m3u, m3u8, cfg, wps, lng, rock, bmark, cue, colours, mpa,
104 \firmwareextension{}, %
105 \opt{swcodec}{mp1, }mp2, mp3%
106 \opt{swcodec}{, ogg, oga, wma, wmv, asf, wav, flac, ac3, a52, mpc,
107 wv, m4a, m4b, mp4, mod, shn, aif, aiff, spx, sid, adx, nsf, nsfe,
108 spc, ape, mac, sap}%
109 \opt{lcd_bitmap}{\opt{swcodec}{, mpg, mpeg}}%
110 \opt{HAVE_REMOTE_LCD}{, rwps}%
111 \opt{lcd_non-mono}{, bmp}%
112 \opt{radio}{, fmr}%
113 \opt{lcd_bitmap}{, fnt, kbd}}\\*
114 %It'd be ideal to get these from filetypes.c
116 All file extensions that are not either specifically listed in the
117 \fname{.colours} files or are not in the list above will be
118 set to the colour given by \config{???}. Extensions that
119 are in the above list but not in the \fname{.colours}
120 file will be set to the foreground colour as normal.
122 \subsubsection{Activating}
123 To activate the filetype colours, the \fname{.colours} file needs to be
124 invoked from a \fname{.cfg} configuration file. The easiest way to do
125 this is to create a new text file containing the following single
126 line:\\*
128 \config{filetype colours: /.rockbox/themes/filename.colours}\\*
130 where filename is replaced by the filename you used when creating the
131 \fname{.colours} file. Save this file as e.g. \fname{colours.cfg} in the
132 \fname{/.rockbox/themes} directory and then activate the config file
133 from the menu as normal
134 (\setting{Settings} $\rightarrow$ \setting{Theme Settings}%
135 $\rightarrow$ \setting{Browse Theme Files}).
137 \subsubsection{Editing}
138 The built-in \setting{Text Editor} (see \reference{sec:text_editor})
139 automatically understands the
140 \fname{.colours} file format, but an external text editor can
141 also be used. To edit the \fname{.colours} file using Rockbox,
142 ``play'' it in the \setting{File Browser}. The file will open in
143 the \setting{Text Editor}. Upon selecting a line, the following choices
144 will appear:\\*
146 \config{Extension}\\
147 \config{Colour}\\*
149 If \config{Extension} is selected, the \setting{virtual keyboard}
150 (see \reference{sec:virtual_keyboard}) appears,
151 allowing the file extension to be modified. If \config{Colour}
152 is selected, the colour selector screen appears. Choose the desired
153 colour, then save the \fname{.colours} file using the standard
154 \setting{Text Editor} controls.
157 \opt{lcd_non-mono}{%
158 \subsection{\label{ref:LoadingBackdrops}Loading Backdrops}
159 Rockbox supports showing an image as a backdrop in the \setting{File Browser}
160 and the menus. The backdrop image must be a \fname{.bmp} file of the exact
161 same dimensions as the display in your \dap{} (\dapdisplaysize{} with the last
162 number giving the colour depth in bits). To use an image as a backdrop browse
163 to it in the \setting{File Browser} and open the \setting{Context Menu}
164 (see \reference{ref:Contextmenu}) on it and select the option
165 \setting{Set As Backdrop}. If you want rockbox to remember your
166 backdrop the next time you start your \dap{} the backdrop must be placed in
167 the \fname{/.rockbox/backdrops} directory.
170 \nopt{lcd_charcell}{
171 \subsection{UI Viewport}
172 By default, the UI is drawn on the whole screen. This can be changed so that
173 the UI is confined to a specific area of the screen, by use of a UI
174 viewport. This is done by adding the following line to the
175 \fname{.cfg} file for a theme:\\*
177 \nopt{lcd_non-mono}{\config{ui viewport: X,Y,[width],[height],[font]}}
178 \nopt{lcd_color}{\opt{lcd_non-mono}{
179 \config{ui viewport: X,Y,[width],[height],[font],[fgshade],[bgshade]}}}
180 \opt{lcd_color}{
181 \config{ui viewport: X,Y,[width],[height],[font],[fgcolour],[bgcolour]}}
184 \opt{HAVE_REMOTE_LCD}{
185 The dimensions of the menu that is displayed on the remote control of your
186 \dap\ can be set in the same way. The line to be added to the theme
187 \fname{.cfg} is the following:\\*
189 \nopt{lcd_non-mono}{\config{remote ui viewport: X,Y,[width],[height],[font]}}
190 \nopt{lcd_color}{\opt{lcd_non-mono}{
191 \config{remote ui viewport: X,Y,[width],[height],[font],[fgshade],[bgshade]}}}
192 \opt{lcd_color}{
193 \config{remote ui viewport: X,Y,[width],[height],[font],[fgcolour],[bgcolour]}}
197 Only the first two parameters \emph{have} to be specified, the others can
198 be omitted using `-' as a placeholder. The syntax is very similar to WPS
199 viewports (see \reference{ref:Viewports}). Briefly:
201 \nopt{lcd_non-mono}{\input{advanced_topics/viewports/mono-uivp-syntax.tex}}
202 \nopt{lcd_color}{\opt{lcd_non-mono}{\input{advanced_topics/viewports/grayscale-uivp-syntax.tex}}}
203 \opt{lcd_color}{\input{advanced_topics/viewports/colour-uivp-syntax.tex}}
206 \section{\label{ref:ConfiguringtheWPS}Configuring the Theme}
208 \subsection{Themeing -- General Info}
210 There are various different aspects of the Rockbox interface
211 that can be themed -- the WPS or \setting{While Playing Screen}, the FMS or
212 \setting{FM Screen} (if the \dap{} has a tuner), and the SBS or
213 \setting{Base Skin}. The WPS is the name used to
214 describe the information displayed on the \daps{} screen whilst an audio
215 track is being played, the FMS is the screen shown while listening to the
216 radio, and the SBS lets you specify a base skin that is shown in the
217 menus and browsers, as well as the WPS and FMS. The SBS also allows you to
218 control certain aspects of the appearance of the menus/browsers.
219 There are a number of themes included in Rockbox, and
220 you can load one of these at any time by selecting it in
221 \setting{Settings $\rightarrow$ Theme Settings $\rightarrow$ Browse Theme Files}.
222 It is also possible to set individual items of a theme from within the
223 \setting{Settings $\rightarrow$ Theme Settings} menu.
226 \subsection{\label{ref:CreateYourOwnWPS}Themes -- Create Your Own}
227 The theme files are simple text files, and can be created (or edited) in your
228 favourite text editor. To make sure non-English characters
229 display correctly in your theme you must save the theme files with UTF-8
230 character encoding. This can be done in most editors, for example Notepad in
231 Windows 2000 or XP (but not in 9x/ME) can do this.
233 \begin{description}
234 \item [Files Locations: ] Each different ``themeable'' aspect requires its own file --
235 WPS files have the extension \fname{.wps}, FM screen files have the extension
236 \fname{.fms}, and SBS files have the extension \fname{.sbs}. The main theme
237 file has the extension \fname{.cfg}. All files should have the same name.
239 The theme \fname{.cfg} file should be placed in the \fname{/.rockbox/themes}
240 directory, while the \fname{.wps}, \fname{.fms} and \fname{.sbs} files should
241 be placed in the \fname{/.rockbox/wps} directory. Any images used by the
242 theme should be placed in a subdirectory of \fname{/.rockbox/wps} with the
243 same name as the theme, e.g. if the theme files are named
244 \fname{mytheme.wps, mytheme.sbs} etc., then the images should be placed in
245 \fname{/.rockbox/wps/mytheme}.
246 \end{description}
248 All full list of the available tags are given in appendix
249 \reference{ref:wps_tags}; some of the more powerful concepts in theme design
250 are discussed below.
252 \begin{itemize}
253 \item All characters not preceded by \% are displayed as typed.
254 \item Lines beginning with \# are comments and will be ignored.
255 \end{itemize}
257 \note{Keep in mind that your \daps{} resolution is \dapdisplaysize{} (with
258 the last number giving the colour depth in bits) when
259 designing your own WPS, or if you use a WPS designed for another target.
260 \opt{HAVE_REMOTE_LCD}{The resolution of the remote is
261 \opt{iriverh100,iriverh300}{128$\times$64$\times$1}%
262 \opt{iaudiox5,iaudiom5,iaudiom3}{128$\times$96$\times$2}
263 pixels.
267 \nopt{lcd_charcell}{
268 \subsubsection{\label{ref:Viewports}Viewports}
270 By default, a viewport filling the whole screen contains all the elements
271 defined in each theme file. The
272 \opt{lcd_non-mono}{elements in this viewport are displayed
273 with the same background/\linebreak{}foreground
274 \opt{lcd_color}{colours}\nopt{lcd_color}{shades} and the}
275 text is rendered in the
276 same font as in the main menu. To change this behaviour a custom viewport can
277 be defined. A viewport is a rectangular window on the screen%
278 \opt{lcd_non-mono}{ with its own foreground/background
279 \opt{lcd_color}{colours}\nopt{lcd_color}{shades}}.
280 This window also has variable dimensions. To
281 define a viewport a line starting \config{{\%V(\dots}} has to be
282 present in the theme file. The full syntax will be explained later in
283 this section. All elements placed before the
284 line defining a viewport are displayed in the default viewport. Elements
285 defined after a viewport declaration are drawn within that viewport.
286 \opt{lcd_bitmap}{Loading images (see Appendix \reference{ref:wps_images})
287 should be done within the default viewport.}
288 A viewport ends either with the end of the file, or with the next viewport
289 declaration line. Viewports sharing the same
290 coordinates and dimensions cannot be displayed at the same time. Viewports
291 cannot be layered \emph{transparently} over one another. Subsequent viewports
292 will be drawn over any other viewports already drawn onto that
293 area of the screen.
295 \nopt{lcd_non-mono}{\input{advanced_topics/viewports/mono-vp-syntax.tex}}
296 \nopt{lcd_color}{\opt{lcd_non-mono}{\input{advanced_topics/viewports/grayscale-vp-syntax.tex}}}
297 \opt{lcd_color}{\input{advanced_topics/viewports/colour-vp-syntax.tex}}
299 \opt{lcd_non-mono}{
300 \subsubsection{Viewport Line Text Styles}
301 \begin{tagmap}
302 \config{\%Vs(mode[,param])}
303 & Set the viewport text style to `mode' from this point forward\\
304 \end{tagmap}
306 Mode can be the following:
308 \begin{rbtabular}{.75\textwidth}{lX}{\textbf{Mode} & \textbf{Description}}{}{}
309 clear & Restore the default style\\
310 invert & Draw lines inverted\\
311 color & Draw the text coloured by the value given in `param'. Functionally
312 equivalent to using the \%Vf() tag\\
313 \opt{lcd_color}{%
314 gradient & Draw the next `param' lines using a gradient as
315 defined by \%Vg. By default the gradient is drawn over 1 line.
316 \%Vs(gradient,2) will use 2 lines to fully change from the start colour to
317 the end colour\\}
318 \end{rbtabular}
321 \subsubsection{Conditional Viewports}
323 Any viewport can be displayed either permanently or conditionally.
324 Defining a viewport as \config{{\%V(\dots}}
325 will display it permanently.
327 \begin{itemize}
328 \item {\config{\%Vl('identifier',\dots)}}
329 This tag preloads a viewport for later display. `identifier' is a single
330 lowercase letter (a-z) and the `\dots' parameters use the same logic as
331 the \config{\%V} tag explained above.
332 \item {\config{\%Vd('identifier')}} Display the `identifier' viewport.
333 \end{itemize}
335 Viewports can share identifiers so that you can display multiple viewports
336 with one \%Vd line.
338 \nopt{lcd_non-mono}{\input{advanced_topics/viewports/mono-conditional.tex}}
339 \nopt{lcd_color}{%
340 \opt{lcd_non-mono}{\input{advanced_topics/viewports/grayscale-conditional.tex}}}
341 \opt{lcd_color}{\input{advanced_topics/viewports/colour-conditional.tex}}
344 \note{The tag to display conditional viewports must come before the tag to
345 preload the viewport in the \fname{.wps} file.}
347 \subsection{Info Viewport (SBS only)}
348 As mentioned above, it is possible to set a UI viewport via the theme
349 \fname{.cfg} file. It is also possible to set the UI viewport through the SBS
350 file, and to conditionally select different UI viewports.
352 \begin{itemize}
353 \item {\config{\%Vi('label',\dots)}}
354 This viewport is used as Custom UI Viewport in the case that the theme
355 doesn't have a ui viewport set in the theme \fname{.cfg} file. Having this
356 is strongly recommended since it makes you able to use the SBS
357 with other themes. If label is set this viewport can be selectivly used as the
358 Info Viewport using the \%VI tag. The `\dots' parameters use the same logic as
359 the \config{\%V} tag explained above.
361 \item {\config{\%VI('label')}} Set the Info Viewport to use the viewport called
362 label, as declared with the previous tag.
363 \end{itemize}
365 \subsection{\label{ref:multifont}Additional Fonts}
366 Additional fonts can be loaded within each screen file to be used in that
367 screen. In this way not only can you have different fonts between e.g. the menu
368 and the WPS, but you can use multiple fonts in each of the individual screens.\\
370 \config{\%Fl('id',filename,glyphs)}
372 \begin{itemize}
373 \item `id' is the number you want to use in viewport declarations, 0 and 1
374 are reserved and so can't be used.
375 \item `filename' is the font filename to load. Fonts should be stored in
376 \fname{/.rockbox/fonts/}
377 \item `glyphs' is an optional specification of how many unique glyphs to
378 store in memory. Default is from the system setting
379 \setting{Glyphs To Load}.
380 \end{itemize}
382 An example would be: \config{\%Fl(2,12-Nimbus.fnt,100)}
386 \subsubsection{Conditional Tags}
388 \begin{description}
389 \item[If/else: ]
390 Syntax: \config{\%?xx{\textless}true{\textbar}false{\textgreater}}
392 If the tag specified by ``\config{xx}'' has a value, the text between the
393 ``\config{{\textless}}'' and the ``\config{{\textbar}}'' is displayed (the true
394 part), else the text between the ``\config{{\textbar}}'' and the
395 ``\config{{\textgreater}}'' is displayed (the false part).
396 The else part is optional, so the ``\config{{\textbar}}'' does not have to be
397 specified if no else part is desired. The conditionals nest, so the text in the
398 if and else part can contain all \config{\%} commands, including conditionals.
400 \item[Enumerations: ]
401 Syntax: \config{\%?xx{\textless}alt1{\textbar}alt2{\textbar}alt3{\textbar}\dots{\textbar}else{\textgreater}}
403 For tags with multiple values, like Play status, the conditional can hold a
404 list of alternatives, one for each value the tag can have.
405 Example enumeration:
406 \begin{example}
407 \%?mp{\textless}Stop{\textbar}\%Play{\textbar}Pause{\textbar}Ffwd{\textbar}Rew{\textgreater}
408 \end{example}
410 The last else part is optional, and will be displayed if the tag has no value.
411 The WPS parser will always display the last part if the tag has no value, or if
412 the list of alternatives is too short.
413 \end{description}
415 \subsubsection{Next Song Info}
416 You can display information about the next song -- the song that is
417 about to play after the one currently playing (unless you change the
418 plan).
420 If you use the upper-case versions of the
421 three tags: \config{F}, \config{I} and \config{D}, they will instead refer to
422 the next song instead of the current one. Example: \config{\%Ig} is the genre
423 name used in the next song and \config{\%Ff} is the mp3 frequency.\\
425 \note{The next song information \emph{will not} be available at all
426 times, but will most likely be available at the end of a song. We
427 suggest you use the conditional display tag a lot when displaying
428 information about the next song!}
430 \subsubsection{\label{ref:AlternatingSublines}Alternating Sublines}
432 It is possible to group items on each line into 2 or more groups or
433 ``sublines''. Each subline will be displayed in succession on the line for a
434 specified time, alternating continuously through each defined subline.
436 Items on a line are broken into sublines with the semicolon
437 `\config{;}' character. The display time for
438 each subline defaults to 2 seconds unless modified by using the
439 `\config{\%t}' tag to specify an alternate
440 time (in seconds and optional tenths of a second) for the subline to be
441 displayed.
443 Subline related special characters and tags:
444 \begin{description}
445 \item[;] Split items on a line into separate sublines
446 \item[\%t] Set the subline display time. The
447 `\config{\%t}' is followed by either integer seconds (\config{\%t5}), or seconds
448 and tenths of a second within () e.g. (\config{\%t(3.5)}).
449 \end{description}
451 Each alternating subline can still be optionally scrolled while it is
452 being displayed, and scrollable formats can be displayed on the same
453 line with non{}-scrollable formats (such as track elapsed time) as long
454 as they are separated into different sublines.
455 Example subline definition:
456 \begin{example}
457 %s%t(4)%ia;%s%it;%t(3)%pc %pr : Display id3 artist for 4 seconds,
458 Display id3 title for 2 seconds,
459 Display current and remaining track time
460 for 3 seconds,
461 repeat...
462 \end{example}
464 Conditionals can be used with sublines to display a different set and/or number
465 of sublines on the line depending on the evaluation of the conditional.
466 Example subline with conditionals:
467 \begin{example}
468 %?it{\textless}%t(8)%s%it{\textbar}%s%fn{\textgreater};%?ia{\textless}%t(3)%s%ia{\textbar}%t(0){\textgreater}\\
469 \end{example}
471 The format above will do two different things depending if ID3 tags are
472 present. If the ID3 artist and title are present:
473 \begin{itemize}
474 \item Display id3 title for 8 seconds,
475 \item Display id3 artist for 3 seconds,
476 \item repeat\dots
477 \end{itemize}
478 If the ID3 artist and title are not present:
479 \begin{itemize}
480 \item Display the filename continuously.
481 \end{itemize}
482 Note that by using a subline display time of 0 in one branch of a conditional,
483 a subline can be skipped (not displayed) when that condition is met.
485 \subsubsection{Using Images}
486 You can have as many as 52 images in your WPS. There are various ways of
487 displaying images:
488 \begin{enumerate}
489 \item Load and always show the image, using the \config{\%x} tag
490 \item Preload the image with \config{\%xl} and show it with \config{\%xd}.
491 This way you can have your images displayed conditionally.
492 \nopt{archos}{%
493 \item Load an image and show as backdrop using the \config{\%X} tag. The
494 image must be of the same exact dimensions as your display.
496 \end{enumerate}
498 \optv{swcodec}{% This doesn't depend on swcodec but we don't have a \noptv
499 % command.
500 Example on background image use:
501 \begin{example}
502 %X(background.bmp)
503 \end{example}
504 The image with filename \fname{background.bmp} is loaded and used in the WPS.
507 Example on bitmap preloading and use:
508 \begin{example}
509 %x(a,static_icon.bmp,50,50)
510 %xl(b,rep\_off.bmp,16,64)
511 %xl(c,rep\_all.bmp,16,64)
512 %xl(d,rep\_one.bmp,16,64)
513 %xl(e,rep\_shuffle.bmp,16,64)
514 %?mm<%xd(b)|%xd(c)|%xd(d)|%xd(e)>
515 \end{example}
516 Four images at the same x and y position are preloaded in the example. Which
517 image to display is determined by the \config{\%mm} tag (the repeat mode).
519 \subsubsection{Example File}
520 \begin{example}
521 %s%?in<%in - >%?it<%it|%fn> %?ia<[%ia%?id<, %id>]>
522 %pb%pc/%pt
523 \end{example}
524 That is, ``tracknum -- title [artist, album]'', where most fields are only
525 displayed if available. Could also be rendered as ``filename'' or ``tracknum --
526 title [artist]''.
528 %\opt{lcd_bitmap}{
529 % \begin{verbatim}
530 % %s%?it<%?in<%in. |>%it|%fn>
531 % %s%?ia<%ia|%?d2<%d(2)|(root)>>
532 % %s%?id<%id|%?d1<%d(1)|(root)>> %?iy<(%iy)|>
534 % %al%pc/%pt%ar[%pp:%pe]
535 % %fbkBit %?fv<avg|> %?iv<(id3v%iv)|(no id3)>
536 % %pb
537 % %pm
538 % % \end{verbatim}
541 \section{\label{ref:manage_settings}Managing Rockbox Settings}
543 \subsection{Introduction to \fname{.cfg} Files}
544 Rockbox allows users to store and load multiple settings through the use of
545 configuration files. A configuration file is simply a text file with the
546 extension \fname{.cfg}.
548 A configuration file may reside anywhere on the disk. Multiple
549 configuration files are permitted. So, for example, you could have
550 a \fname{car.cfg} file for the settings that you use while playing your
551 jukebox in your car, and a \fname{headphones.cfg} file to store the
552 settings that you use while listening to your \dap{} through headphones.
554 See \reference{ref:cfg_specs} below for an explanation of the format
555 for configuration files. See \reference{ref:manage_settings_menu} for an
556 explanation of how to create, edit and load configuration files.
558 \subsection{\label{ref:cfg_specs}Specifications for \fname{.cfg} Files}
560 The Rockbox configuration file is a plain text file, so once you use the
561 \setting{Save .cfg file} option to create the file, you can edit the file on
562 your computer using any text editor program. See
563 Appendix \reference{ref:config_file_options} for available settings. Configuration
564 files use the following formatting rules: %
566 \begin{enumerate}
567 \item Each setting must be on a separate line.
568 \item Each line has the format ``setting: value''.
569 \item Values must be within the ranges specified in this manual for each
570 setting.
571 \item Lines starting with \# are ignored. This lets you write comments into
572 your configuration files.
573 \end{enumerate}
575 Example of a configuration file:
576 \begin{example}
577 volume: 70
578 bass: 11
579 treble: 12
580 balance: 0
581 time format: 12hour
582 volume display: numeric
583 show files: supported
584 wps: /.rockbox/car.wps
585 lang: /.rockbox/afrikaans.lng
586 \end{example}
588 \note{As you can see from the example, configuration files do not need to
589 contain all of the Rockbox options. You can create configuration files
590 that change only certain settings. So, for example, suppose you
591 typically use the \dap{} at one volume in the car, and another when using
592 headphones. Further, suppose you like to use an inverse LCD when you are
593 in the car, and a regular LCD setting when you are using headphones. You
594 could create configuration files that control only the volume and LCD
595 settings. Create a few different files with different settings, give
596 each file a different name (such as \fname{car.cfg},
597 \fname{headphones.cfg}, etc.), and you can then use the \setting{Browse .cfg
598 files} option to quickly change settings.\\}
600 A special case configuration file can be used to force a particular setting
601 or settings every time Rockbox starts up (e.g. to set the volume to a safe
602 level). Format a new configuration file as above with the required setting(s)
603 and save it into the \fname{/.rockbox} directory with the filename
604 \fname{fixed.cfg}.
606 \subsection{\label{ref:manage_settings_menu}The \setting{Manage Settings}
607 menu} The \setting{Manage Settings} menu can be found in the \setting{Main
608 Menu}. The \setting{Manage Settings} menu allows you to save and load
609 \fname{.cfg} files.
611 \begin{description}
613 \item [Browse .cfg Files]Opens the \setting{File Browser} in the
614 \fname{/.rockbox} directory and displays all \fname{.cfg} (configuration)
615 files. Selecting a \fname{.cfg} file will cause Rockbox to load the settings
616 contained in that file. Pressing \ActionStdCancel{} will exit back to the
617 \setting{Manage Settings} menu. See the \setting{Write .cfg files} option on
618 the \setting{Manage Settings} menu for details of how to save and edit a
619 configuration file.
621 \item [Reset Settings]This wipes the saved settings
622 in the \dap{} and resets all settings to their default values.
624 \opt{IRIVER_H100_PAD,IRIVER_H300_PAD,IAUDIO_X5_PAD,SANSA_E200_PAD,SANSA_C200_PAD%
625 ,PBELL_VIBE500_PAD}{
626 \note{You can also reset all settings to their default
627 values by turning off the \dap, turning it back on, and holding the
628 \ButtonRec{} button immediately after the \dap{} turns on.}
630 \opt{IRIVER_H10_PAD}{\note{You can also reset all settings to
631 their default values by turning off the \dap, and turning it back on
632 with the \ButtonHold{} button on.}
634 \opt{IPOD_4G_PAD}{\note{You can also reset all settings to their default
635 values by turning off the \dap, turning it back on, and activating the
636 \ButtonHold{} button immediately after the backlight comes on.}
638 \opt{GIGABEAT_PAD}{\note{You can also reset all settings to their default
639 values by turning off the \dap, turning it back on and pressing the
640 \ButtonA{} button immediately after the \dap{} turns on.}
643 \item [Save .cfg File]This option writes a \fname{.cfg} file to
644 your \daps{} disk. The configuration file has the \fname{.cfg}
645 extension and is used to store all of the user settings that are described
646 throughout this manual.
648 Hint: Use the \setting{Save .cfg File} feature (\setting{Main Menu
649 $\rightarrow$ Manage Settings}) to save the current settings, then
650 use a text editor to customize the settings file. See Appendix
651 \reference{ref:config_file_options} for the full reference of available
652 options.
654 \item [Save Sound Settings]This option writes a \fname{.cfg} file to
655 your \daps{} disk. The configuration file has the \fname{.cfg}
656 extension and is used to store all of the sound related settings.
658 \item [Save Theme Settings]This option writes a \fname{.cfg} file to
659 your \daps{} disk. The configuration file has the \fname{.cfg}
660 extension and is used to store all of the theme related settings.
662 \end{description}
664 \section{\label{ref:FirmwareLoading}Firmware Loading}
665 \opt{player,recorder,recorderv2fm,ondio}{
666 When your \dap{} powers on, it loads the Archos firmware in ROM, which
667 automatically checks your \daps{} root directory for a file named
668 \firmwarefilename. Note that Archos firmware can only read the first
669 ten characters of each filename in this process, so do not rename your old
670 firmware files with names like \firmwarefilename.\fname{old} and so on,
671 because it is possible that the \dap{} will load a file other than the one
672 you intended.
675 \subsection{\label{ref:using_rolo}Using ROLO (Rockbox Loader)}
676 Rockbox is able to load and start another firmware file without rebooting.
677 You just ``play'' a file with the extension %
678 \opt{recorder,recorderv2fm,ondio}{\fname{.ajz}.} %
679 \opt{player}{\fname{.mod}.} %
680 \opt{iriverh100,iriverh300}{\fname{.iriver}.} %
681 \opt{ipod}{\fname{.ipod}.} %
682 \opt{iaudio}{\fname{.iaudio}.} %
683 \opt{sansa,iriverh10,iriverh10_5gb,vibe500}{\fname{.mi4}.} %
684 \opt{sansaAMS,fuzeplus}{\fname{.sansa}.} %
685 \opt{gigabeatf,gigabeats}{\fname{.gigabeat}.} %
686 This can be used to test new firmware versions without deleting your
687 current version.
689 \opt{archos}{\input{advanced_topics/archos-flashing.tex}}
691 \section{Optimising battery runtime}
692 Rockbox offers a lot of settings that have high impact on the battery runtime
693 of your \dap{}. The largest power savings can be achieved through disabling
694 unneeded hardware components -- for some of those there are settings
695 available.
696 \opt{swcodec}{
697 Another area of savings is avoiding or reducing CPU boosting
698 through disabling computing intense features (e.g. sound processing) or
699 using effective audio codecs.
700 } The following provides a short overview of the most relevant settings and
701 rules of thumb.
703 \nopt{ondio}{
704 \subsection{Display backlight}
705 The active backlight consumes a lot of power. Therefore choose a setting that
706 disables the backlight after timeout (for setting \setting{Backlight} see
707 \reference{ref:Displayoptions}). Avoid to have the backlight enabled all the
708 time.
711 \opt{lcd_sleep}{
712 \subsection{Display power-off}
713 Shutting down the display and the display controller saves a reasonable amount
714 of power. Choose a setting that will put the display to sleep after timeout
715 (for setting \setting{Sleep} see \reference{ref:Displayoptions}). Avoid to
716 have the display enabled all the time -- even, if the display is transflective
717 and is readable without backlight. Depending on your \dap{} it might be
718 significantly more efficient to re-enable the display and its backlight for a
719 glimpse a few times per hour than to keep the display enabled.
722 \opt{accessory_supply}{
723 \subsection{Accessory power supply}
724 As default your \dap{}'s accessory power supply is always enabled to ensure
725 proper function of connected accessory devices. Disable this power supply, if
726 -- or as long as -- you do not use any accessory device with your \dap{} while
727 running Rockbox (see \reference{ref:AccessoryPowerSupply}).
730 \opt{lineout_poweroff}{
731 \subsection{Line Out}
732 Rockbox allows to switch off the line-out on your \dap{}. If you do not need
733 the line-out, switch it off (see \reference{ref:LineoutOnOff}).
736 \opt{spdif_power}{
737 \subsection{Optical Output}
738 Rockbox allows to switch off the S/PDIF output on your \dap{}. If you do not
739 need this output, switch it off (see \reference{ref:SPDIF_OnOff}).
742 \opt{disk_storage}{
743 \subsection{Anti-Skip Buffer}
744 Having a large anti-skip buffer tends to use more power, and may reduce your
745 battery life. It is recommended to always use the lowest possible setting
746 that allows correct and continuous playback (see \reference{ref:AntiSkipBuf}).
749 \opt{swcodec}{
750 \subsection{Replaygain}
751 Replaygain is a post processing that equalises the playback volume of audio
752 files to the same perceived loudness. This post processing applies a factor
753 to each single PCM sample and is therefore consuming additional CPU time. If
754 you want to achieve some (minor) savings in runtime, switch this feature off
755 (see \reference{ref:ReplayGain}).
758 \opt{lcd_bitmap}{
759 \subsection{Peak Meter}
760 The peak meter is a feature of the While Playing Screen and will be updated with a
761 high framerate. Depending on your \dap{} this might result in a high CPU load. To
762 save battery runtime you should switch this feature off (see \reference{ref:peak_meter}).
763 \opt{ipodvideo}{
764 \note{Especially the \playerman{} \playertype{} suffers from an enabled peak meter.}
768 \opt{swcodec,disk_storage,flash_storage}{
769 \subsection{Audio format and bitrate}
770 \opt{swcodec}{
771 In general the fastest decoding audio format will be the best in terms of
772 battery runtime on your \dap{}. An overview of different codec's performance
773 on different \dap{}s can be found at \wikilink{CodecPerformanceComparison}.
776 \opt{flash_storage}{
777 Your target uses flash that consumes a certain amount of power during access.
778 The less often the flash needs to be switched on for buffering and the shorter
779 the buffering duration is, the lower is the overall power consumption.
780 Therefore the bitrate of the audio files does have an impact on the battery
781 runtime as well. Lower bitrate audio files will result in longer battery
782 runtime.
784 \opt{disk_storage}{
785 Your target uses a hard disk which consumes a large amount of power while
786 spinning -- up to several hundred mA. The less often the hard disk needs to
787 spin up for buffering and the shorter the buffering duration is, the lower is
788 the power consumption. Therefore the bitrate of the audio files does have an
789 impact on the battery runtime as well. Lower bitrate audio files will result
790 in longer battery runtime.
793 Please do not re-encode any existing audio files from one lossy format to
794 another based upon the above mentioned. This will reduce the audio quality.
795 If you have the choice, select the best suiting codec when encoding the
796 original source material.
799 \opt{swcodec}{
800 \subsection{Sound settings}
801 In general all kinds of sound processing will need more CPU time and therefore
802 consume more power. The less sound processing you use, the better it is for
803 the battery runtime (for options see \reference{ref:configure_rockbox_sound}).