blob: 47d4305f729edf1f014e3989f13f3a21c2ffd3d3 [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}
Nils Wallménius12eb0582008-03-23 22:07:09 +00005\opt{lcd_bitmap}{
Marianne Arnoldaf78b5f2008-07-06 16:10:28 +00006\subsection{\label{ref:GettingExtras}Getting Extras}
7
Martin Arver7bdd03a2006-08-27 15:00:50 +00008Rockbox supports custom fonts. A collection of fonts is available for download
Marianne Arnoldaf78b5f2008-07-06 16:10:28 +00009in the font package at \url{http://www.rockbox.org/daily.shtml}.}
Martin Arver8e8207f2006-02-11 00:57:17 +000010
Nils Wallménius12eb0582008-03-23 22:07:09 +000011\opt{lcd_bitmap}{
Dominik Riebeling85deab12006-11-20 19:56:55 +000012 \subsection{\label{ref:Loadingfonts}Loading Fonts}\index{Fonts}
Nils Wallméniuscb527ca2006-09-10 10:17:47 +000013 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
Marianne Arnoldb2f7c612007-12-14 02:03:58 +000016 \fname{/.rockbox/fonts} directory and the filename must be at most 24 characters
Nils Wallméniuscb527ca2006-09-10 10:17:47 +000017 long. You can browse the fonts in \fname{/.rockbox/fonts} under
Jonas Häggqvist4b831752009-06-22 17:37:36 +000018 \setting{Settings $\rightarrow$ Theme Settings $\rightarrow$ Font}
Alex Parker51743412009-08-25 21:51:55 +000019 in the \setting{Main Menu}.\\
20
Nils Wallménius01bd7362009-02-04 14:22:35 +000021 \note{Advanced Users Only: Any BDF font file up to 16 pixels high should
Nils Wallméniuscb527ca2006-09-10 10:17:47 +000022 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}
Martin Arver68e40172006-06-07 16:37:04 +000024 directory of the Rockbox source code.}
Dominik Riebelingebb8a222006-04-04 17:48:10 +000025}
Martin Arver8e8207f2006-02-11 00:57:17 +000026
27\subsection{\label{ref:Loadinglanguages}Loading Languages}
Dominik Riebeling85deab12006-11-20 19:56:55 +000028\index{Language files}%
Martin Arver47ea9062006-06-07 12:15:46 +000029Rockbox can load language files at runtime. Simply copy the \fname{.lng} file
Dominik Riebelingb7eef892006-04-10 21:47:09 +000030\emph{(do not use the .lang file)} to the \dap\ and ``play'' it in the
Nils Wallménius15c5d262007-03-15 02:09:15 +000031Rockbox directory browser or select \setting{Settings $\rightarrow$
Alex Parker51743412009-08-25 21:51:55 +000032General Settings $\rightarrow$ Language }from the \setting{Main Menu}.\\
Martin Arver8e8207f2006-02-11 00:57:17 +000033
Dominik Riebelingb7eef892006-04-10 21:47:09 +000034\note{If you want a language to be loaded automatically every time you start
Marianne Arnoldb2f7c612007-12-14 02:03:58 +000035up, it must be located in the \fname{/.rockbox/langs} directory and the filename
Alex Parker51743412009-08-25 21:51:55 +000036must be a maximum of 24 characters long.\\}
Martin Arver8e8207f2006-02-11 00:57:17 +000037
Dominik Riebelingebb8a222006-04-04 17:48:10 +000038If your language is not yet supported and you want to write your own language
39file find the instructions on the Rockbox website:
Dominik Riebelingb394e182006-12-29 19:22:56 +000040\wikilink{LangFiles}
Martin Arver8e8207f2006-02-11 00:57:17 +000041
Nils Wallménius12eb0582008-03-23 22:07:09 +000042\opt{lcd_color}{
Alexander Levin71812ca2009-03-20 19:33:20 +000043 \subsection{\label{ref:ChangingFiletypeColours}Changing Filetype Colours}
Alex Parker6c4661c2009-03-18 14:24:28 +000044 Rockbox has the capability to modify the \setting{File Browser} to show
Alexander Levin71812ca2009-03-20 19:33:20 +000045 files of different types in different colours, depending on the file extension.
Alex Parker6c4661c2009-03-18 14:24:28 +000046
Alexander Levin71812ca2009-03-20 19:33:20 +000047 \subsubsection{Set-up}
Alexander Levin277ce9a2009-03-21 09:25:49 +000048 There are two steps to changing the filetype colours -- creating
Alexander Levin71812ca2009-03-20 19:33:20 +000049 a file with the extension \fname{.colours} and then activating it using
50 a config file. The \fname{.colours} files \emph{must} be stored in
51 the \fname{/.rockbox/themes/} directory.
52 The \fname{.colours} file is just a text file, and can be edited with
53 your text editor of choice.
Alex Parker6c4661c2009-03-18 14:24:28 +000054
Alexander Levin71812ca2009-03-20 19:33:20 +000055 \subsubsection{Creating the .colours file}
56 The \fname{.colours} file consists of the file extension
57 (or \fname{folder}) followed by a colon and then the colour desired
58 as an RGB value in hexadecimal, as in the following example:\\*
59 \\
60 \config{folder:808080}\\
61 \config{mp3:00FF00}\\
62 \config{ogg:00FF00}\\
63 \config{txt:FF0000}\\
64 \config{???:FFFFFF}\\*
Alex Parker6c4661c2009-03-18 14:24:28 +000065
Alexander Levin71812ca2009-03-20 19:33:20 +000066 The permissible extensions are as follows:\\*
67 \\
68 \config{folder, m3u, m3u8, cfg, wps, lng, rock, bmark, cue, colours, mpa,
69 \firmwareextension{}, %
70 \opt{swcodec}{mp1, }mp2, mp3%
71 \opt{swcodec}{, ogg, oga, wma, wmv, asf, wav, flac, ac3, a52, mpc,
72 wv, m4a, m4b, mp4, mod, shn, aif, aiff, spx, sid, adx, nsf, nsfe,
73 spc, ape, mac, sap}%
74 \opt{lcd_bitmap}{\opt{swcodec}{, mpg, mpeg}}%
75 \opt{HAVE_REMOTE_LCD}{, rwps}%
76 \opt{lcd_non-mono}{, bmp}%
77 \opt{radio}{, fmr}%
78 \opt{lcd_bitmap}{, fnt, kbd}}\\*
79 %It'd be ideal to get these from filetypes.c
Alex Parker6c4661c2009-03-18 14:24:28 +000080
Alexander Levin71812ca2009-03-20 19:33:20 +000081 All file extensions that are not either specifically listed in the
82 \fname{.colours} files or are not in the list above will be
83 set to the colour given by \config{???}. Extensions that
84 are in the above list but not in the \fname{.colours}
85 file will be set to the foreground colour as normal.
Alex Parker6c4661c2009-03-18 14:24:28 +000086
Alexander Levin71812ca2009-03-20 19:33:20 +000087 \subsubsection{Activating}
88 To activate the filetype colours, the \fname{.colours} file needs to be
89 invoked from a \fname{.cfg} configuration file. The easiest way to do
90 this is to create a new text file containing the following single
91 line:\\*
92 \\
93 \config{filetype colours: /.rockbox/themes/filename.colours}\\*
Alex Parker6c4661c2009-03-18 14:24:28 +000094
Alexander Levin71812ca2009-03-20 19:33:20 +000095 where filename is replaced by the filename you used when creating the
96 \fname{.colours} file. Save this file as e.g. \fname{colours.cfg} in the
97 \fname{/.rockbox/themes} directory and then activate the config file
98 from the menu as normal
99 (\setting{Settings} $\rightarrow$ \setting{Theme Settings}%
Jonas Häggqvist4b831752009-06-22 17:37:36 +0000100 $\rightarrow$ \setting{Browse Theme Files}).
Alex Parker6c4661c2009-03-18 14:24:28 +0000101
Alexander Levin71812ca2009-03-20 19:33:20 +0000102 \subsubsection{Editing}
103 The built-in \setting{Text Editor} (see \reference{sec:text_editor})
104 automatically understands the
105 \fname{.colours} file format, but an external text editor can
106 also be used. To edit the \fname{.colours} file using Rockbox,
107 ``play'' it in the \setting{File Browser}. The file will open in
108 the \setting{Text Editor}. Upon selecting a line, the following choices
109 will appear:\\*
110 \\
111 \config{Extension}\\
112 \config{Colour}\\*
113
114 If \config{Extension} is selected, the \setting{virtual keyboard}
115 (see \reference{sec:virtual_keyboard}) appears,
116 allowing the file extension to be modified. If \config{Colour}
117 is selected, the colour selector screen appears. Choose the desired
118 colour, then save the \fname{.colours} file using the standard
119 \setting{Text Editor} controls.
Nils Wallménius15c5d262007-03-15 02:09:15 +0000120}
121
Marianne Arnold81892462008-07-15 20:57:05 +0000122\opt{lcd_non-mono}{%
Nils Wallméniusda555882006-11-13 15:14:28 +0000123 \subsection{\label{ref:LoadingBackdrops}Loading Backdrops}
124 Rockbox supports showing an image as a backdrop in the \setting{File Browser}
125 and the menus. The backdrop image must be a \fname{.bmp} file of the exact
126 same dimensions as the display in your \dap{} (\genericimg{} with the last
127 number giving the colour depth in bits). To use an image as a backdrop browse
Marianne Arnold90bcefa2008-03-03 23:01:44 +0000128 to it in the \setting{File Browser} and open the \setting{Context Menu}
129 (see \reference{ref:Contextmenu}) on it and select the option
Nils Wallméniusda555882006-11-13 15:14:28 +0000130 \setting{Set As Backdrop}. If you want rockbox to remember your
131 backdrop the next time you start your \dap{} the backdrop must be placed in
Marianne Arnoldb2f7c612007-12-14 02:03:58 +0000132 the \fname{/.rockbox/backdrops} directory.
Nils Wallméniusda555882006-11-13 15:14:28 +0000133}%
134
Alex Parkerab563da2009-09-20 16:48:45 +0000135\nopt{lcd_charcell}{
136 \subsection{UI Viewport}
137 By default, the UI is drawn on the whole screen. This can be changed so that
138 the UI is confined to a specific area of the screen, by use of a UI
139 viewport. This is done by adding the following line to the
140 \fname{.cfg} file for a theme:\\*
141
142 \nopt{lcd_non-mono}{\config{ui viewport: X,Y,[width],[height],[font]}}
143 \nopt{lcd_color}{\opt{lcd_non-mono}{
144 \config{ui viewport: X,Y,[width],[height],[font],[fgshade],[bgshade]}}}
145 \opt{lcd_color}{
146 \config{ui viewport: X,Y,[width],[height],[font],[fgcolour],[bgcolour]}}
147 \\*
148
149 \opt{HAVE_REMOTE_LCD}{
150 The dimensions of the menu that is displayed on the remote control of your
151 \dap\ can be set in the same way. The line to be added to the theme
152 \fname{.cfg} is the following:\\*
153
154 \nopt{lcd_non-mono}{\config{remote ui viewport: X,Y,[width],[height],[font]}}
155 \nopt{lcd_color}{\opt{lcd_non-mono}{
156 \config{remote ui viewport: X,Y,[width],[height],[font],[fgshade],[bgshade]}}}
157 \opt{lcd_color}{
158 \config{remote ui viewport: X,Y,[width],[height],[font],[fgcolour],[bgcolour]}}
159 \\*
160 }
161
162 Only the first two parameters \emph{have} to be specified, the others can
Alexander Levinb57fe482009-12-23 20:05:29 +0000163 be omitted using `-' as a placeholder. The syntax is very similar to WPS
Alex Parkerab563da2009-09-20 16:48:45 +0000164 viewports (see \reference{ref:Viewports}). Briefly:
165
166 \nopt{lcd_non-mono}{\input{advanced_topics/viewports/mono-uivp-syntax.tex}}
167 \nopt{lcd_color}{\opt{lcd_non-mono}{\input{advanced_topics/viewports/grayscale-uivp-syntax.tex}}}
168 \opt{lcd_color}{\input{advanced_topics/viewports/colour-uivp-syntax.tex}}
169}
170
Martin Arver8e8207f2006-02-11 00:57:17 +0000171\section{\label{ref:ConfiguringtheWPS}Configuring the WPS}
172
Dominik Riebelingb7eef892006-04-10 21:47:09 +0000173\subsection{WPS -- General Info}
Martin Arver8e8207f2006-02-11 00:57:17 +0000174
Dominik Riebelingb7eef892006-04-10 21:47:09 +0000175\begin{description}
Nils Wallménius01bd7362009-02-04 14:22:35 +0000176\item[Description: ] The WPS or \setting{While Playing Screen} is the name used
177 to describe the information displayed on the \daps{} screen whilst an audio
178 track is being played. The default WPS is a relatively simple screen
179 displaying Track name, Artist, Album etc. in the default font as a purely
180 text based layout. There are a number of WPS files included in Rockbox, and
181 you can load one of these at any time by selecting it in
Jonas Häggqvist4b831752009-06-22 17:37:36 +0000182 \setting{Settings $\rightarrow$ Theme Settings $\rightarrow$ While Playing Screen}.
Martin Arver6fc30d62006-08-28 17:44:49 +0000183 \opt{HAVE_REMOTE_LCD}{There is a related option to browse \fname{.rwps}
184 files for \daps{} with LCD remote controls installed. This will load a
Nils Wallménius01bd7362009-02-04 14:22:35 +0000185 similar WPS screen for the remote.}
Martin Arver8e8207f2006-02-11 00:57:17 +0000186
Nils Wallménius01bd7362009-02-04 14:22:35 +0000187\note{``Playing'' a \fname{.wps} from the \setting{File Browser} has the same effect.}
Dominik Riebelingb7eef892006-04-10 21:47:09 +0000188
189\item [File Location: ]Custom WPS files may be located anywhere on the drive.
Martin Arver09c39612006-08-18 16:57:56 +0000190 The only restriction is that they must end in \fname{.wps}. When you ``play''
191 a \fname{.wps} file, it will be used for future WPS screens, and if the
Marianne Arnoldb2f7c612007-12-14 02:03:58 +0000192 ``played'' \fname{.wps} file is located in the \fname{/.rockbox/wps} directory, it
Alexander Levin885553f2009-03-22 11:59:32 +0000193 will be remembered and used after reboot. The name of the \fname{.wps} file must be
Martin Arver09c39612006-08-18 16:57:56 +0000194 no more than 24 characters long for it to be remembered.
Dominik Riebelingb7eef892006-04-10 21:47:09 +0000195\end{description}
Martin Arvera245e882006-03-08 15:04:36 +0000196
Dominik Riebelingb7eef892006-04-10 21:47:09 +0000197\subsection{\label{ref:CreateYourOwnWPS}WPS -- Build Your Own}
Dominik Riebelingebb8a222006-04-04 17:48:10 +0000198Quite simply, enter the WPS code in your favourite text editor, Notepad on
Martin Arver47ea9062006-06-07 12:15:46 +0000199Windows works fine. When you save it, instead of saving it as a \fname{.txt}
200file, save it as a \fname{.wps} file. Example: Instead of \fname{Rockbox.txt},
201save the file as \fname{Rockbox.wps}. To make sure non english characters
202display correctly in your WPS you must save the .wps file with UTF-8 character
203encoding. This can be done in most editors, for example Notepad in Windows 2000
Martin Arver09c39612006-08-18 16:57:56 +0000204or XP (but not in 9x/ME) can do this. See appendix \reference{ref:wps_tags} for
205all the tags that are available.
Martin Arver8e8207f2006-02-11 00:57:17 +0000206
Dominik Riebelingf949c8e2006-06-07 17:09:06 +0000207\begin{itemize}
Martin Arver09c39612006-08-18 16:57:56 +0000208\item All characters not preceded by \% are displayed as typed.
209\item Lines beginning with \# are comments and will be ignored.
Dominik Riebelingf949c8e2006-06-07 17:09:06 +0000210\end{itemize}
Dominik Riebelingb7eef892006-04-10 21:47:09 +0000211
Dominik Riebeling5ec38052006-08-28 18:09:17 +0000212\note{Keep in mind that your \dap{} resolution is \genericimg{} (with
213 the last number giving the colour depth in bits) when
214 designing your own WPS, or if you use a WPS designed for another target.
215 \opt{HAVE_REMOTE_LCD}{The resolution of the remote is
Nils Wallménius01bd7362009-02-04 14:22:35 +0000216 \opt{h100,h300}{128x64x1}\opt{x5,m5}{128x96x2} pixels.}}
Martin Arver6fc30d62006-08-28 17:44:49 +0000217
Alex Parkerab563da2009-09-20 16:48:45 +0000218\nopt{lcd_charcell}{
219\subsubsection{\label{ref:Viewports}Viewports}
220
221By default, a viewport filling the whole screen contains all the elements
222defined in the \fname(.wps) file. The
223\opt{lcd_non-mono}{elements in this viewport are displayed
224 with the same background/foreground
225 \opt{lcd_color}{colours}\nopt{lcd_color}{shades} and the}
226text is rendered in the
227same font as in the main menu. To change this behaviour a custom viewport can
228be defined. A viewport is a rectangular window on the screen%
229\opt{lcd_non-mono}{ with its own foreground/background
230\opt{lcd_color}{colours}\nopt{lcd_color}{shades}}.
231This window also has variable dimensions. To
232define a viewport a line starting \config{{\%V{\textbar}\dots}} has to be
233present in the \fname{.wps} file. The full syntax will be explained later in
234this section. All elements placed before the
235line defining a viewport are displayed in the default viewport. Elements
236defined after a viewport declaration are drawn within that viewport.
237\opt{lcd_bitmap}{Loading images (see Appendix \reference{ref:wps_images})
238 should be done within the default viewport.}
239A viewport ends either with the end of the file, or with the next viewport
240declaration line. Viewports sharing the same
241coordinates and dimensions cannot be displayed at the same time. Viewports
242cannot be layered \emph{transparently} over one another. Subsequent viewports
243will be drawn over any other viewports already drawn onto that
244area of the screen.
245
246\nopt{lcd_non-mono}{\input{advanced_topics/viewports/mono-vp-syntax.tex}}
247\nopt{lcd_color}{\opt{lcd_non-mono}{\input{advanced_topics/viewports/grayscale-vp-syntax.tex}}}
248\opt{lcd_color}{\input{advanced_topics/viewports/colour-vp-syntax.tex}}
249
250
251\subsubsection{Conditional Viewports}
252
253Any viewport can be displayed either permanently or conditionally.
254Defining a viewport as \config{{\%V{\textbar}\dots}}
255will display it permanently.
256
257\begin{itemize}
258\item {\config{\%Vl{\textbar}'identifier'{\textbar}\dots{\textbar}}}
259This tag preloads a viewport for later display. 'identifier' is a single
260lowercase letter (a-z) and the '\dots' parameters use the same logic as
261the \config{\%V} tag explained above.
262\item {\config{\%Vd'identifier'}} Display the 'identifier' viewport.
263\end{itemize}
264
265Viewports can share identifiers so that you can display multiple viewports
266with one \%Vd line.
267
268\nopt{lcd_non-mono}{\input{advanced_topics/viewports/mono-conditional.tex}}
269\nopt{lcd_color}{%
270 \opt{lcd_non-mono}{\input{advanced_topics/viewports/grayscale-conditional.tex}}}
271\opt{lcd_color}{\input{advanced_topics/viewports/colour-conditional.tex}}
272\\*
273
274\note{The tag to display conditional viewports must come before the tag to
275preload the viewport in the \fname{.wps} file.}
276}
277
Martin Arvera245e882006-03-08 15:04:36 +0000278\subsubsection{Conditional Tags}
Martin Arverd3d3e342006-03-15 10:56:14 +0000279
Martin Arver47ea9062006-06-07 12:15:46 +0000280\begin{description}
281\item[If/else: ]
Dominik Riebelingf949c8e2006-06-07 17:09:06 +0000282Syntax: \config{\%?xx{\textless}true{\textbar}false{\textgreater}}
Martin Arver8e8207f2006-02-11 00:57:17 +0000283
Martin Arver68e40172006-06-07 16:37:04 +0000284If the tag specified by ``\config{xx}'' has a value, the text between the
285``\config{{\textless}}'' and the ``\config{{\textbar}}'' is displayed (the true
286part), else the text between the ``\config{{\textbar}}'' and the
287``\config{{\textgreater}}'' is displayed (the false part).
288The else part is optional, so the ``\config{{\textbar}}'' does not have to be
289specified if no else part is desired. The conditionals nest, so the text in the
290if and else part can contain all \config{\%} commands, including conditionals.
Martin Arverd3d3e342006-03-15 10:56:14 +0000291
Martin Arver47ea9062006-06-07 12:15:46 +0000292\item[Enumerations: ]
Dominik Riebelingf949c8e2006-06-07 17:09:06 +0000293Syntax: \config{\%?xx{\textless}alt1{\textbar}alt2{\textbar}alt3{\textbar}\dots{\textbar}else{\textgreater}}
Martin Arver8e8207f2006-02-11 00:57:17 +0000294
Martin Arver68e40172006-06-07 16:37:04 +0000295For tags with multiple values, like Play status, the conditional can hold a
296list of alternatives, one for each value the tag can have.
Martin Arver68e40172006-06-07 16:37:04 +0000297Example enumeration:
298\begin{example}
Martin Arver06424512006-10-25 22:12:25 +0000299 \%?mp{\textless}Stop{\textbar}\%Play{\textbar}Pause{\textbar}Ffwd{\textbar}Rew{\textgreater}
Martin Arver68e40172006-06-07 16:37:04 +0000300\end{example}
Martin Arver8e8207f2006-02-11 00:57:17 +0000301
Martin Arver68e40172006-06-07 16:37:04 +0000302The last else part is optional, and will be displayed if the tag has no value.
303The WPS parser will always display the last part if the tag has no value, or if
304the list of alternatives is too short.
Martin Arver47ea9062006-06-07 12:15:46 +0000305\end{description}
Martin Arver8e8207f2006-02-11 00:57:17 +0000306
Marc Guay85eec852008-06-24 05:16:23 +0000307\subsubsection{Next Song Info}
Dominik Riebelingb7eef892006-04-10 21:47:09 +0000308You can display information about the next song -- the song that is
Martin Arver8e8207f2006-02-11 00:57:17 +0000309about to play after the one currently playing (unless you change the
Martin Arvera245e882006-03-08 15:04:36 +0000310plan).
Martin Arver8e8207f2006-02-11 00:57:17 +0000311
Dominik Riebelingf949c8e2006-06-07 17:09:06 +0000312If you use the upper-case versions of the
Martin Arver68e40172006-06-07 16:37:04 +0000313three tags: \config{F}, \config{I} and \config{D}, they will instead refer to
314the next song instead of the current one. Example: \config{\%Ig} is the genre
Alex Parker51743412009-08-25 21:51:55 +0000315name used in the next song and \config{\%Ff} is the mp3 frequency.\\
Martin Arver8e8207f2006-02-11 00:57:17 +0000316
Dominik Riebelingf949c8e2006-06-07 17:09:06 +0000317\note{The next song information \emph{will not} be available at all
Martin Arver09c39612006-08-18 16:57:56 +0000318 times, but will most likely be available at the end of a song. We
319 suggest you use the conditional display tag a lot when displaying
320 information about the next song!}
Martin Arvera245e882006-03-08 15:04:36 +0000321
Alex Parkere56030a2009-05-15 21:17:21 +0000322\subsubsection{\label{ref:AlternatingSublines}Alternating Sublines}
Martin Arver8e8207f2006-02-11 00:57:17 +0000323
Martin Arver68e40172006-06-07 16:37:04 +0000324It is possible to group items on each line into 2 or more groups or
325``sublines''. Each subline will be displayed in succession on the line for a
326specified time, alternating continuously through each defined subline.
Martin Arver8e8207f2006-02-11 00:57:17 +0000327
328Items on a line are broken into sublines with the semicolon
Martin Arver68e40172006-06-07 16:37:04 +0000329'\config{;}' character. The display time for
Martin Arver8e8207f2006-02-11 00:57:17 +0000330each subline defaults to 2 seconds unless modified by using the
Martin Arver68e40172006-06-07 16:37:04 +0000331'\config{\%t}' tag to specify an alternate
Martin Arver8e8207f2006-02-11 00:57:17 +0000332time (in seconds and optional tenths of a second) for the subline to be
333displayed.
334
335Subline related special characters and tags:
Dominik Riebelingf949c8e2006-06-07 17:09:06 +0000336\begin{description}
337\item[;] Split items on a line into separate sublines
338\item[\%t] Set the subline display time. The
Martin Arver68e40172006-06-07 16:37:04 +0000339'\config{\%t}' is followed by either integer
340seconds (\config{\%t5}), or seconds and tenths of a second (\config{\%t3.5}).
Dominik Riebelingf949c8e2006-06-07 17:09:06 +0000341\end{description}
Martin Arver8e8207f2006-02-11 00:57:17 +0000342
343Each alternating subline can still be optionally scrolled while it is
344being displayed, and scrollable formats can be displayed on the same
345line with non{}-scrollable formats (such as track elapsed time) as long
Martin Arvera245e882006-03-08 15:04:36 +0000346as they are separated into different sublines.
Martin Arvera245e882006-03-08 15:04:36 +0000347Example subline definition:
Martin Arver47ea9062006-06-07 12:15:46 +0000348\begin{example}
Martin Arver49cdd5e2006-06-07 13:29:52 +0000349 %s%t4%ia;%s%it;%t3%pc %pr : Display id3 artist for 4 seconds,
350 Display id3 title for 2 seconds,
351 Display current and remaining track time
352 for 3 seconds,
353 repeat...
Martin Arver47ea9062006-06-07 12:15:46 +0000354\end{example}
Martin Arver8e8207f2006-02-11 00:57:17 +0000355
Martin Arver68e40172006-06-07 16:37:04 +0000356Conditionals can be used with sublines to display a different set and/or number
357of sublines on the line depending on the evaluation of the conditional.
Martin Arvera245e882006-03-08 15:04:36 +0000358Example subline with conditionals:
Martin Arver47ea9062006-06-07 12:15:46 +0000359\begin{example}
Martin Arver49cdd5e2006-06-07 13:29:52 +0000360 %?it{\textless}%t8%s%it{\textbar}%s%fn{\textgreater};%?ia{\textless}%t3%s%ia{\textbar}%t0{\textgreater}\\
Martin Arver47ea9062006-06-07 12:15:46 +0000361\end{example}
Martin Arver8e8207f2006-02-11 00:57:17 +0000362
Martin Arver68e40172006-06-07 16:37:04 +0000363The format above will do two different things depending if ID3 tags are
364present. If the ID3 artist and title are present:
Dominik Riebelingf949c8e2006-06-07 17:09:06 +0000365\begin{itemize}
366\item Display id3 title for 8 seconds,
367\item Display id3 artist for 3 seconds,
368\item repeat\dots
369\end{itemize}
370If the ID3 artist and title are not present:
371\begin{itemize}
372\item Display the filename continuously.
373\end{itemize}
Dominik Riebelingebb8a222006-04-04 17:48:10 +0000374Note that by using a subline display time of 0 in one branch of a conditional,
375a subline can be skipped (not displayed) when that condition is met.
Martin Arvera245e882006-03-08 15:04:36 +0000376
Martin Arvera245e882006-03-08 15:04:36 +0000377\subsubsection{Using Images}
Dominik Riebelingb7eef892006-04-10 21:47:09 +0000378You can have as many as 52 images in your WPS. There are various ways of
Dominik Riebelingebb8a222006-04-04 17:48:10 +0000379displaying images:
Martin Arvera245e882006-03-08 15:04:36 +0000380\begin{enumerate}
Martin Arver68e40172006-06-07 16:37:04 +0000381 \item Load and always show the image, using the \config{\%x} tag
382 \item Preload the image with \config{\%xl} and show it with \config{\%xd}.
383 This way you can have your images displayed conditionally.
Nils Wallméniusda555882006-11-13 15:14:28 +0000384 \nopt{archos}{%
Martin Arver09c39612006-08-18 16:57:56 +0000385 \item Load an image and show as backdrop using the \config{\%X} tag. The
386 image must be of the same exact dimensions as your display.
Nils Wallméniusda555882006-11-13 15:14:28 +0000387 }%
Martin Arvera245e882006-03-08 15:04:36 +0000388\end{enumerate}
Martin Arver959d23e2006-06-04 15:03:39 +0000389
Nils Wallménius12eb0582008-03-23 22:07:09 +0000390\optv{swcodec}{% This doesn't depend on swcodec but we don't have a \noptv
Nils Wallméniusda555882006-11-13 15:14:28 +0000391 % command.
Martin Arver47ea9062006-06-07 12:15:46 +0000392 Example on background image use:
393 \begin{example}
Dominik Riebelingf949c8e2006-06-07 17:09:06 +0000394 %X|background.bmp|
Martin Arver47ea9062006-06-07 12:15:46 +0000395 \end{example}
396 The image with filename \fname{background.bmp} is loaded and used in the WPS.
Nils Wallméniusda555882006-11-13 15:14:28 +0000397}%
Martin Arver47ea9062006-06-07 12:15:46 +0000398
399Example on bitmap preloading and use:
400\begin{example}
Dominik Riebelingf949c8e2006-06-07 17:09:06 +0000401 %x|a|static_icon.bmp|50|50|
402 %xl|b|rep\_off.bmp|16|64|
403 %xl|c|rep\_all.bmp|16|64|
404 %xl|d|rep\_one.bmp|16|64|
405 %xl|e|rep\_shuffle.bmp|16|64|
406 %?mm<%xdb|%xdc|%xdd|%xde>
Martin Arver47ea9062006-06-07 12:15:46 +0000407\end{example}
408Four images at the same x and y position are preloaded in the example. Which
Martin Arver68e40172006-06-07 16:37:04 +0000409image to display is determined by the \config{\%mm} tag (the repeat mode).
Martin Arvera245e882006-03-08 15:04:36 +0000410
411\subsubsection{Example File}
Martin Arver47ea9062006-06-07 12:15:46 +0000412\begin{example}
Dominik Riebelingf949c8e2006-06-07 17:09:06 +0000413 %s%?in<%in - >%?it<%it|%fn> %?ia<[%ia%?id<, %id>]>
414 %pb%pc/%pt
Martin Arver47ea9062006-06-07 12:15:46 +0000415\end{example}
Dominik Riebelingebb8a222006-04-04 17:48:10 +0000416That is, ``tracknum -- title [artist, album]'', where most fields are only
417displayed if available. Could also be rendered as ``filename'' or ``tracknum --
418title [artist]''.
Martin Arvera245e882006-03-08 15:04:36 +0000419
Nils Wallménius12eb0582008-03-23 22:07:09 +0000420%\opt{lcd_bitmap}{
Martin Arvera245e882006-03-08 15:04:36 +0000421% \begin{verbatim}
Martin Arver47ea9062006-06-07 12:15:46 +0000422% %s%?it<%?in<%in. |>%it|%fn>
423% %s%?ia<%ia|%?d2<%d2|(root)>>
424% %s%?id<%id|%?d1<%d1|(root)>> %?iy<(%iy)|>
425%
426% %al%pc/%pt%ar[%pp:%pe]
427% %fbkBit %?fv<avg|> %?iv<(id3v%iv)|(no id3)>
428% %pb
429% %pm
430% % \end{verbatim}
431%}
Martin Arver8e8207f2006-02-11 00:57:17 +0000432
Marc Guay85eec852008-06-24 05:16:23 +0000433\section{\label{ref:manage_settings}Managing Rockbox Settings}
Martin Arver8e8207f2006-02-11 00:57:17 +0000434
Alexander Levin15c850c2010-01-22 22:54:05 +0000435\subsection{Introduction to \fname{.cfg} Files}
Marianne Arnoldb24f5ce2008-01-17 19:45:22 +0000436Rockbox allows users to store and load multiple settings through the use of
437configuration files. A configuration file is simply a text file with the
438extension \fname{.cfg}.
Martin Arver8e8207f2006-02-11 00:57:17 +0000439
Marianne Arnolda352c622007-05-19 19:03:39 +0000440A configuration file may reside anywhere on the disk. Multiple
Martin Arver09c39612006-08-18 16:57:56 +0000441configuration files are permitted. So, for example, you could have
442a \fname{car.cfg} file for the settings that you use while playing your
443jukebox in your car, and a \fname{headphones.cfg} file to store the
Nils Wallménius01bd7362009-02-04 14:22:35 +0000444settings that you use while listening to your \dap{} through headphones.
Martin Arver8e8207f2006-02-11 00:57:17 +0000445
Martin Arver09c39612006-08-18 16:57:56 +0000446See \reference{ref:cfg_specs} below for an explanation of the format
Marianne Arnoldb24f5ce2008-01-17 19:45:22 +0000447for configuration files. See \reference{ref:manage_settings_menu} for an
Martin Arver09c39612006-08-18 16:57:56 +0000448explanation of how to create, edit and load configuration files.
Martin Arver8e8207f2006-02-11 00:57:17 +0000449
Alexander Levin15c850c2010-01-22 22:54:05 +0000450\subsection{\label{ref:cfg_specs}Specifications for \fname{.cfg} Files}
Michael DiFebbo06238412006-08-12 15:56:33 +0000451
Martin Arver09c39612006-08-18 16:57:56 +0000452The Rockbox configuration file is a plain text file, so once you use the
Nils Wallméniusb659c0c2008-03-22 15:26:45 +0000453\setting{Save .cfg file} option to create the file, you can edit the file on
Marianne Arnoldb24f5ce2008-01-17 19:45:22 +0000454your computer using any text editor program. See
Martin Arver09c39612006-08-18 16:57:56 +0000455Appendix \reference{ref:config_file_options} for available settings. Configuration
Marianne Arnoldb24f5ce2008-01-17 19:45:22 +0000456files use the following formatting rules: %
Martin Arver09c39612006-08-18 16:57:56 +0000457
458\begin{enumerate}
459\item Each setting must be on a separate line.
460\item Each line has the format ``setting: value''.
461\item Values must be within the ranges specified in this manual for each
462 setting.
463\item Lines starting with \# are ignored. This lets you write comments into
464 your configuration files.
465\end{enumerate}
466
467Example of a configuration file:
468\begin{example}
Alexander Levin005caba2009-03-22 12:14:03 +0000469 volume: 70
470 bass: 11
471 treble: 12
472 balance: 0
473 time format: 12hour
474 volume display: numeric
475 show files: supported
476 wps: /.rockbox/car.wps
477 lang: /.rockbox/afrikaans.lng
Martin Arver09c39612006-08-18 16:57:56 +0000478\end{example}
479
480\note{As you can see from the example, configuration files do not need to
481 contain all of the Rockbox options. You can create configuration files
482 that change only certain settings. So, for example, supppose you
Martin Arver56b339e2006-08-27 20:44:23 +0000483 typically use the \dap{} at one volume in the car, and another when using
Martin Arver09c39612006-08-18 16:57:56 +0000484 headphones. Further, suppose you like to use an inverse LCD when you are
485 in the car, and a regular LCD setting when you are using headphones. You
486 could create configuration files that control only the volume and LCD
487 settings. Create a few different files with different settings, give
488 each file a different name (such as \fname{car.cfg},
489 \fname{headphones.cfg}, etc.), and you can then use the \setting{Browse .cfg
Alex Parker51743412009-08-25 21:51:55 +0000490 files} option to quickly change settings.\\}
Nils Wallménius01bd7362009-02-04 14:22:35 +0000491
492 A special case configuration file can be used to force a particular setting
493 or settings every time Rockbox starts up (e.g. to set the volume to a safe
494 level). Format a new configuration file as above with the required setting(s)
495 and save it into the \fname{/.rockbox} directory with the filename
496 \fname{fixed.cfg}.
Martin Arver09c39612006-08-18 16:57:56 +0000497
498\subsection{\label{ref:manage_settings_menu}The \setting{Manage Settings}
499 menu} The \setting{Manage Settings} menu can be found in the \setting{Main
Martin Arver56b339e2006-08-27 20:44:23 +0000500 Menu}. The \setting{Manage Settings} menu allows you to save and load
Nils Wallménius01bd7362009-02-04 14:22:35 +0000501 \fname{.cfg} files.
Martin Arver09c39612006-08-18 16:57:56 +0000502
503\begin{description}
Michael DiFebbo06238412006-08-12 15:56:33 +0000504
Nils Wallménius01bd7362009-02-04 14:22:35 +0000505\item [Browse .cfg Files]Opens the \setting{File Browser} in the
506 \fname{/.rockbox} directory and displays all \fname{.cfg} (configuration)
507 files. Selecting a \fname{.cfg} file will cause Rockbox to load the settings
Tomer Shalev13c78662009-12-14 20:18:38 +0000508 contained in that file. Pressing \nopt{COWON_D2_PAD}{\ButtonLeft}
Tomer Shalevc7fee002009-12-17 17:38:58 +0000509 \opt{COWON_D2_PAD}{\ButtonPower{} or \TouchTopLeft} will exit back to the
Nils Wallménius01bd7362009-02-04 14:22:35 +0000510 \setting{Manage Settings} menu. See the \setting{Write .cfg files} option on
511 the \setting{Manage Settings} menu for details of how to save and edit a
Martin Arver56b339e2006-08-27 20:44:23 +0000512 configuration file.
Martin Arver09c39612006-08-18 16:57:56 +0000513
Marc Guay162a8f22008-06-28 16:10:02 +0000514\item [Reset Settings]This wipes the saved settings
Nils Wallménius01bd7362009-02-04 14:22:35 +0000515 in the \dap{} and resets all settings to their default values.
Martin Arver09c39612006-08-18 16:57:56 +0000516
Marianne Arnold56b3f922008-01-20 16:33:12 +0000517 \opt{IRIVER_H100_PAD,IRIVER_H300_PAD,IAUDIO_X5_PAD,SANSA_E200_PAD,SANSA_C200_PAD}{
518 \note{You can also reset all settings to their default
Marc Guay162a8f22008-06-28 16:10:02 +0000519 values by turning off the \dap, turning it back on, and holding the
Nils Wallménius01bd7362009-02-04 14:22:35 +0000520 \ButtonRec{} button immediately after the \dap{} turns on.}
Martin Arver09c39612006-08-18 16:57:56 +0000521 }
Marc Guay162a8f22008-06-28 16:10:02 +0000522 \opt{IRIVER_H10_PAD}{\note{You can also reset all settings to
Marianne Arnold56b3f922008-01-20 16:33:12 +0000523 their default values by turning off the \dap, and turning it back on
Nils Wallménius01bd7362009-02-04 14:22:35 +0000524 with the \ButtonHold{} button on.}
Marcoen Hirschberg1e514772007-04-27 19:38:16 +0000525 }
Marc Guay162a8f22008-06-28 16:10:02 +0000526 \opt{IPOD_4G_PAD}{\note{You can also reset all settings to their default
527 values by turning off the \dap, turning it back on, and activating the
Nils Wallménius01bd7362009-02-04 14:22:35 +0000528 \ButtonHold{} button immediately after the backlight comes on.}
Marc Guay162a8f22008-06-28 16:10:02 +0000529 }
Marianne Arnold56b3f922008-01-20 16:33:12 +0000530 \opt{GIGABEAT_PAD}{\note{You can also reset all settings to their default
531 values by turning off the \dap, turning it back on and pressing the
Nils Wallménius01bd7362009-02-04 14:22:35 +0000532 \ButtonA{} button immediately after the \dap{} turns on.}
Marianne Arnoldb24f5ce2008-01-17 19:45:22 +0000533 }
534
Marc Guay85eec852008-06-24 05:16:23 +0000535\item [Save .cfg File]This option writes a \fname{.cfg} file to
Nils Wallménius01bd7362009-02-04 14:22:35 +0000536 your \daps{} disk. The configuration file has the \fname{.cfg}
Martin Arver09c39612006-08-18 16:57:56 +0000537 extension and is used to store all of the user settings that are described
538 throughout this manual.
Nils Wallménius01bd7362009-02-04 14:22:35 +0000539
Marc Guay85eec852008-06-24 05:16:23 +0000540 Hint: Use the \setting{Save .cfg File} feature (\setting{Main Menu
Nils Wallménius01bd7362009-02-04 14:22:35 +0000541 $\rightarrow$ Manage Settings}) to save the current settings, then
Martin Arver09c39612006-08-18 16:57:56 +0000542 use a text editor to customize the settings file. See Appendix
543 \reference{ref:config_file_options} for the full reference of available
544 options.
Dominik Riebelingd3bf94f2008-03-11 18:43:56 +0000545
Marc Guay85eec852008-06-24 05:16:23 +0000546\item [Save Sound Settings]This option writes a \fname{.cfg} file to
Nils Wallménius01bd7362009-02-04 14:22:35 +0000547 your \daps{} disk. The configuration file has the \fname{.cfg}
Dominik Riebelingd3bf94f2008-03-11 18:43:56 +0000548 extension and is used to store all of the sound related settings.
549
Marc Guay85eec852008-06-24 05:16:23 +0000550\item [Save Theme Settings]This option writes a \fname{.cfg} file to
Nils Wallménius01bd7362009-02-04 14:22:35 +0000551 your \daps{} disk. The configuration file has the \fname{.cfg}
Dominik Riebelingd3bf94f2008-03-11 18:43:56 +0000552 extension and is used to store all of the theme related settings.
Michael DiFebbo06238412006-08-12 15:56:33 +0000553
Martin Arver09c39612006-08-18 16:57:56 +0000554\end{description}
Martin Arver8e8207f2006-02-11 00:57:17 +0000555
Martin Arver8e8207f2006-02-11 00:57:17 +0000556\section{\label{ref:FirmwareLoading}Firmware Loading}
Martin Arver96f898e2006-03-25 09:22:43 +0000557\opt{player,recorder,recorderv2fm,ondio}{
Martin Arver7bdd03a2006-08-27 15:00:50 +0000558 When your \dap{} powers on, it loads the Archos firmware in ROM, which
Marianne Arnoldb2f7c612007-12-14 02:03:58 +0000559 automatically checks your \daps{} root directory for a file named
Martin Arver47ea9062006-06-07 12:15:46 +0000560 \firmwarefilename. Note that Archos firmware can only read the first
Thom Johansenc479b992008-02-13 13:32:44 +0000561 ten characters of each filename in this process, so do not rename your old
Martin Arver47ea9062006-06-07 12:15:46 +0000562 firmware files with names like \firmwarefilename.\fname{old} and so on,
Thom Johansen10d03442007-12-13 22:51:27 +0000563 because it is possible that the \dap{} will load a file other than the one
Martin Arver7bdd03a2006-08-27 15:00:50 +0000564 you intended.
Martin Arverd3d3e342006-03-15 10:56:14 +0000565}
Martin Arver8e8207f2006-02-11 00:57:17 +0000566
Marc Guay85eec852008-06-24 05:16:23 +0000567\subsection{\label{ref:using_rolo}Using ROLO (Rockbox Loader)}
Dominik Riebelingebb8a222006-04-04 17:48:10 +0000568Rockbox is able to load and start another firmware file without rebooting.
Dominik Riebeling27948882006-07-24 20:53:27 +0000569You just ``play'' a file with the extension %
570\opt{recorder,recorderv2fm,ondio}{\fname{.ajz}.} %
571\opt{player}{\fname{.mod}.} %
Dominik Riebelingf498d532008-12-07 23:00:15 +0000572\opt{h100,h300}{\fname{.iriver}.} %
Dominik Riebeling27948882006-07-24 20:53:27 +0000573\opt{ipod}{\fname{.ipod}.} %
574\opt{iaudio}{\fname{.iaudio}.} %
Nils Wallménius924c0862007-09-18 21:56:42 +0000575\opt{sansa,h10,h10_5gb}{\fname{.mi4}.} %
Rafaël Carrée3c9d6a2009-05-22 10:44:15 +0000576\opt{sansaAMS}{\fname{.sansa}.} %
Alex Parker51743412009-08-25 21:51:55 +0000577\opt{gigabeatf,gigabeats}{\fname{.gigabeat}.} %
Dominik Riebeling27948882006-07-24 20:53:27 +0000578This can be used to test new firmware versions without deleting your
Dominik Riebelingebb8a222006-04-04 17:48:10 +0000579current version.
Martin Arver8e8207f2006-02-11 00:57:17 +0000580
Martin Arver30b0e662006-06-15 11:56:50 +0000581\opt{archos}{\input{advanced_topics/archos-flashing.tex}}
Alexander Levinb57fe482009-12-23 20:05:29 +0000582