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