blob: 9ddf68010643fcf153c47600ac26fa4d70d4f6ce [file] [log] [blame]
Nils Wallméniuscb527ca2006-09-10 10:17:47 +00001% $Id$ %
Martin Arver8e8207f2006-02-11 00:57:17 +00002\chapter{Advanced Topics}
Martin Arver35dcf902006-03-08 17:58:11 +00003
Marc Guay85eec852008-06-24 05:16:23 +00004\section{\label{ref:CustomisingUI}Customising the User Interface}
Jonathan Gordon13412f62012-02-09 21:21:40 +11005
6\subsection{\label{ref:CustomisingTheMainMenu}Customising The Main Menu}
7
8It is possible to customise the main menu, i.e. to reorder or to hide some
Alexander Levinfa452c12012-03-02 20:53:25 +01009of its items (only the main menu can be customised, submenus can not).
10To 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
14words: \config{bookmarks}, \config{files}, \opt{tagcache}{\config{database}, }%
Jonathan Gordon13412f62012-02-09 21:21:40 +110015\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}.
18Each of the words, if it occurs in the list, activates the appropriate item
19in the main menu. The order of the items is given by the order of the words
20in the list. The items whose words do not occur in the list will be hidden,
Alexander Levinfa452c12012-03-02 20:53:25 +010021with one exception: the menu item \setting{Settings} will be shown even if
22its word is not in the list (it is added as the last item then).
Jonathan Gordon13412f62012-02-09 21:21:40 +110023
Alexander Levinfa452c12012-03-02 20:53:25 +010024The following configuration example will change the main menu so that it will
25contain only the items for the file browser, for resuming the playback, and
26for changing the settings (the latter will be added automatically).
27\begin{example}
28 \config{root menu order:files,wps}
29\end{example}
Jonathan Gordon9f48f5f2012-02-27 09:34:37 +110030
Alexander Levinfa452c12012-03-02 20:53:25 +010031
32To reset the menu items to the default, use \config{root~menu~order:-} (i.e.
33use a hyphen instead of ``items'').
34
Sebastian Leonhardt6548dc22016-04-13 00:14:02 +020035This configuration entry can only be created and edited with a text editor or
36the Main Menu Config Plugin (see \reference{ref:main_menu_config}).
37It is not possible to change this setting via the settings menu.
Jonathan Gordon13412f62012-02-09 21:21:40 +110038
Nils Wallménius12eb0582008-03-23 22:07:09 +000039\opt{lcd_bitmap}{
Marianne Arnoldaf78b5f2008-07-06 16:10:28 +000040\subsection{\label{ref:GettingExtras}Getting Extras}
41
Martin Arver7bdd03a2006-08-27 15:00:50 +000042Rockbox supports custom fonts. A collection of fonts is available for download
Marianne Arnoldaf78b5f2008-07-06 16:10:28 +000043in the font package at \url{http://www.rockbox.org/daily.shtml}.}
Martin Arver8e8207f2006-02-11 00:57:17 +000044
Nils Wallménius12eb0582008-03-23 22:07:09 +000045\opt{lcd_bitmap}{
Dominik Riebeling85deab12006-11-20 19:56:55 +000046 \subsection{\label{ref:Loadingfonts}Loading Fonts}\index{Fonts}
Nils Wallméniuscb527ca2006-09-10 10:17:47 +000047 Rockbox can load fonts dynamically. Simply copy the \fname{.fnt} file to the
48 \dap{} and ``play'' it in the \setting{File Browser}. If you want a font to
49 be loaded automatically every time you start up, it must be located in the
Marianne Arnoldb2f7c612007-12-14 02:03:58 +000050 \fname{/.rockbox/fonts} directory and the filename must be at most 24 characters
Nils Wallméniuscb527ca2006-09-10 10:17:47 +000051 long. You can browse the fonts in \fname{/.rockbox/fonts} under
Jonas Häggqvist4b831752009-06-22 17:37:36 +000052 \setting{Settings $\rightarrow$ Theme Settings $\rightarrow$ Font}
Alex Parker51743412009-08-25 21:51:55 +000053 in the \setting{Main Menu}.\\
54
Alexander Levind9306412010-05-18 20:45:32 +000055 \note{Advanced Users Only: Any BDF font should
Nils Wallméniuscb527ca2006-09-10 10:17:47 +000056 be usable with Rockbox. To convert from \fname{.bdf} to \fname{.fnt}, use
57 the \fname{convbdf} tool. This tool can be found in the \fname{tools}
Alexander Levind9306412010-05-18 20:45:32 +000058 directory of the Rockbox source code. See \wikilink{CreateFonts\#ConvBdf}
Alexander Levin3fa48ee2010-05-19 16:34:20 +000059 for more details. Or just run \fname{convbdf} without any parameters to
60 see the possible options.}
Dominik Riebelingebb8a222006-04-04 17:48:10 +000061}
Martin Arver8e8207f2006-02-11 00:57:17 +000062
63\subsection{\label{ref:Loadinglanguages}Loading Languages}
Dominik Riebeling85deab12006-11-20 19:56:55 +000064\index{Language files}%
Martin Arver47ea9062006-06-07 12:15:46 +000065Rockbox can load language files at runtime. Simply copy the \fname{.lng} file
Dominik Riebelingb7eef892006-04-10 21:47:09 +000066\emph{(do not use the .lang file)} to the \dap\ and ``play'' it in the
Nils Wallménius15c5d262007-03-15 02:09:15 +000067Rockbox directory browser or select \setting{Settings $\rightarrow$
Alex Parker51743412009-08-25 21:51:55 +000068General Settings $\rightarrow$ Language }from the \setting{Main Menu}.\\
Martin Arver8e8207f2006-02-11 00:57:17 +000069
Dominik Riebelingb7eef892006-04-10 21:47:09 +000070\note{If you want a language to be loaded automatically every time you start
Marianne Arnoldb2f7c612007-12-14 02:03:58 +000071up, it must be located in the \fname{/.rockbox/langs} directory and the filename
Alex Parker51743412009-08-25 21:51:55 +000072must be a maximum of 24 characters long.\\}
Martin Arver8e8207f2006-02-11 00:57:17 +000073
Dominik Riebelingebb8a222006-04-04 17:48:10 +000074If your language is not yet supported and you want to write your own language
75file find the instructions on the Rockbox website:
Dominik Riebelingb394e182006-12-29 19:22:56 +000076\wikilink{LangFiles}
Martin Arver8e8207f2006-02-11 00:57:17 +000077
Nils Wallménius12eb0582008-03-23 22:07:09 +000078\opt{lcd_color}{
Alexander Levin71812ca2009-03-20 19:33:20 +000079 \subsection{\label{ref:ChangingFiletypeColours}Changing Filetype Colours}
Alex Parker6c4661c2009-03-18 14:24:28 +000080 Rockbox has the capability to modify the \setting{File Browser} to show
Alexander Levin71812ca2009-03-20 19:33:20 +000081 files of different types in different colours, depending on the file extension.
Alex Parker6c4661c2009-03-18 14:24:28 +000082
Alexander Levin71812ca2009-03-20 19:33:20 +000083 \subsubsection{Set-up}
Alexander Levin277ce9a2009-03-21 09:25:49 +000084 There are two steps to changing the filetype colours -- creating
Alexander Levin71812ca2009-03-20 19:33:20 +000085 a file with the extension \fname{.colours} and then activating it using
86 a config file. The \fname{.colours} files \emph{must} be stored in
87 the \fname{/.rockbox/themes/} directory.
88 The \fname{.colours} file is just a text file, and can be edited with
89 your text editor of choice.
Alex Parker6c4661c2009-03-18 14:24:28 +000090
Alexander Levin71812ca2009-03-20 19:33:20 +000091 \subsubsection{Creating the .colours file}
92 The \fname{.colours} file consists of the file extension
93 (or \fname{folder}) followed by a colon and then the colour desired
94 as an RGB value in hexadecimal, as in the following example:\\*
95 \\
96 \config{folder:808080}\\
97 \config{mp3:00FF00}\\
98 \config{ogg:00FF00}\\
99 \config{txt:FF0000}\\
100 \config{???:FFFFFF}\\*
Alex Parker6c4661c2009-03-18 14:24:28 +0000101
Alexander Levin71812ca2009-03-20 19:33:20 +0000102 The permissible extensions are as follows:\\*
103 \\
104 \config{folder, m3u, m3u8, cfg, wps, lng, rock, bmark, cue, colours, mpa,
105 \firmwareextension{}, %
106 \opt{swcodec}{mp1, }mp2, mp3%
107 \opt{swcodec}{, ogg, oga, wma, wmv, asf, wav, flac, ac3, a52, mpc,
108 wv, m4a, m4b, mp4, mod, shn, aif, aiff, spx, sid, adx, nsf, nsfe,
109 spc, ape, mac, sap}%
110 \opt{lcd_bitmap}{\opt{swcodec}{, mpg, mpeg}}%
111 \opt{HAVE_REMOTE_LCD}{, rwps}%
112 \opt{lcd_non-mono}{, bmp}%
113 \opt{radio}{, fmr}%
114 \opt{lcd_bitmap}{, fnt, kbd}}\\*
115 %It'd be ideal to get these from filetypes.c
Alex Parker6c4661c2009-03-18 14:24:28 +0000116
Alexander Levin71812ca2009-03-20 19:33:20 +0000117 All file extensions that are not either specifically listed in the
118 \fname{.colours} files or are not in the list above will be
119 set to the colour given by \config{???}. Extensions that
120 are in the above list but not in the \fname{.colours}
121 file will be set to the foreground colour as normal.
Alex Parker6c4661c2009-03-18 14:24:28 +0000122
Alexander Levin71812ca2009-03-20 19:33:20 +0000123 \subsubsection{Activating}
124 To activate the filetype colours, the \fname{.colours} file needs to be
125 invoked from a \fname{.cfg} configuration file. The easiest way to do
126 this is to create a new text file containing the following single
127 line:\\*
128 \\
129 \config{filetype colours: /.rockbox/themes/filename.colours}\\*
Alex Parker6c4661c2009-03-18 14:24:28 +0000130
Alexander Levin71812ca2009-03-20 19:33:20 +0000131 where filename is replaced by the filename you used when creating the
132 \fname{.colours} file. Save this file as e.g. \fname{colours.cfg} in the
133 \fname{/.rockbox/themes} directory and then activate the config file
134 from the menu as normal
135 (\setting{Settings} $\rightarrow$ \setting{Theme Settings}%
Jonas Häggqvist4b831752009-06-22 17:37:36 +0000136 $\rightarrow$ \setting{Browse Theme Files}).
Alex Parker6c4661c2009-03-18 14:24:28 +0000137
Alexander Levin71812ca2009-03-20 19:33:20 +0000138 \subsubsection{Editing}
139 The built-in \setting{Text Editor} (see \reference{sec:text_editor})
140 automatically understands the
141 \fname{.colours} file format, but an external text editor can
142 also be used. To edit the \fname{.colours} file using Rockbox,
143 ``play'' it in the \setting{File Browser}. The file will open in
144 the \setting{Text Editor}. Upon selecting a line, the following choices
145 will appear:\\*
146 \\
147 \config{Extension}\\
148 \config{Colour}\\*
149
150 If \config{Extension} is selected, the \setting{virtual keyboard}
151 (see \reference{sec:virtual_keyboard}) appears,
152 allowing the file extension to be modified. If \config{Colour}
153 is selected, the colour selector screen appears. Choose the desired
154 colour, then save the \fname{.colours} file using the standard
155 \setting{Text Editor} controls.
Nils Wallménius15c5d262007-03-15 02:09:15 +0000156}
157
Marianne Arnold81892462008-07-15 20:57:05 +0000158\opt{lcd_non-mono}{%
Nils Wallméniusda555882006-11-13 15:14:28 +0000159 \subsection{\label{ref:LoadingBackdrops}Loading Backdrops}
160 Rockbox supports showing an image as a backdrop in the \setting{File Browser}
161 and the menus. The backdrop image must be a \fname{.bmp} file of the exact
Alexander Levin87b2ad142010-05-20 16:20:58 +0000162 same dimensions as the display in your \dap{} (\dapdisplaysize{} with the last
Nils Wallméniusda555882006-11-13 15:14:28 +0000163 number giving the colour depth in bits). To use an image as a backdrop browse
Marianne Arnold90bcefa2008-03-03 23:01:44 +0000164 to it in the \setting{File Browser} and open the \setting{Context Menu}
165 (see \reference{ref:Contextmenu}) on it and select the option
Nils Wallméniusda555882006-11-13 15:14:28 +0000166 \setting{Set As Backdrop}. If you want rockbox to remember your
167 backdrop the next time you start your \dap{} the backdrop must be placed in
Marianne Arnoldb2f7c612007-12-14 02:03:58 +0000168 the \fname{/.rockbox/backdrops} directory.
Nils Wallméniusda555882006-11-13 15:14:28 +0000169}%
170
Alex Parkerab563da2009-09-20 16:48:45 +0000171\nopt{lcd_charcell}{
172 \subsection{UI Viewport}
173 By default, the UI is drawn on the whole screen. This can be changed so that
174 the UI is confined to a specific area of the screen, by use of a UI
175 viewport. This is done by adding the following line to the
176 \fname{.cfg} file for a theme:\\*
177
178 \nopt{lcd_non-mono}{\config{ui viewport: X,Y,[width],[height],[font]}}
179 \nopt{lcd_color}{\opt{lcd_non-mono}{
180 \config{ui viewport: X,Y,[width],[height],[font],[fgshade],[bgshade]}}}
181 \opt{lcd_color}{
182 \config{ui viewport: X,Y,[width],[height],[font],[fgcolour],[bgcolour]}}
183 \\*
184
185 \opt{HAVE_REMOTE_LCD}{
186 The dimensions of the menu that is displayed on the remote control of your
187 \dap\ can be set in the same way. The line to be added to the theme
188 \fname{.cfg} is the following:\\*
189
190 \nopt{lcd_non-mono}{\config{remote ui viewport: X,Y,[width],[height],[font]}}
191 \nopt{lcd_color}{\opt{lcd_non-mono}{
192 \config{remote ui viewport: X,Y,[width],[height],[font],[fgshade],[bgshade]}}}
193 \opt{lcd_color}{
194 \config{remote ui viewport: X,Y,[width],[height],[font],[fgcolour],[bgcolour]}}
195 \\*
196 }
197
198 Only the first two parameters \emph{have} to be specified, the others can
Alexander Levinb57fe482009-12-23 20:05:29 +0000199 be omitted using `-' as a placeholder. The syntax is very similar to WPS
Alex Parkerab563da2009-09-20 16:48:45 +0000200 viewports (see \reference{ref:Viewports}). Briefly:
201
202 \nopt{lcd_non-mono}{\input{advanced_topics/viewports/mono-uivp-syntax.tex}}
203 \nopt{lcd_color}{\opt{lcd_non-mono}{\input{advanced_topics/viewports/grayscale-uivp-syntax.tex}}}
204 \opt{lcd_color}{\input{advanced_topics/viewports/colour-uivp-syntax.tex}}
205}
206
Alex Parker40782d52010-05-13 08:13:31 +0000207\section{\label{ref:ConfiguringtheWPS}Configuring the Theme}
Martin Arver8e8207f2006-02-11 00:57:17 +0000208
Alex Parker40782d52010-05-13 08:13:31 +0000209\subsection{Themeing -- General Info}
Martin Arver8e8207f2006-02-11 00:57:17 +0000210
Alex Parker40782d52010-05-13 08:13:31 +0000211 There are various different aspects of the Rockbox interface
212 that can be themed -- the WPS or \setting{While Playing Screen}, the FMS or
213 \setting{FM Screen} (if the \dap{} has a tuner), and the SBS or
Jonathan Gordon32382932010-05-16 11:20:42 +0000214 \setting{Base Skin}. The WPS is the name used to
Alex Parker40782d52010-05-13 08:13:31 +0000215 describe the information displayed on the \daps{} screen whilst an audio
216 track is being played, the FMS is the screen shown while listening to the
Jonathan Gordon32382932010-05-16 11:20:42 +0000217 radio, and the SBS lets you specify a base skin that is shown in the
Alex Parker40782d52010-05-13 08:13:31 +0000218 menus and browsers, as well as the WPS and FMS. The SBS also allows you to
219 control certain aspects of the appearance of the menus/browsers.
220 There are a number of themes included in Rockbox, and
Nils Wallménius01bd7362009-02-04 14:22:35 +0000221 you can load one of these at any time by selecting it in
Alex Parker40782d52010-05-13 08:13:31 +0000222 \setting{Settings $\rightarrow$ Theme Settings $\rightarrow$ Browse Theme Files}.
223 It is also possible to set individual items of a theme from within the
224 \setting{Settings $\rightarrow$ Theme Settings} menu.
Martin Arver8e8207f2006-02-11 00:57:17 +0000225
Dominik Riebelingb7eef892006-04-10 21:47:09 +0000226
Alex Parker40782d52010-05-13 08:13:31 +0000227\subsection{\label{ref:CreateYourOwnWPS}Themes -- Create Your Own}
228The theme files are simple text files, and can be created (or edited) in your
229favourite text editor. To make sure non-English characters
Alex Parker1b0c77f2010-06-20 12:58:09 +0000230display correctly in your theme you must save the theme files with UTF-8
231character encoding. This can be done in most editors, for example Notepad in
232Windows 2000 or XP (but not in 9x/ME) can do this.
Alex Parker40782d52010-05-13 08:13:31 +0000233
234\begin{description}
235\item [Files Locations: ] Each different ``themeable'' aspect requires its own file --
236 WPS files have the extension \fname{.wps}, FM screen files have the extension
237 \fname{.fms}, and SBS files have the extension \fname{.sbs}. The main theme
238 file has the extension \fname{.cfg}. All files should have the same name.
239
240 The theme \fname{.cfg} file should be placed in the \fname{/.rockbox/themes}
241 directory, while the \fname{.wps}, \fname{.fms} and \fname{.sbs} files should
242 be placed in the \fname{/.rockbox/wps} directory. Any images used by the
243 theme should be placed in a subdirectory of \fname{/.rockbox/wps} with the
244 same name as the theme, e.g. if the theme files are named
245 \fname{mytheme.wps, mytheme.sbs} etc., then the images should be placed in
246 \fname{/.rockbox/wps/mytheme}.
247\end{description}
248
249All full list of the available tags are given in appendix
Alex Parkerabd05662010-08-02 21:38:37 +0000250\reference{ref:wps_tags}; some of the more powerful concepts in theme design
Alex Parker40782d52010-05-13 08:13:31 +0000251are discussed below.
Martin Arver8e8207f2006-02-11 00:57:17 +0000252
Dominik Riebelingf949c8e2006-06-07 17:09:06 +0000253\begin{itemize}
Martin Arver09c39612006-08-18 16:57:56 +0000254\item All characters not preceded by \% are displayed as typed.
255\item Lines beginning with \# are comments and will be ignored.
Dominik Riebelingf949c8e2006-06-07 17:09:06 +0000256\end{itemize}
Dominik Riebelingb7eef892006-04-10 21:47:09 +0000257
Marianne Arnoldc4bdf202010-08-14 10:30:42 +0000258\note{Keep in mind that your \daps{} resolution is \dapdisplaysize{} (with
Dominik Riebeling5ec38052006-08-28 18:09:17 +0000259 the last number giving the colour depth in bits) when
260 designing your own WPS, or if you use a WPS designed for another target.
261 \opt{HAVE_REMOTE_LCD}{The resolution of the remote is
Marianne Arnoldb43b4932011-01-17 18:30:18 +0000262 \opt{iriverh100,iriverh300}{128$\times$64$\times$1}%
Marianne Arnoldc4bdf202010-08-14 10:30:42 +0000263 \opt{iaudiox5,iaudiom5,iaudiom3}{128$\times$96$\times$2}
264 pixels.
265 }
266}
Martin Arver6fc30d62006-08-28 17:44:49 +0000267
Alex Parkerab563da2009-09-20 16:48:45 +0000268\nopt{lcd_charcell}{
269\subsubsection{\label{ref:Viewports}Viewports}
270
271By default, a viewport filling the whole screen contains all the elements
Alex Parker64d4ddf2010-06-20 12:58:41 +0000272defined in each theme file. The
Alex Parkerab563da2009-09-20 16:48:45 +0000273\opt{lcd_non-mono}{elements in this viewport are displayed
Alexander Levin64bb9a02010-05-18 20:23:22 +0000274 with the same background/\linebreak{}foreground
Alex Parkerab563da2009-09-20 16:48:45 +0000275 \opt{lcd_color}{colours}\nopt{lcd_color}{shades} and the}
276text is rendered in the
277same font as in the main menu. To change this behaviour a custom viewport can
278be defined. A viewport is a rectangular window on the screen%
279\opt{lcd_non-mono}{ with its own foreground/background
280\opt{lcd_color}{colours}\nopt{lcd_color}{shades}}.
281This window also has variable dimensions. To
Alex Parker64d4ddf2010-06-20 12:58:41 +0000282define a viewport a line starting \config{{\%V(\dots}} has to be
283present in the theme file. The full syntax will be explained later in
Alex Parkerab563da2009-09-20 16:48:45 +0000284this section. All elements placed before the
285line defining a viewport are displayed in the default viewport. Elements
286defined after a viewport declaration are drawn within that viewport.
287\opt{lcd_bitmap}{Loading images (see Appendix \reference{ref:wps_images})
288 should be done within the default viewport.}
289A viewport ends either with the end of the file, or with the next viewport
290declaration line. Viewports sharing the same
291coordinates and dimensions cannot be displayed at the same time. Viewports
292cannot be layered \emph{transparently} over one another. Subsequent viewports
293will be drawn over any other viewports already drawn onto that
294area of the screen.
295
296\nopt{lcd_non-mono}{\input{advanced_topics/viewports/mono-vp-syntax.tex}}
297\nopt{lcd_color}{\opt{lcd_non-mono}{\input{advanced_topics/viewports/grayscale-vp-syntax.tex}}}
298\opt{lcd_color}{\input{advanced_topics/viewports/colour-vp-syntax.tex}}
299
Alex Parker77a78ee2011-08-19 11:43:51 +0000300\opt{lcd_non-mono}{
301\subsubsection{Viewport Line Text Styles}
302 \begin{tagmap}
303 \config{\%Vs(mode[,param])}
304 & Set the viewport text style to `mode' from this point forward\\
305 \end{tagmap}
306
307Mode can be the following:
308
309\begin{rbtabular}{.75\textwidth}{lX}{\textbf{Mode} & \textbf{Description}}{}{}
310 clear & Restore the default style\\
311 invert & Draw lines inverted\\
312 color & Draw the text coloured by the value given in `param'. Functionally
313 equivalent to using the \%Vf() tag\\
314 \opt{lcd_color}{%
315 gradient & Draw the next `param' lines using a gradient as
316 defined by \%Vg. By default the gradient is drawn over 1 line.
317 \%Vs(gradient,2) will use 2 lines to fully change from the start colour to
318 the end colour\\}
319\end{rbtabular}
320}
Alex Parkerab563da2009-09-20 16:48:45 +0000321
322\subsubsection{Conditional Viewports}
323
324Any viewport can be displayed either permanently or conditionally.
Alex Parker64d4ddf2010-06-20 12:58:41 +0000325Defining a viewport as \config{{\%V(\dots}}
Alex Parkerab563da2009-09-20 16:48:45 +0000326will display it permanently.
327
328\begin{itemize}
Alexander Levine39f4092010-06-23 18:21:35 +0000329\item {\config{\%Vl('identifier',\dots)}}
Alexander Levine0bb22182010-05-12 22:07:49 +0000330This tag preloads a viewport for later display. `identifier' is a single
Alexander Levin5a379bc2010-05-20 16:35:45 +0000331lowercase letter (a-z) and the `\dots' parameters use the same logic as
Alex Parkerab563da2009-09-20 16:48:45 +0000332the \config{\%V} tag explained above.
Alexander Levine39f4092010-06-23 18:21:35 +0000333\item {\config{\%Vd('identifier')}} Display the `identifier' viewport.
Alex Parkerab563da2009-09-20 16:48:45 +0000334\end{itemize}
335
336Viewports can share identifiers so that you can display multiple viewports
337with one \%Vd line.
338
339\nopt{lcd_non-mono}{\input{advanced_topics/viewports/mono-conditional.tex}}
340\nopt{lcd_color}{%
341 \opt{lcd_non-mono}{\input{advanced_topics/viewports/grayscale-conditional.tex}}}
342\opt{lcd_color}{\input{advanced_topics/viewports/colour-conditional.tex}}
343\\*
344
345\note{The tag to display conditional viewports must come before the tag to
346preload the viewport in the \fname{.wps} file.}
Alex Parker6d549df2010-05-13 08:13:37 +0000347
348\subsection{Info Viewport (SBS only)}
349As mentioned above, it is possible to set a UI viewport via the theme
350\fname{.cfg} file. It is also possible to set the UI viewport through the SBS
351file, and to conditionally select different UI viewports.
352
353 \begin{itemize}
Alexander Levine39f4092010-06-23 18:21:35 +0000354 \item {\config{\%Vi('label',\dots)}}
Alex Parker6d549df2010-05-13 08:13:37 +0000355 This viewport is used as Custom UI Viewport in the case that the theme
356 doesn't have a ui viewport set in the theme \fname{.cfg} file. Having this
357 is strongly recommended since it makes you able to use the SBS
358 with other themes. If label is set this viewport can be selectivly used as the
Alexander Levin5a379bc2010-05-20 16:35:45 +0000359 Info Viewport using the \%VI tag. The `\dots' parameters use the same logic as
Alex Parker6d549df2010-05-13 08:13:37 +0000360 the \config{\%V} tag explained above.
361
Alexander Levine39f4092010-06-23 18:21:35 +0000362 \item {\config{\%VI('label')}} Set the Info Viewport to use the viewport called
Alex Parker6d549df2010-05-13 08:13:37 +0000363 label, as declared with the previous tag.
364 \end{itemize}
Alex Parker1b0c77f2010-06-20 12:58:09 +0000365
366\subsection{\label{ref:multifont}Additional Fonts}
367Additional fonts can be loaded within each screen file to be used in that
368screen. In this way not only can you have different fonts between e.g. the menu
369and the WPS, but you can use multiple fonts in each of the individual screens.\\
370
Jonathan Gordonfaaf4312010-08-25 14:11:38 +0000371\config{\%Fl('id',filename,glyphs)}
Alex Parker1b0c77f2010-06-20 12:58:09 +0000372
373 \begin{itemize}
Alex Parker994d9552010-06-20 16:23:47 +0000374 \item `id' is the number you want to use in viewport declarations, 0 and 1
Alex Parker1b0c77f2010-06-20 12:58:09 +0000375 are reserved and so can't be used.
376 \item `filename' is the font filename to load. Fonts should be stored in
377 \fname{/.rockbox/fonts/}
Jonathan Gordonfaaf4312010-08-25 14:11:38 +0000378 \item `glyphs' is an optional specification of how many unique glyphs to
Fred Bauerea7a8962011-11-19 23:34:26 +0000379 store in memory. Default is from the system setting
380 \setting{Glyphs To Load}.
Alex Parker1b0c77f2010-06-20 12:58:09 +0000381 \end{itemize}
382
Jonathan Gordonfaaf4312010-08-25 14:11:38 +0000383 An example would be: \config{\%Fl(2,12-Nimbus.fnt,100)}
Alex Parker1b0c77f2010-06-20 12:58:09 +0000384
Alex Parkerab563da2009-09-20 16:48:45 +0000385}
386
Martin Arvera245e882006-03-08 15:04:36 +0000387\subsubsection{Conditional Tags}
Martin Arverd3d3e342006-03-15 10:56:14 +0000388
Martin Arver47ea9062006-06-07 12:15:46 +0000389\begin{description}
390\item[If/else: ]
Dominik Riebelingf949c8e2006-06-07 17:09:06 +0000391Syntax: \config{\%?xx{\textless}true{\textbar}false{\textgreater}}
Martin Arver8e8207f2006-02-11 00:57:17 +0000392
Martin Arver68e40172006-06-07 16:37:04 +0000393If the tag specified by ``\config{xx}'' has a value, the text between the
394``\config{{\textless}}'' and the ``\config{{\textbar}}'' is displayed (the true
395part), else the text between the ``\config{{\textbar}}'' and the
396``\config{{\textgreater}}'' is displayed (the false part).
397The else part is optional, so the ``\config{{\textbar}}'' does not have to be
398specified if no else part is desired. The conditionals nest, so the text in the
399if and else part can contain all \config{\%} commands, including conditionals.
Martin Arverd3d3e342006-03-15 10:56:14 +0000400
Martin Arver47ea9062006-06-07 12:15:46 +0000401\item[Enumerations: ]
Dominik Riebelingf949c8e2006-06-07 17:09:06 +0000402Syntax: \config{\%?xx{\textless}alt1{\textbar}alt2{\textbar}alt3{\textbar}\dots{\textbar}else{\textgreater}}
Martin Arver8e8207f2006-02-11 00:57:17 +0000403
Martin Arver68e40172006-06-07 16:37:04 +0000404For tags with multiple values, like Play status, the conditional can hold a
405list of alternatives, one for each value the tag can have.
Martin Arver68e40172006-06-07 16:37:04 +0000406Example enumeration:
407\begin{example}
Alex Mayer6c4395b2012-10-05 11:19:27 -0400408 \%?mp{\textless}Stop{\textbar}Play{\textbar}Pause{\textbar}Ffwd{\textbar}Rew{\textgreater}
Martin Arver68e40172006-06-07 16:37:04 +0000409\end{example}
Martin Arver8e8207f2006-02-11 00:57:17 +0000410
Martin Arver68e40172006-06-07 16:37:04 +0000411The last else part is optional, and will be displayed if the tag has no value.
412The WPS parser will always display the last part if the tag has no value, or if
413the list of alternatives is too short.
Martin Arver47ea9062006-06-07 12:15:46 +0000414\end{description}
Martin Arver8e8207f2006-02-11 00:57:17 +0000415
Marc Guay85eec852008-06-24 05:16:23 +0000416\subsubsection{Next Song Info}
Dominik Riebelingb7eef892006-04-10 21:47:09 +0000417You can display information about the next song -- the song that is
Martin Arver8e8207f2006-02-11 00:57:17 +0000418about to play after the one currently playing (unless you change the
Martin Arvera245e882006-03-08 15:04:36 +0000419plan).
Martin Arver8e8207f2006-02-11 00:57:17 +0000420
Dominik Riebelingf949c8e2006-06-07 17:09:06 +0000421If you use the upper-case versions of the
Martin Arver68e40172006-06-07 16:37:04 +0000422three tags: \config{F}, \config{I} and \config{D}, they will instead refer to
423the next song instead of the current one. Example: \config{\%Ig} is the genre
Alex Parker51743412009-08-25 21:51:55 +0000424name used in the next song and \config{\%Ff} is the mp3 frequency.\\
Martin Arver8e8207f2006-02-11 00:57:17 +0000425
Dominik Riebelingf949c8e2006-06-07 17:09:06 +0000426\note{The next song information \emph{will not} be available at all
Martin Arver09c39612006-08-18 16:57:56 +0000427 times, but will most likely be available at the end of a song. We
428 suggest you use the conditional display tag a lot when displaying
429 information about the next song!}
Martin Arvera245e882006-03-08 15:04:36 +0000430
Alex Parkere56030a2009-05-15 21:17:21 +0000431\subsubsection{\label{ref:AlternatingSublines}Alternating Sublines}
Martin Arver8e8207f2006-02-11 00:57:17 +0000432
Martin Arver68e40172006-06-07 16:37:04 +0000433It is possible to group items on each line into 2 or more groups or
434``sublines''. Each subline will be displayed in succession on the line for a
435specified time, alternating continuously through each defined subline.
Martin Arver8e8207f2006-02-11 00:57:17 +0000436
437Items on a line are broken into sublines with the semicolon
Alexander Levin5a379bc2010-05-20 16:35:45 +0000438`\config{;}' character. The display time for
Martin Arver8e8207f2006-02-11 00:57:17 +0000439each subline defaults to 2 seconds unless modified by using the
Alexander Levin5a379bc2010-05-20 16:35:45 +0000440`\config{\%t}' tag to specify an alternate
Martin Arver8e8207f2006-02-11 00:57:17 +0000441time (in seconds and optional tenths of a second) for the subline to be
442displayed.
443
444Subline related special characters and tags:
Dominik Riebelingf949c8e2006-06-07 17:09:06 +0000445\begin{description}
446\item[;] Split items on a line into separate sublines
447\item[\%t] Set the subline display time. The
Alex Parker64d4ddf2010-06-20 12:58:41 +0000448`\config{\%t}' is followed by either integer seconds (\config{\%t5}), or seconds
449and tenths of a second within () e.g. (\config{\%t(3.5)}).
Dominik Riebelingf949c8e2006-06-07 17:09:06 +0000450\end{description}
Martin Arver8e8207f2006-02-11 00:57:17 +0000451
452Each alternating subline can still be optionally scrolled while it is
453being displayed, and scrollable formats can be displayed on the same
454line with non{}-scrollable formats (such as track elapsed time) as long
Martin Arvera245e882006-03-08 15:04:36 +0000455as they are separated into different sublines.
Martin Arvera245e882006-03-08 15:04:36 +0000456Example subline definition:
Martin Arver47ea9062006-06-07 12:15:46 +0000457\begin{example}
Alex Parker64d4ddf2010-06-20 12:58:41 +0000458 %s%t(4)%ia;%s%it;%t(3)%pc %pr : Display id3 artist for 4 seconds,
Martin Arver49cdd5e2006-06-07 13:29:52 +0000459 Display id3 title for 2 seconds,
460 Display current and remaining track time
461 for 3 seconds,
462 repeat...
Martin Arver47ea9062006-06-07 12:15:46 +0000463\end{example}
Martin Arver8e8207f2006-02-11 00:57:17 +0000464
Martin Arver68e40172006-06-07 16:37:04 +0000465Conditionals can be used with sublines to display a different set and/or number
466of sublines on the line depending on the evaluation of the conditional.
Martin Arvera245e882006-03-08 15:04:36 +0000467Example subline with conditionals:
Martin Arver47ea9062006-06-07 12:15:46 +0000468\begin{example}
Alex Parker64d4ddf2010-06-20 12:58:41 +0000469 %?it{\textless}%t(8)%s%it{\textbar}%s%fn{\textgreater};%?ia{\textless}%t(3)%s%ia{\textbar}%t(0){\textgreater}\\
Martin Arver47ea9062006-06-07 12:15:46 +0000470\end{example}
Martin Arver8e8207f2006-02-11 00:57:17 +0000471
Martin Arver68e40172006-06-07 16:37:04 +0000472The format above will do two different things depending if ID3 tags are
473present. If the ID3 artist and title are present:
Dominik Riebelingf949c8e2006-06-07 17:09:06 +0000474\begin{itemize}
475\item Display id3 title for 8 seconds,
476\item Display id3 artist for 3 seconds,
477\item repeat\dots
478\end{itemize}
479If the ID3 artist and title are not present:
480\begin{itemize}
481\item Display the filename continuously.
482\end{itemize}
Dominik Riebelingebb8a222006-04-04 17:48:10 +0000483Note that by using a subline display time of 0 in one branch of a conditional,
484a subline can be skipped (not displayed) when that condition is met.
Martin Arvera245e882006-03-08 15:04:36 +0000485
Martin Arvera245e882006-03-08 15:04:36 +0000486\subsubsection{Using Images}
Dominik Riebelingb7eef892006-04-10 21:47:09 +0000487You can have as many as 52 images in your WPS. There are various ways of
Dominik Riebelingebb8a222006-04-04 17:48:10 +0000488displaying images:
Martin Arvera245e882006-03-08 15:04:36 +0000489\begin{enumerate}
Martin Arver68e40172006-06-07 16:37:04 +0000490 \item Load and always show the image, using the \config{\%x} tag
491 \item Preload the image with \config{\%xl} and show it with \config{\%xd}.
492 This way you can have your images displayed conditionally.
Nils Wallméniusda555882006-11-13 15:14:28 +0000493 \nopt{archos}{%
Martin Arver09c39612006-08-18 16:57:56 +0000494 \item Load an image and show as backdrop using the \config{\%X} tag. The
495 image must be of the same exact dimensions as your display.
Nils Wallméniusda555882006-11-13 15:14:28 +0000496 }%
Martin Arvera245e882006-03-08 15:04:36 +0000497\end{enumerate}
Martin Arver959d23e2006-06-04 15:03:39 +0000498
Nils Wallménius12eb0582008-03-23 22:07:09 +0000499\optv{swcodec}{% This doesn't depend on swcodec but we don't have a \noptv
Nils Wallméniusda555882006-11-13 15:14:28 +0000500 % command.
Martin Arver47ea9062006-06-07 12:15:46 +0000501 Example on background image use:
502 \begin{example}
Alex Parker64d4ddf2010-06-20 12:58:41 +0000503 %X(background.bmp)
Martin Arver47ea9062006-06-07 12:15:46 +0000504 \end{example}
505 The image with filename \fname{background.bmp} is loaded and used in the WPS.
Nils Wallméniusda555882006-11-13 15:14:28 +0000506}%
Martin Arver47ea9062006-06-07 12:15:46 +0000507
508Example on bitmap preloading and use:
509\begin{example}
Alex Parker64d4ddf2010-06-20 12:58:41 +0000510 %x(a,static_icon.bmp,50,50)
511 %xl(b,rep\_off.bmp,16,64)
512 %xl(c,rep\_all.bmp,16,64)
513 %xl(d,rep\_one.bmp,16,64)
514 %xl(e,rep\_shuffle.bmp,16,64)
515 %?mm<%xd(b)|%xd(c)|%xd(d)|%xd(e)>
Martin Arver47ea9062006-06-07 12:15:46 +0000516\end{example}
517Four images at the same x and y position are preloaded in the example. Which
Martin Arver68e40172006-06-07 16:37:04 +0000518image to display is determined by the \config{\%mm} tag (the repeat mode).
Martin Arvera245e882006-03-08 15:04:36 +0000519
520\subsubsection{Example File}
Martin Arver47ea9062006-06-07 12:15:46 +0000521\begin{example}
Dominik Riebelingf949c8e2006-06-07 17:09:06 +0000522 %s%?in<%in - >%?it<%it|%fn> %?ia<[%ia%?id<, %id>]>
523 %pb%pc/%pt
Martin Arver47ea9062006-06-07 12:15:46 +0000524\end{example}
Dominik Riebelingebb8a222006-04-04 17:48:10 +0000525That is, ``tracknum -- title [artist, album]'', where most fields are only
526displayed if available. Could also be rendered as ``filename'' or ``tracknum --
527title [artist]''.
Martin Arvera245e882006-03-08 15:04:36 +0000528
Nils Wallménius12eb0582008-03-23 22:07:09 +0000529%\opt{lcd_bitmap}{
Martin Arvera245e882006-03-08 15:04:36 +0000530% \begin{verbatim}
Martin Arver47ea9062006-06-07 12:15:46 +0000531% %s%?it<%?in<%in. |>%it|%fn>
Alex Parker64d4ddf2010-06-20 12:58:41 +0000532% %s%?ia<%ia|%?d2<%d(2)|(root)>>
533% %s%?id<%id|%?d1<%d(1)|(root)>> %?iy<(%iy)|>
Martin Arver47ea9062006-06-07 12:15:46 +0000534%
535% %al%pc/%pt%ar[%pp:%pe]
536% %fbkBit %?fv<avg|> %?iv<(id3v%iv)|(no id3)>
537% %pb
538% %pm
539% % \end{verbatim}
540%}
Martin Arver8e8207f2006-02-11 00:57:17 +0000541
Marc Guay85eec852008-06-24 05:16:23 +0000542\section{\label{ref:manage_settings}Managing Rockbox Settings}
Martin Arver8e8207f2006-02-11 00:57:17 +0000543
Alexander Levin15c850c2010-01-22 22:54:05 +0000544\subsection{Introduction to \fname{.cfg} Files}
Marianne Arnoldb24f5ce2008-01-17 19:45:22 +0000545Rockbox allows users to store and load multiple settings through the use of
546configuration files. A configuration file is simply a text file with the
547extension \fname{.cfg}.
Martin Arver8e8207f2006-02-11 00:57:17 +0000548
Marianne Arnolda352c622007-05-19 19:03:39 +0000549A configuration file may reside anywhere on the disk. Multiple
Martin Arver09c39612006-08-18 16:57:56 +0000550configuration files are permitted. So, for example, you could have
551a \fname{car.cfg} file for the settings that you use while playing your
552jukebox in your car, and a \fname{headphones.cfg} file to store the
Nils Wallménius01bd7362009-02-04 14:22:35 +0000553settings that you use while listening to your \dap{} through headphones.
Martin Arver8e8207f2006-02-11 00:57:17 +0000554
Martin Arver09c39612006-08-18 16:57:56 +0000555See \reference{ref:cfg_specs} below for an explanation of the format
Marianne Arnoldb24f5ce2008-01-17 19:45:22 +0000556for configuration files. See \reference{ref:manage_settings_menu} for an
Martin Arver09c39612006-08-18 16:57:56 +0000557explanation of how to create, edit and load configuration files.
Martin Arver8e8207f2006-02-11 00:57:17 +0000558
Alexander Levin15c850c2010-01-22 22:54:05 +0000559\subsection{\label{ref:cfg_specs}Specifications for \fname{.cfg} Files}
Michael DiFebbo06238412006-08-12 15:56:33 +0000560
Martin Arver09c39612006-08-18 16:57:56 +0000561The Rockbox configuration file is a plain text file, so once you use the
Nils Wallméniusb659c0c2008-03-22 15:26:45 +0000562\setting{Save .cfg file} option to create the file, you can edit the file on
Marianne Arnoldb24f5ce2008-01-17 19:45:22 +0000563your computer using any text editor program. See
Martin Arver09c39612006-08-18 16:57:56 +0000564Appendix \reference{ref:config_file_options} for available settings. Configuration
Marianne Arnoldb24f5ce2008-01-17 19:45:22 +0000565files use the following formatting rules: %
Martin Arver09c39612006-08-18 16:57:56 +0000566
567\begin{enumerate}
568\item Each setting must be on a separate line.
569\item Each line has the format ``setting: value''.
570\item Values must be within the ranges specified in this manual for each
571 setting.
572\item Lines starting with \# are ignored. This lets you write comments into
573 your configuration files.
574\end{enumerate}
575
576Example of a configuration file:
577\begin{example}
Alexander Levin005caba2009-03-22 12:14:03 +0000578 volume: 70
579 bass: 11
580 treble: 12
581 balance: 0
582 time format: 12hour
583 volume display: numeric
584 show files: supported
585 wps: /.rockbox/car.wps
586 lang: /.rockbox/afrikaans.lng
Martin Arver09c39612006-08-18 16:57:56 +0000587\end{example}
588
589\note{As you can see from the example, configuration files do not need to
590 contain all of the Rockbox options. You can create configuration files
Alex Parker964a5e62011-08-09 14:39:32 +0000591 that change only certain settings. So, for example, suppose you
Martin Arver56b339e2006-08-27 20:44:23 +0000592 typically use the \dap{} at one volume in the car, and another when using
Martin Arver09c39612006-08-18 16:57:56 +0000593 headphones. Further, suppose you like to use an inverse LCD when you are
594 in the car, and a regular LCD setting when you are using headphones. You
595 could create configuration files that control only the volume and LCD
596 settings. Create a few different files with different settings, give
597 each file a different name (such as \fname{car.cfg},
598 \fname{headphones.cfg}, etc.), and you can then use the \setting{Browse .cfg
Alex Parker51743412009-08-25 21:51:55 +0000599 files} option to quickly change settings.\\}
Nils Wallménius01bd7362009-02-04 14:22:35 +0000600
601 A special case configuration file can be used to force a particular setting
602 or settings every time Rockbox starts up (e.g. to set the volume to a safe
603 level). Format a new configuration file as above with the required setting(s)
604 and save it into the \fname{/.rockbox} directory with the filename
605 \fname{fixed.cfg}.
Martin Arver09c39612006-08-18 16:57:56 +0000606
607\subsection{\label{ref:manage_settings_menu}The \setting{Manage Settings}
608 menu} The \setting{Manage Settings} menu can be found in the \setting{Main
Martin Arver56b339e2006-08-27 20:44:23 +0000609 Menu}. The \setting{Manage Settings} menu allows you to save and load
Nils Wallménius01bd7362009-02-04 14:22:35 +0000610 \fname{.cfg} files.
Martin Arver09c39612006-08-18 16:57:56 +0000611
612\begin{description}
Michael DiFebbo06238412006-08-12 15:56:33 +0000613
Nils Wallménius01bd7362009-02-04 14:22:35 +0000614\item [Browse .cfg Files]Opens the \setting{File Browser} in the
615 \fname{/.rockbox} directory and displays all \fname{.cfg} (configuration)
616 files. Selecting a \fname{.cfg} file will cause Rockbox to load the settings
Marianne Arnold8c547672010-07-04 22:33:37 +0000617 contained in that file. Pressing \ActionStdCancel{} will exit back to the
Nils Wallménius01bd7362009-02-04 14:22:35 +0000618 \setting{Manage Settings} menu. See the \setting{Write .cfg files} option on
619 the \setting{Manage Settings} menu for details of how to save and edit a
Martin Arver56b339e2006-08-27 20:44:23 +0000620 configuration file.
Martin Arver09c39612006-08-18 16:57:56 +0000621
Marc Guay162a8f22008-06-28 16:10:02 +0000622\item [Reset Settings]This wipes the saved settings
Nils Wallménius01bd7362009-02-04 14:22:35 +0000623 in the \dap{} and resets all settings to their default values.
Martin Arver09c39612006-08-18 16:57:56 +0000624
Szymon Dziokf7253e32010-05-24 19:24:38 +0000625 \opt{IRIVER_H100_PAD,IRIVER_H300_PAD,IAUDIO_X5_PAD,SANSA_E200_PAD,SANSA_C200_PAD%
Szymon Dzioke7f113e2014-10-22 09:58:28 +0200626 ,PBELL_VIBE500_PAD,SAMSUNG_YH92X_PAD,SAMSUNG_YH820_PAD}{
Marianne Arnold56b3f922008-01-20 16:33:12 +0000627 \note{You can also reset all settings to their default
Marc Guay162a8f22008-06-28 16:10:02 +0000628 values by turning off the \dap, turning it back on, and holding the
Nils Wallménius01bd7362009-02-04 14:22:35 +0000629 \ButtonRec{} button immediately after the \dap{} turns on.}
Martin Arver09c39612006-08-18 16:57:56 +0000630 }
Marc Guay162a8f22008-06-28 16:10:02 +0000631 \opt{IRIVER_H10_PAD}{\note{You can also reset all settings to
Marianne Arnold56b3f922008-01-20 16:33:12 +0000632 their default values by turning off the \dap, and turning it back on
Nils Wallménius01bd7362009-02-04 14:22:35 +0000633 with the \ButtonHold{} button on.}
Marcoen Hirschberg1e514772007-04-27 19:38:16 +0000634 }
Marc Guay162a8f22008-06-28 16:10:02 +0000635 \opt{IPOD_4G_PAD}{\note{You can also reset all settings to their default
636 values by turning off the \dap, turning it back on, and activating the
Nils Wallménius01bd7362009-02-04 14:22:35 +0000637 \ButtonHold{} button immediately after the backlight comes on.}
Marc Guay162a8f22008-06-28 16:10:02 +0000638 }
Marianne Arnold56b3f922008-01-20 16:33:12 +0000639 \opt{GIGABEAT_PAD}{\note{You can also reset all settings to their default
640 values by turning off the \dap, turning it back on and pressing the
Nils Wallménius01bd7362009-02-04 14:22:35 +0000641 \ButtonA{} button immediately after the \dap{} turns on.}
Marianne Arnoldb24f5ce2008-01-17 19:45:22 +0000642 }
643
Marc Guay85eec852008-06-24 05:16:23 +0000644\item [Save .cfg File]This option writes a \fname{.cfg} file to
Nils Wallménius01bd7362009-02-04 14:22:35 +0000645 your \daps{} disk. The configuration file has the \fname{.cfg}
Martin Arver09c39612006-08-18 16:57:56 +0000646 extension and is used to store all of the user settings that are described
647 throughout this manual.
Nils Wallménius01bd7362009-02-04 14:22:35 +0000648
Marc Guay85eec852008-06-24 05:16:23 +0000649 Hint: Use the \setting{Save .cfg File} feature (\setting{Main Menu
Nils Wallménius01bd7362009-02-04 14:22:35 +0000650 $\rightarrow$ Manage Settings}) to save the current settings, then
Martin Arver09c39612006-08-18 16:57:56 +0000651 use a text editor to customize the settings file. See Appendix
652 \reference{ref:config_file_options} for the full reference of available
653 options.
Dominik Riebelingd3bf94f2008-03-11 18:43:56 +0000654
Marc Guay85eec852008-06-24 05:16:23 +0000655\item [Save Sound Settings]This option writes a \fname{.cfg} file to
Nils Wallménius01bd7362009-02-04 14:22:35 +0000656 your \daps{} disk. The configuration file has the \fname{.cfg}
Dominik Riebelingd3bf94f2008-03-11 18:43:56 +0000657 extension and is used to store all of the sound related settings.
658
Marc Guay85eec852008-06-24 05:16:23 +0000659\item [Save Theme Settings]This option writes a \fname{.cfg} file to
Nils Wallménius01bd7362009-02-04 14:22:35 +0000660 your \daps{} disk. The configuration file has the \fname{.cfg}
Dominik Riebelingd3bf94f2008-03-11 18:43:56 +0000661 extension and is used to store all of the theme related settings.
Michael DiFebbo06238412006-08-12 15:56:33 +0000662
Martin Arver09c39612006-08-18 16:57:56 +0000663\end{description}
Martin Arver8e8207f2006-02-11 00:57:17 +0000664
Martin Arver8e8207f2006-02-11 00:57:17 +0000665\section{\label{ref:FirmwareLoading}Firmware Loading}
Martin Arver96f898e2006-03-25 09:22:43 +0000666\opt{player,recorder,recorderv2fm,ondio}{
Martin Arver7bdd03a2006-08-27 15:00:50 +0000667 When your \dap{} powers on, it loads the Archos firmware in ROM, which
Marianne Arnoldb2f7c612007-12-14 02:03:58 +0000668 automatically checks your \daps{} root directory for a file named
Martin Arver47ea9062006-06-07 12:15:46 +0000669 \firmwarefilename. Note that Archos firmware can only read the first
Thom Johansenc479b992008-02-13 13:32:44 +0000670 ten characters of each filename in this process, so do not rename your old
Martin Arver47ea9062006-06-07 12:15:46 +0000671 firmware files with names like \firmwarefilename.\fname{old} and so on,
Thom Johansen10d03442007-12-13 22:51:27 +0000672 because it is possible that the \dap{} will load a file other than the one
Martin Arver7bdd03a2006-08-27 15:00:50 +0000673 you intended.
Martin Arverd3d3e342006-03-15 10:56:14 +0000674}
Martin Arver8e8207f2006-02-11 00:57:17 +0000675
Marc Guay85eec852008-06-24 05:16:23 +0000676\subsection{\label{ref:using_rolo}Using ROLO (Rockbox Loader)}
Dominik Riebelingebb8a222006-04-04 17:48:10 +0000677Rockbox is able to load and start another firmware file without rebooting.
Dominik Riebeling27948882006-07-24 20:53:27 +0000678You just ``play'' a file with the extension %
679\opt{recorder,recorderv2fm,ondio}{\fname{.ajz}.} %
680\opt{player}{\fname{.mod}.} %
Marianne Arnoldb43b4932011-01-17 18:30:18 +0000681\opt{iriverh100,iriverh300}{\fname{.iriver}.} %
Dominik Riebeling27948882006-07-24 20:53:27 +0000682\opt{ipod}{\fname{.ipod}.} %
683\opt{iaudio}{\fname{.iaudio}.} %
Szymon Dzioka8b55892014-10-15 16:23:34 +0200684\opt{sansa,iriverh10,iriverh10_5gb,mrobe100,vibe500,samsungyh}{\fname{.mi4}.} %
Jean-Louis Biasini6637e242012-02-21 16:41:35 +0100685\opt{sansaAMS,fuzeplus}{\fname{.sansa}.} %
Alex Parker51743412009-08-25 21:51:55 +0000686\opt{gigabeatf,gigabeats}{\fname{.gigabeat}.} %
Dominik Riebeling27948882006-07-24 20:53:27 +0000687This can be used to test new firmware versions without deleting your
Dominik Riebelingebb8a222006-04-04 17:48:10 +0000688current version.
Martin Arver8e8207f2006-02-11 00:57:17 +0000689
Martin Arver30b0e662006-06-15 11:56:50 +0000690\opt{archos}{\input{advanced_topics/archos-flashing.tex}}
Alexander Levinb57fe482009-12-23 20:05:29 +0000691
Andree Buschmann10023ad2010-03-29 17:58:17 +0000692\section{Optimising battery runtime}
693 Rockbox offers a lot of settings that have high impact on the battery runtime
694 of your \dap{}. The largest power savings can be achieved through disabling
695 unneeded hardware components -- for some of those there are settings
696 available.
697\opt{swcodec}{
698 Another area of savings is avoiding or reducing CPU boosting
699 through disabling computing intense features (e.g. sound processing) or
700 using effective audio codecs.
701} The following provides a short overview of the most relevant settings and
702 rules of thumb.
703
704\nopt{ondio}{
705\subsection{Display backlight}
706 The active backlight consumes a lot of power. Therefore choose a setting that
707 disables the backlight after timeout (for setting \setting{Backlight} see
708 \reference{ref:Displayoptions}). Avoid to have the backlight enabled all the
709 time.
710}
711
712\opt{lcd_sleep}{
713\subsection{Display power-off}
714 Shutting down the display and the display controller saves a reasonable amount
715 of power. Choose a setting that will put the display to sleep after timeout
716 (for setting \setting{Sleep} see \reference{ref:Displayoptions}). Avoid to
717 have the display enabled all the time -- even, if the display is transflective
718 and is readable without backlight. Depending on your \dap{} it might be
719 significantly more efficient to re-enable the display and its backlight for a
720 glimpse a few times per hour than to keep the display enabled.
721}
722
723\opt{accessory_supply}{
724\subsection{Accessory power supply}
725 As default your \dap{}'s accessory power supply is always enabled to ensure
726 proper function of connected accessory devices. Disable this power supply, if
727 -- or as long as -- you do not use any accessory device with your \dap{} while
728 running Rockbox (see \reference{ref:AccessoryPowerSupply}).
729}
730
731\opt{lineout_poweroff}{
732\subsection{Line Out}
733 Rockbox allows to switch off the line-out on your \dap{}. If you do not need
734 the line-out, switch it off (see \reference{ref:LineoutOnOff}).
735}
736
737\opt{spdif_power}{
738\subsection{Optical Output}
739 Rockbox allows to switch off the S/PDIF output on your \dap{}. If you do not
740 need this output, switch it off (see \reference{ref:SPDIF_OnOff}).
741}
742
743\opt{disk_storage}{
744\subsection{Anti-Skip Buffer}
745 Having a large anti-skip buffer tends to use more power, and may reduce your
746 battery life. It is recommended to always use the lowest possible setting
747 that allows correct and continuous playback (see \reference{ref:AntiSkipBuf}).
748}
749
Andree Buschmann2349cf52010-04-12 06:40:58 +0000750\opt{swcodec}{
751\subsection{Replaygain}
752 Replaygain is a post processing that equalises the playback volume of audio
753 files to the same perceived loudness. This post processing applies a factor
754 to each single PCM sample and is therefore consuming additional CPU time. If
755 you want to achieve some (minor) savings in runtime, switch this feature off
756 (see \reference{ref:ReplayGain}).
757}
758
Andree Buschmann2a72e0a2011-12-18 12:41:52 +0000759\opt{lcd_bitmap}{
760\subsection{Peak Meter}
761 The peak meter is a feature of the While Playing Screen and will be updated with a
762 high framerate. Depending on your \dap{} this might result in a high CPU load. To
763 save battery runtime you should switch this feature off (see \reference{ref:peak_meter}).
764 \opt{ipodvideo}{
765 \note{Especially the \playerman{} \playertype{} suffers from an enabled peak meter.}
766 }
767}
768
Andree Buschmann10023ad2010-03-29 17:58:17 +0000769\opt{swcodec,disk_storage,flash_storage}{
770\subsection{Audio format and bitrate}
771\opt{swcodec}{
772 In general the fastest decoding audio format will be the best in terms of
773 battery runtime on your \dap{}. An overview of different codec's performance
774 on different \dap{}s can be found at \wikilink{CodecPerformanceComparison}.
775}
776
777\opt{flash_storage}{
778 Your target uses flash that consumes a certain amount of power during access.
779 The less often the flash needs to be switched on for buffering and the shorter
780 the buffering duration is, the lower is the overall power consumption.
781 Therefore the bitrate of the audio files does have an impact on the battery
782 runtime as well. Lower bitrate audio files will result in longer battery
783 runtime.
784}
785\opt{disk_storage}{
786 Your target uses a hard disk which consumes a large amount of power while
787 spinning -- up to several hundred mA. The less often the hard disk needs to
788 spin up for buffering and the shorter the buffering duration is, the lower is
789 the power consumption. Therefore the bitrate of the audio files does have an
790 impact on the battery runtime as well. Lower bitrate audio files will result
791 in longer battery runtime.
792}
793
794 Please do not re-encode any existing audio files from one lossy format to
795 another based upon the above mentioned. This will reduce the audio quality.
796 If you have the choice, select the best suiting codec when encoding the
797 original source material.
798}
799
800\opt{swcodec}{
801\subsection{Sound settings}
802 In general all kinds of sound processing will need more CPU time and therefore
803 consume more power. The less sound processing you use, the better it is for
804 the battery runtime (for options see \reference{ref:configure_rockbox_sound}).
805}