Nils Wallménius | cb527ca | 2006-09-10 10:17:47 +0000 | [diff] [blame] | 1 | % $Id$ % |
Martin Arver | 8e8207f | 2006-02-11 00:57:17 +0000 | [diff] [blame] | 2 | \chapter{Advanced Topics} |
Martin Arver | 35dcf90 | 2006-03-08 17:58:11 +0000 | [diff] [blame] | 3 | |
Marc Guay | 85eec85 | 2008-06-24 05:16:23 +0000 | [diff] [blame] | 4 | \section{\label{ref:CustomisingUI}Customising the User Interface} |
Jonathan Gordon | 13412f6 | 2012-02-09 21:21:40 +1100 | [diff] [blame] | 5 | |
| 6 | \subsection{\label{ref:CustomisingTheMainMenu}Customising The Main Menu} |
| 7 | |
| 8 | It is possible to customise the main menu, i.e. to reorder or to hide some |
Alexander Levin | fa452c1 | 2012-03-02 20:53:25 +0100 | [diff] [blame] | 9 | of its items (only the main menu can be customised, submenus can not). |
| 10 | To accomplish this, load a \fname{.cfg} file (as described in |
| 11 | \reference{ref:manage_settings}) containing the following line: |
| 12 | \config{root~menu~order:items}, where ``items'' is a comma separated list |
| 13 | (no spaces around the commas!) of the following |
| 14 | words: \config{bookmarks}, \config{files}, \opt{tagcache}{\config{database}, }% |
Jonathan Gordon | 13412f6 | 2012-02-09 21:21:40 +1100 | [diff] [blame] | 15 | \config{wps}, \config{settings}, \opt{recording}{\config{recording}, }% |
| 16 | \opt{radio}{\config{radio}, }\config{playlists}, \config{plugins}, |
| 17 | \config{system\_menu}, \opt{PLAYER_PAD}{\config{shutdown}, }\config{shortcuts}. |
| 18 | Each of the words, if it occurs in the list, activates the appropriate item |
| 19 | in the main menu. The order of the items is given by the order of the words |
| 20 | in the list. The items whose words do not occur in the list will be hidden, |
Alexander Levin | fa452c1 | 2012-03-02 20:53:25 +0100 | [diff] [blame] | 21 | with one exception: the menu item \setting{Settings} will be shown even if |
| 22 | its word is not in the list (it is added as the last item then). |
Jonathan Gordon | 13412f6 | 2012-02-09 21:21:40 +1100 | [diff] [blame] | 23 | |
Alexander Levin | fa452c1 | 2012-03-02 20:53:25 +0100 | [diff] [blame] | 24 | The following configuration example will change the main menu so that it will |
| 25 | contain only the items for the file browser, for resuming the playback, and |
| 26 | for changing the settings (the latter will be added automatically). |
| 27 | \begin{example} |
| 28 | \config{root menu order:files,wps} |
| 29 | \end{example} |
Jonathan Gordon | 9f48f5f | 2012-02-27 09:34:37 +1100 | [diff] [blame] | 30 | |
Alexander Levin | fa452c1 | 2012-03-02 20:53:25 +0100 | [diff] [blame] | 31 | |
| 32 | To reset the menu items to the default, use \config{root~menu~order:-} (i.e. |
| 33 | use a hyphen instead of ``items''). |
| 34 | |
Sebastian Leonhardt | 6548dc2 | 2016-04-13 00:14:02 +0200 | [diff] [blame] | 35 | This configuration entry can only be created and edited with a text editor or |
| 36 | the Main Menu Config Plugin (see \reference{ref:main_menu_config}). |
| 37 | It is not possible to change this setting via the settings menu. |
Jonathan Gordon | 13412f6 | 2012-02-09 21:21:40 +1100 | [diff] [blame] | 38 | |
Nils Wallménius | 12eb058 | 2008-03-23 22:07:09 +0000 | [diff] [blame] | 39 | \opt{lcd_bitmap}{ |
Marianne Arnold | af78b5f | 2008-07-06 16:10:28 +0000 | [diff] [blame] | 40 | \subsection{\label{ref:GettingExtras}Getting Extras} |
| 41 | |
Martin Arver | 7bdd03a | 2006-08-27 15:00:50 +0000 | [diff] [blame] | 42 | Rockbox supports custom fonts. A collection of fonts is available for download |
Marianne Arnold | af78b5f | 2008-07-06 16:10:28 +0000 | [diff] [blame] | 43 | in the font package at \url{http://www.rockbox.org/daily.shtml}.} |
Martin Arver | 8e8207f | 2006-02-11 00:57:17 +0000 | [diff] [blame] | 44 | |
Nils Wallménius | 12eb058 | 2008-03-23 22:07:09 +0000 | [diff] [blame] | 45 | \opt{lcd_bitmap}{ |
Dominik Riebeling | 85deab1 | 2006-11-20 19:56:55 +0000 | [diff] [blame] | 46 | \subsection{\label{ref:Loadingfonts}Loading Fonts}\index{Fonts} |
Nils Wallménius | cb527ca | 2006-09-10 10:17:47 +0000 | [diff] [blame] | 47 | 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 Arnold | b2f7c61 | 2007-12-14 02:03:58 +0000 | [diff] [blame] | 50 | \fname{/.rockbox/fonts} directory and the filename must be at most 24 characters |
Nils Wallménius | cb527ca | 2006-09-10 10:17:47 +0000 | [diff] [blame] | 51 | long. You can browse the fonts in \fname{/.rockbox/fonts} under |
Jonas Häggqvist | 4b83175 | 2009-06-22 17:37:36 +0000 | [diff] [blame] | 52 | \setting{Settings $\rightarrow$ Theme Settings $\rightarrow$ Font} |
Alex Parker | 5174341 | 2009-08-25 21:51:55 +0000 | [diff] [blame] | 53 | in the \setting{Main Menu}.\\ |
| 54 | |
Alexander Levin | d930641 | 2010-05-18 20:45:32 +0000 | [diff] [blame] | 55 | \note{Advanced Users Only: Any BDF font should |
Nils Wallménius | cb527ca | 2006-09-10 10:17:47 +0000 | [diff] [blame] | 56 | 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 Levin | d930641 | 2010-05-18 20:45:32 +0000 | [diff] [blame] | 58 | directory of the Rockbox source code. See \wikilink{CreateFonts\#ConvBdf} |
Alexander Levin | 3fa48ee | 2010-05-19 16:34:20 +0000 | [diff] [blame] | 59 | for more details. Or just run \fname{convbdf} without any parameters to |
| 60 | see the possible options.} |
Dominik Riebeling | ebb8a22 | 2006-04-04 17:48:10 +0000 | [diff] [blame] | 61 | } |
Martin Arver | 8e8207f | 2006-02-11 00:57:17 +0000 | [diff] [blame] | 62 | |
| 63 | \subsection{\label{ref:Loadinglanguages}Loading Languages} |
Dominik Riebeling | 85deab1 | 2006-11-20 19:56:55 +0000 | [diff] [blame] | 64 | \index{Language files}% |
William Wilgus | dc87e9e | 2016-11-22 06:21:31 +0100 | [diff] [blame] | 65 | Rockbox can load language files at runtime. Simply copy the \fname{.lng} file |
| 66 | \emph{(do not use the .lang file)} to the \dap\ and ``play'' it in the |
Nils Wallménius | 15c5d26 | 2007-03-15 02:09:15 +0000 | [diff] [blame] | 67 | Rockbox directory browser or select \setting{Settings $\rightarrow$ |
Alex Parker | 5174341 | 2009-08-25 21:51:55 +0000 | [diff] [blame] | 68 | General Settings $\rightarrow$ Language }from the \setting{Main Menu}.\\ |
Martin Arver | 8e8207f | 2006-02-11 00:57:17 +0000 | [diff] [blame] | 69 | |
William Wilgus | dc87e9e | 2016-11-22 06:21:31 +0100 | [diff] [blame] | 70 | \note{If you want a language to be loaded automatically every time you start |
Marianne Arnold | b2f7c61 | 2007-12-14 02:03:58 +0000 | [diff] [blame] | 71 | up, it must be located in the \fname{/.rockbox/langs} directory and the filename |
Alex Parker | 5174341 | 2009-08-25 21:51:55 +0000 | [diff] [blame] | 72 | must be a maximum of 24 characters long.\\} |
Martin Arver | 8e8207f | 2006-02-11 00:57:17 +0000 | [diff] [blame] | 73 | |
Dominik Riebeling | ebb8a22 | 2006-04-04 17:48:10 +0000 | [diff] [blame] | 74 | If your language is not yet supported and you want to write your own language |
| 75 | file find the instructions on the Rockbox website: |
Dominik Riebeling | b394e18 | 2006-12-29 19:22:56 +0000 | [diff] [blame] | 76 | \wikilink{LangFiles} |
Martin Arver | 8e8207f | 2006-02-11 00:57:17 +0000 | [diff] [blame] | 77 | |
Nils Wallménius | 12eb058 | 2008-03-23 22:07:09 +0000 | [diff] [blame] | 78 | \opt{lcd_color}{ |
Alexander Levin | 71812ca | 2009-03-20 19:33:20 +0000 | [diff] [blame] | 79 | \subsection{\label{ref:ChangingFiletypeColours}Changing Filetype Colours} |
Alex Parker | 6c4661c | 2009-03-18 14:24:28 +0000 | [diff] [blame] | 80 | Rockbox has the capability to modify the \setting{File Browser} to show |
William Wilgus | dc87e9e | 2016-11-22 06:21:31 +0100 | [diff] [blame] | 81 | files of different types in different colours, depending on the file extension. |
Alex Parker | 6c4661c | 2009-03-18 14:24:28 +0000 | [diff] [blame] | 82 | |
Alexander Levin | 71812ca | 2009-03-20 19:33:20 +0000 | [diff] [blame] | 83 | \subsubsection{Set-up} |
Alexander Levin | 277ce9a | 2009-03-21 09:25:49 +0000 | [diff] [blame] | 84 | There are two steps to changing the filetype colours -- creating |
Alexander Levin | 71812ca | 2009-03-20 19:33:20 +0000 | [diff] [blame] | 85 | 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 Parker | 6c4661c | 2009-03-18 14:24:28 +0000 | [diff] [blame] | 90 | |
Alexander Levin | 71812ca | 2009-03-20 19:33:20 +0000 | [diff] [blame] | 91 | \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 Parker | 6c4661c | 2009-03-18 14:24:28 +0000 | [diff] [blame] | 101 | |
Alexander Levin | 71812ca | 2009-03-20 19:33:20 +0000 | [diff] [blame] | 102 | The permissible extensions are as follows:\\* |
William Wilgus | dc87e9e | 2016-11-22 06:21:31 +0100 | [diff] [blame] | 103 | \\ |
Alexander Levin | 71812ca | 2009-03-20 19:33:20 +0000 | [diff] [blame] | 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 Parker | 6c4661c | 2009-03-18 14:24:28 +0000 | [diff] [blame] | 116 | |
Alexander Levin | 71812ca | 2009-03-20 19:33:20 +0000 | [diff] [blame] | 117 | 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 Parker | 6c4661c | 2009-03-18 14:24:28 +0000 | [diff] [blame] | 122 | |
Alexander Levin | 71812ca | 2009-03-20 19:33:20 +0000 | [diff] [blame] | 123 | \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 Parker | 6c4661c | 2009-03-18 14:24:28 +0000 | [diff] [blame] | 130 | |
Alexander Levin | 71812ca | 2009-03-20 19:33:20 +0000 | [diff] [blame] | 131 | 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äggqvist | 4b83175 | 2009-06-22 17:37:36 +0000 | [diff] [blame] | 136 | $\rightarrow$ \setting{Browse Theme Files}). |
Alex Parker | 6c4661c | 2009-03-18 14:24:28 +0000 | [diff] [blame] | 137 | |
Alexander Levin | 71812ca | 2009-03-20 19:33:20 +0000 | [diff] [blame] | 138 | \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, |
William Wilgus | dc87e9e | 2016-11-22 06:21:31 +0100 | [diff] [blame] | 143 | ``play'' it in the \setting{File Browser}. The file will open in |
Alexander Levin | 71812ca | 2009-03-20 19:33:20 +0000 | [diff] [blame] | 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énius | 15c5d26 | 2007-03-15 02:09:15 +0000 | [diff] [blame] | 156 | } |
| 157 | |
Marianne Arnold | 8189246 | 2008-07-15 20:57:05 +0000 | [diff] [blame] | 158 | \opt{lcd_non-mono}{% |
Nils Wallménius | da55588 | 2006-11-13 15:14:28 +0000 | [diff] [blame] | 159 | \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 Levin | 87b2ad14 | 2010-05-20 16:20:58 +0000 | [diff] [blame] | 162 | same dimensions as the display in your \dap{} (\dapdisplaysize{} with the last |
Nils Wallménius | da55588 | 2006-11-13 15:14:28 +0000 | [diff] [blame] | 163 | number giving the colour depth in bits). To use an image as a backdrop browse |
Marianne Arnold | 90bcefa | 2008-03-03 23:01:44 +0000 | [diff] [blame] | 164 | 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énius | da55588 | 2006-11-13 15:14:28 +0000 | [diff] [blame] | 166 | \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 Arnold | b2f7c61 | 2007-12-14 02:03:58 +0000 | [diff] [blame] | 168 | the \fname{/.rockbox/backdrops} directory. |
Nils Wallménius | da55588 | 2006-11-13 15:14:28 +0000 | [diff] [blame] | 169 | }% |
| 170 | |
Alex Parker | ab563da | 2009-09-20 16:48:45 +0000 | [diff] [blame] | 171 | \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 |
William Wilgus | dc87e9e | 2016-11-22 06:21:31 +0100 | [diff] [blame] | 175 | viewport. This is done by adding the following line to the |
Alex Parker | ab563da | 2009-09-20 16:48:45 +0000 | [diff] [blame] | 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 |
Sebastian Leonhardt | 5dfcadc | 2018-07-31 12:10:29 +0200 | [diff] [blame] | 199 | be omitted using `$-$' as a placeholder. The syntax is very similar to WPS |
Alex Parker | ab563da | 2009-09-20 16:48:45 +0000 | [diff] [blame] | 200 | 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 Parker | 40782d5 | 2010-05-13 08:13:31 +0000 | [diff] [blame] | 207 | \section{\label{ref:ConfiguringtheWPS}Configuring the Theme} |
Martin Arver | 8e8207f | 2006-02-11 00:57:17 +0000 | [diff] [blame] | 208 | |
Alex Parker | 40782d5 | 2010-05-13 08:13:31 +0000 | [diff] [blame] | 209 | \subsection{Themeing -- General Info} |
Martin Arver | 8e8207f | 2006-02-11 00:57:17 +0000 | [diff] [blame] | 210 | |
Alex Parker | 40782d5 | 2010-05-13 08:13:31 +0000 | [diff] [blame] | 211 | 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 Gordon | 3238293 | 2010-05-16 11:20:42 +0000 | [diff] [blame] | 214 | \setting{Base Skin}. The WPS is the name used to |
Alex Parker | 40782d5 | 2010-05-13 08:13:31 +0000 | [diff] [blame] | 215 | 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 Gordon | 3238293 | 2010-05-16 11:20:42 +0000 | [diff] [blame] | 217 | radio, and the SBS lets you specify a base skin that is shown in the |
Alex Parker | 40782d5 | 2010-05-13 08:13:31 +0000 | [diff] [blame] | 218 | 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énius | 01bd736 | 2009-02-04 14:22:35 +0000 | [diff] [blame] | 221 | you can load one of these at any time by selecting it in |
Alex Parker | 40782d5 | 2010-05-13 08:13:31 +0000 | [diff] [blame] | 222 | \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 Arver | 8e8207f | 2006-02-11 00:57:17 +0000 | [diff] [blame] | 225 | |
Dominik Riebeling | b7eef89 | 2006-04-10 21:47:09 +0000 | [diff] [blame] | 226 | |
Alex Parker | 40782d5 | 2010-05-13 08:13:31 +0000 | [diff] [blame] | 227 | \subsection{\label{ref:CreateYourOwnWPS}Themes -- Create Your Own} |
| 228 | The theme files are simple text files, and can be created (or edited) in your |
William Wilgus | dc87e9e | 2016-11-22 06:21:31 +0100 | [diff] [blame] | 229 | favourite text editor. To make sure non-English characters |
Alex Parker | 1b0c77f | 2010-06-20 12:58:09 +0000 | [diff] [blame] | 230 | display correctly in your theme you must save the theme files with UTF-8 |
| 231 | character encoding. This can be done in most editors, for example Notepad in |
| 232 | Windows 2000 or XP (but not in 9x/ME) can do this. |
Alex Parker | 40782d5 | 2010-05-13 08:13:31 +0000 | [diff] [blame] | 233 | |
| 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. |
William Wilgus | dc87e9e | 2016-11-22 06:21:31 +0100 | [diff] [blame] | 239 | |
Alex Parker | 40782d5 | 2010-05-13 08:13:31 +0000 | [diff] [blame] | 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 | |
| 249 | All full list of the available tags are given in appendix |
Alex Parker | abd0566 | 2010-08-02 21:38:37 +0000 | [diff] [blame] | 250 | \reference{ref:wps_tags}; some of the more powerful concepts in theme design |
Alex Parker | 40782d5 | 2010-05-13 08:13:31 +0000 | [diff] [blame] | 251 | are discussed below. |
Martin Arver | 8e8207f | 2006-02-11 00:57:17 +0000 | [diff] [blame] | 252 | |
Dominik Riebeling | f949c8e | 2006-06-07 17:09:06 +0000 | [diff] [blame] | 253 | \begin{itemize} |
Martin Arver | 09c3961 | 2006-08-18 16:57:56 +0000 | [diff] [blame] | 254 | \item All characters not preceded by \% are displayed as typed. |
| 255 | \item Lines beginning with \# are comments and will be ignored. |
Dominik Riebeling | f949c8e | 2006-06-07 17:09:06 +0000 | [diff] [blame] | 256 | \end{itemize} |
Dominik Riebeling | b7eef89 | 2006-04-10 21:47:09 +0000 | [diff] [blame] | 257 | |
Marianne Arnold | c4bdf20 | 2010-08-14 10:30:42 +0000 | [diff] [blame] | 258 | \note{Keep in mind that your \daps{} resolution is \dapdisplaysize{} (with |
Dominik Riebeling | 5ec3805 | 2006-08-28 18:09:17 +0000 | [diff] [blame] | 259 | 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 Arnold | b43b493 | 2011-01-17 18:30:18 +0000 | [diff] [blame] | 262 | \opt{iriverh100,iriverh300}{128$\times$64$\times$1}% |
Marianne Arnold | c4bdf20 | 2010-08-14 10:30:42 +0000 | [diff] [blame] | 263 | \opt{iaudiox5,iaudiom5,iaudiom3}{128$\times$96$\times$2} |
| 264 | pixels. |
| 265 | } |
| 266 | } |
Martin Arver | 6fc30d6 | 2006-08-28 17:44:49 +0000 | [diff] [blame] | 267 | |
Alex Parker | ab563da | 2009-09-20 16:48:45 +0000 | [diff] [blame] | 268 | \nopt{lcd_charcell}{ |
| 269 | \subsubsection{\label{ref:Viewports}Viewports} |
| 270 | |
| 271 | By default, a viewport filling the whole screen contains all the elements |
William Wilgus | dc87e9e | 2016-11-22 06:21:31 +0100 | [diff] [blame] | 272 | defined in each theme file. The |
Alex Parker | ab563da | 2009-09-20 16:48:45 +0000 | [diff] [blame] | 273 | \opt{lcd_non-mono}{elements in this viewport are displayed |
Alexander Levin | 64bb9a0 | 2010-05-18 20:23:22 +0000 | [diff] [blame] | 274 | with the same background/\linebreak{}foreground |
Alex Parker | ab563da | 2009-09-20 16:48:45 +0000 | [diff] [blame] | 275 | \opt{lcd_color}{colours}\nopt{lcd_color}{shades} and the} |
| 276 | text is rendered in the |
| 277 | same font as in the main menu. To change this behaviour a custom viewport can |
William Wilgus | dc87e9e | 2016-11-22 06:21:31 +0100 | [diff] [blame] | 278 | be defined. A viewport is a rectangular window on the screen% |
Alex Parker | ab563da | 2009-09-20 16:48:45 +0000 | [diff] [blame] | 279 | \opt{lcd_non-mono}{ with its own foreground/background |
| 280 | \opt{lcd_color}{colours}\nopt{lcd_color}{shades}}. |
| 281 | This window also has variable dimensions. To |
Alex Parker | 64d4ddf | 2010-06-20 12:58:41 +0000 | [diff] [blame] | 282 | define a viewport a line starting \config{{\%V(\dots}} has to be |
| 283 | present in the theme file. The full syntax will be explained later in |
William Wilgus | dc87e9e | 2016-11-22 06:21:31 +0100 | [diff] [blame] | 284 | this section. All elements placed before the |
Alex Parker | ab563da | 2009-09-20 16:48:45 +0000 | [diff] [blame] | 285 | line defining a viewport are displayed in the default viewport. Elements |
| 286 | defined 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.} |
| 289 | A viewport ends either with the end of the file, or with the next viewport |
| 290 | declaration line. Viewports sharing the same |
| 291 | coordinates and dimensions cannot be displayed at the same time. Viewports |
| 292 | cannot be layered \emph{transparently} over one another. Subsequent viewports |
| 293 | will be drawn over any other viewports already drawn onto that |
| 294 | area 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 Parker | 77a78ee | 2011-08-19 11:43:51 +0000 | [diff] [blame] | 300 | \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 | |
| 307 | Mode 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 Parker | ab563da | 2009-09-20 16:48:45 +0000 | [diff] [blame] | 321 | |
| 322 | \subsubsection{Conditional Viewports} |
| 323 | |
| 324 | Any viewport can be displayed either permanently or conditionally. |
Alex Parker | 64d4ddf | 2010-06-20 12:58:41 +0000 | [diff] [blame] | 325 | Defining a viewport as \config{{\%V(\dots}} |
Alex Parker | ab563da | 2009-09-20 16:48:45 +0000 | [diff] [blame] | 326 | will display it permanently. |
| 327 | |
| 328 | \begin{itemize} |
Alexander Levin | e39f409 | 2010-06-23 18:21:35 +0000 | [diff] [blame] | 329 | \item {\config{\%Vl('identifier',\dots)}} |
Alexander Levin | e0bb2218 | 2010-05-12 22:07:49 +0000 | [diff] [blame] | 330 | This tag preloads a viewport for later display. `identifier' is a single |
Alexander Levin | 5a379bc | 2010-05-20 16:35:45 +0000 | [diff] [blame] | 331 | lowercase letter (a-z) and the `\dots' parameters use the same logic as |
Alex Parker | ab563da | 2009-09-20 16:48:45 +0000 | [diff] [blame] | 332 | the \config{\%V} tag explained above. |
Alexander Levin | e39f409 | 2010-06-23 18:21:35 +0000 | [diff] [blame] | 333 | \item {\config{\%Vd('identifier')}} Display the `identifier' viewport. |
Alex Parker | ab563da | 2009-09-20 16:48:45 +0000 | [diff] [blame] | 334 | \end{itemize} |
| 335 | |
| 336 | Viewports can share identifiers so that you can display multiple viewports |
| 337 | with 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 |
| 346 | preload the viewport in the \fname{.wps} file.} |
Alex Parker | 6d549df | 2010-05-13 08:13:37 +0000 | [diff] [blame] | 347 | |
| 348 | \subsection{Info Viewport (SBS only)} |
| 349 | As 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 |
| 351 | file, and to conditionally select different UI viewports. |
| 352 | |
| 353 | \begin{itemize} |
Alexander Levin | e39f409 | 2010-06-23 18:21:35 +0000 | [diff] [blame] | 354 | \item {\config{\%Vi('label',\dots)}} |
Alex Parker | 6d549df | 2010-05-13 08:13:37 +0000 | [diff] [blame] | 355 | 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 Levin | 5a379bc | 2010-05-20 16:35:45 +0000 | [diff] [blame] | 359 | Info Viewport using the \%VI tag. The `\dots' parameters use the same logic as |
Alex Parker | 6d549df | 2010-05-13 08:13:37 +0000 | [diff] [blame] | 360 | the \config{\%V} tag explained above. |
| 361 | |
Alexander Levin | e39f409 | 2010-06-23 18:21:35 +0000 | [diff] [blame] | 362 | \item {\config{\%VI('label')}} Set the Info Viewport to use the viewport called |
Alex Parker | 6d549df | 2010-05-13 08:13:37 +0000 | [diff] [blame] | 363 | label, as declared with the previous tag. |
| 364 | \end{itemize} |
Alex Parker | 1b0c77f | 2010-06-20 12:58:09 +0000 | [diff] [blame] | 365 | |
| 366 | \subsection{\label{ref:multifont}Additional Fonts} |
| 367 | Additional fonts can be loaded within each screen file to be used in that |
| 368 | screen. In this way not only can you have different fonts between e.g. the menu |
| 369 | and the WPS, but you can use multiple fonts in each of the individual screens.\\ |
| 370 | |
Jonathan Gordon | faaf431 | 2010-08-25 14:11:38 +0000 | [diff] [blame] | 371 | \config{\%Fl('id',filename,glyphs)} |
Alex Parker | 1b0c77f | 2010-06-20 12:58:09 +0000 | [diff] [blame] | 372 | |
| 373 | \begin{itemize} |
Alex Parker | 994d955 | 2010-06-20 16:23:47 +0000 | [diff] [blame] | 374 | \item `id' is the number you want to use in viewport declarations, 0 and 1 |
Alex Parker | 1b0c77f | 2010-06-20 12:58:09 +0000 | [diff] [blame] | 375 | 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 Gordon | faaf431 | 2010-08-25 14:11:38 +0000 | [diff] [blame] | 378 | \item `glyphs' is an optional specification of how many unique glyphs to |
Fred Bauer | ea7a896 | 2011-11-19 23:34:26 +0000 | [diff] [blame] | 379 | store in memory. Default is from the system setting |
| 380 | \setting{Glyphs To Load}. |
Alex Parker | 1b0c77f | 2010-06-20 12:58:09 +0000 | [diff] [blame] | 381 | \end{itemize} |
| 382 | |
Jonathan Gordon | faaf431 | 2010-08-25 14:11:38 +0000 | [diff] [blame] | 383 | An example would be: \config{\%Fl(2,12-Nimbus.fnt,100)} |
Alex Parker | 1b0c77f | 2010-06-20 12:58:09 +0000 | [diff] [blame] | 384 | |
Alex Parker | ab563da | 2009-09-20 16:48:45 +0000 | [diff] [blame] | 385 | } |
| 386 | |
Martin Arver | a245e88 | 2006-03-08 15:04:36 +0000 | [diff] [blame] | 387 | \subsubsection{Conditional Tags} |
Martin Arver | d3d3e34 | 2006-03-15 10:56:14 +0000 | [diff] [blame] | 388 | |
Martin Arver | 47ea906 | 2006-06-07 12:15:46 +0000 | [diff] [blame] | 389 | \begin{description} |
| 390 | \item[If/else: ] |
Dominik Riebeling | f949c8e | 2006-06-07 17:09:06 +0000 | [diff] [blame] | 391 | Syntax: \config{\%?xx{\textless}true{\textbar}false{\textgreater}} |
Martin Arver | 8e8207f | 2006-02-11 00:57:17 +0000 | [diff] [blame] | 392 | |
William Wilgus | dc87e9e | 2016-11-22 06:21:31 +0100 | [diff] [blame] | 393 | If the tag specified by ``\config{xx}'' has a value, the text between the |
Martin Arver | 68e4017 | 2006-06-07 16:37:04 +0000 | [diff] [blame] | 394 | ``\config{{\textless}}'' and the ``\config{{\textbar}}'' is displayed (the true |
William Wilgus | dc87e9e | 2016-11-22 06:21:31 +0100 | [diff] [blame] | 395 | part), else the text between the ``\config{{\textbar}}'' and the |
Martin Arver | 68e4017 | 2006-06-07 16:37:04 +0000 | [diff] [blame] | 396 | ``\config{{\textgreater}}'' is displayed (the false part). |
William Wilgus | dc87e9e | 2016-11-22 06:21:31 +0100 | [diff] [blame] | 397 | The else part is optional, so the ``\config{{\textbar}}'' does not have to be |
Martin Arver | 68e4017 | 2006-06-07 16:37:04 +0000 | [diff] [blame] | 398 | specified if no else part is desired. The conditionals nest, so the text in the |
| 399 | if and else part can contain all \config{\%} commands, including conditionals. |
Martin Arver | d3d3e34 | 2006-03-15 10:56:14 +0000 | [diff] [blame] | 400 | |
Martin Arver | 47ea906 | 2006-06-07 12:15:46 +0000 | [diff] [blame] | 401 | \item[Enumerations: ] |
Dominik Riebeling | f949c8e | 2006-06-07 17:09:06 +0000 | [diff] [blame] | 402 | Syntax: \config{\%?xx{\textless}alt1{\textbar}alt2{\textbar}alt3{\textbar}\dots{\textbar}else{\textgreater}} |
Martin Arver | 8e8207f | 2006-02-11 00:57:17 +0000 | [diff] [blame] | 403 | |
William Wilgus | dc87e9e | 2016-11-22 06:21:31 +0100 | [diff] [blame] | 404 | For tags with multiple values, like Play status, the conditional can hold a |
Martin Arver | 68e4017 | 2006-06-07 16:37:04 +0000 | [diff] [blame] | 405 | list of alternatives, one for each value the tag can have. |
William Wilgus | dc87e9e | 2016-11-22 06:21:31 +0100 | [diff] [blame] | 406 | Example enumeration: |
Martin Arver | 68e4017 | 2006-06-07 16:37:04 +0000 | [diff] [blame] | 407 | \begin{example} |
Alex Mayer | 6c4395b | 2012-10-05 11:19:27 -0400 | [diff] [blame] | 408 | \%?mp{\textless}Stop{\textbar}Play{\textbar}Pause{\textbar}Ffwd{\textbar}Rew{\textgreater} |
Martin Arver | 68e4017 | 2006-06-07 16:37:04 +0000 | [diff] [blame] | 409 | \end{example} |
Martin Arver | 8e8207f | 2006-02-11 00:57:17 +0000 | [diff] [blame] | 410 | |
William Wilgus | dc87e9e | 2016-11-22 06:21:31 +0100 | [diff] [blame] | 411 | The last else part is optional, and will be displayed if the tag has no value. |
Martin Arver | 68e4017 | 2006-06-07 16:37:04 +0000 | [diff] [blame] | 412 | The WPS parser will always display the last part if the tag has no value, or if |
| 413 | the list of alternatives is too short. |
Martin Arver | 47ea906 | 2006-06-07 12:15:46 +0000 | [diff] [blame] | 414 | \end{description} |
Martin Arver | 8e8207f | 2006-02-11 00:57:17 +0000 | [diff] [blame] | 415 | |
Marc Guay | 85eec85 | 2008-06-24 05:16:23 +0000 | [diff] [blame] | 416 | \subsubsection{Next Song Info} |
Dominik Riebeling | b7eef89 | 2006-04-10 21:47:09 +0000 | [diff] [blame] | 417 | You can display information about the next song -- the song that is |
Martin Arver | 8e8207f | 2006-02-11 00:57:17 +0000 | [diff] [blame] | 418 | about to play after the one currently playing (unless you change the |
Martin Arver | a245e88 | 2006-03-08 15:04:36 +0000 | [diff] [blame] | 419 | plan). |
Martin Arver | 8e8207f | 2006-02-11 00:57:17 +0000 | [diff] [blame] | 420 | |
Dominik Riebeling | f949c8e | 2006-06-07 17:09:06 +0000 | [diff] [blame] | 421 | If you use the upper-case versions of the |
William Wilgus | dc87e9e | 2016-11-22 06:21:31 +0100 | [diff] [blame] | 422 | three tags: \config{F}, \config{I} and \config{D}, they will instead refer to |
| 423 | the next song instead of the current one. Example: \config{\%Ig} is the genre |
Alex Parker | 5174341 | 2009-08-25 21:51:55 +0000 | [diff] [blame] | 424 | name used in the next song and \config{\%Ff} is the mp3 frequency.\\ |
Martin Arver | 8e8207f | 2006-02-11 00:57:17 +0000 | [diff] [blame] | 425 | |
Dominik Riebeling | f949c8e | 2006-06-07 17:09:06 +0000 | [diff] [blame] | 426 | \note{The next song information \emph{will not} be available at all |
Martin Arver | 09c3961 | 2006-08-18 16:57:56 +0000 | [diff] [blame] | 427 | 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 Arver | a245e88 | 2006-03-08 15:04:36 +0000 | [diff] [blame] | 430 | |
Alex Parker | e56030a | 2009-05-15 21:17:21 +0000 | [diff] [blame] | 431 | \subsubsection{\label{ref:AlternatingSublines}Alternating Sublines} |
Martin Arver | 8e8207f | 2006-02-11 00:57:17 +0000 | [diff] [blame] | 432 | |
William Wilgus | dc87e9e | 2016-11-22 06:21:31 +0100 | [diff] [blame] | 433 | It 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 |
Martin Arver | 68e4017 | 2006-06-07 16:37:04 +0000 | [diff] [blame] | 435 | specified time, alternating continuously through each defined subline. |
Martin Arver | 8e8207f | 2006-02-11 00:57:17 +0000 | [diff] [blame] | 436 | |
| 437 | Items on a line are broken into sublines with the semicolon |
Alexander Levin | 5a379bc | 2010-05-20 16:35:45 +0000 | [diff] [blame] | 438 | `\config{;}' character. The display time for |
Martin Arver | 8e8207f | 2006-02-11 00:57:17 +0000 | [diff] [blame] | 439 | each subline defaults to 2 seconds unless modified by using the |
Alexander Levin | 5a379bc | 2010-05-20 16:35:45 +0000 | [diff] [blame] | 440 | `\config{\%t}' tag to specify an alternate |
Martin Arver | 8e8207f | 2006-02-11 00:57:17 +0000 | [diff] [blame] | 441 | time (in seconds and optional tenths of a second) for the subline to be |
William Wilgus | dc87e9e | 2016-11-22 06:21:31 +0100 | [diff] [blame] | 442 | displayed. |
Martin Arver | 8e8207f | 2006-02-11 00:57:17 +0000 | [diff] [blame] | 443 | |
William Wilgus | dc87e9e | 2016-11-22 06:21:31 +0100 | [diff] [blame] | 444 | Subline related special characters and tags: |
Dominik Riebeling | f949c8e | 2006-06-07 17:09:06 +0000 | [diff] [blame] | 445 | \begin{description} |
| 446 | \item[;] Split items on a line into separate sublines |
| 447 | \item[\%t] Set the subline display time. The |
Alex Parker | 64d4ddf | 2010-06-20 12:58:41 +0000 | [diff] [blame] | 448 | `\config{\%t}' is followed by either integer seconds (\config{\%t5}), or seconds |
| 449 | and tenths of a second within () e.g. (\config{\%t(3.5)}). |
Dominik Riebeling | f949c8e | 2006-06-07 17:09:06 +0000 | [diff] [blame] | 450 | \end{description} |
Martin Arver | 8e8207f | 2006-02-11 00:57:17 +0000 | [diff] [blame] | 451 | |
| 452 | Each alternating subline can still be optionally scrolled while it is |
| 453 | being displayed, and scrollable formats can be displayed on the same |
| 454 | line with non{}-scrollable formats (such as track elapsed time) as long |
Martin Arver | a245e88 | 2006-03-08 15:04:36 +0000 | [diff] [blame] | 455 | as they are separated into different sublines. |
Martin Arver | a245e88 | 2006-03-08 15:04:36 +0000 | [diff] [blame] | 456 | Example subline definition: |
Martin Arver | 47ea906 | 2006-06-07 12:15:46 +0000 | [diff] [blame] | 457 | \begin{example} |
Alex Parker | 64d4ddf | 2010-06-20 12:58:41 +0000 | [diff] [blame] | 458 | %s%t(4)%ia;%s%it;%t(3)%pc %pr : Display id3 artist for 4 seconds, |
Martin Arver | 49cdd5e | 2006-06-07 13:29:52 +0000 | [diff] [blame] | 459 | Display id3 title for 2 seconds, |
| 460 | Display current and remaining track time |
| 461 | for 3 seconds, |
| 462 | repeat... |
Martin Arver | 47ea906 | 2006-06-07 12:15:46 +0000 | [diff] [blame] | 463 | \end{example} |
Martin Arver | 8e8207f | 2006-02-11 00:57:17 +0000 | [diff] [blame] | 464 | |
Martin Arver | 68e4017 | 2006-06-07 16:37:04 +0000 | [diff] [blame] | 465 | Conditionals can be used with sublines to display a different set and/or number |
| 466 | of sublines on the line depending on the evaluation of the conditional. |
Martin Arver | a245e88 | 2006-03-08 15:04:36 +0000 | [diff] [blame] | 467 | Example subline with conditionals: |
Martin Arver | 47ea906 | 2006-06-07 12:15:46 +0000 | [diff] [blame] | 468 | \begin{example} |
Alex Parker | 64d4ddf | 2010-06-20 12:58:41 +0000 | [diff] [blame] | 469 | %?it{\textless}%t(8)%s%it{\textbar}%s%fn{\textgreater};%?ia{\textless}%t(3)%s%ia{\textbar}%t(0){\textgreater}\\ |
Martin Arver | 47ea906 | 2006-06-07 12:15:46 +0000 | [diff] [blame] | 470 | \end{example} |
Martin Arver | 8e8207f | 2006-02-11 00:57:17 +0000 | [diff] [blame] | 471 | |
William Wilgus | dc87e9e | 2016-11-22 06:21:31 +0100 | [diff] [blame] | 472 | The format above will do two different things depending if ID3 tags are |
Martin Arver | 68e4017 | 2006-06-07 16:37:04 +0000 | [diff] [blame] | 473 | present. If the ID3 artist and title are present: |
Dominik Riebeling | f949c8e | 2006-06-07 17:09:06 +0000 | [diff] [blame] | 474 | \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} |
| 479 | If the ID3 artist and title are not present: |
| 480 | \begin{itemize} |
| 481 | \item Display the filename continuously. |
| 482 | \end{itemize} |
Dominik Riebeling | ebb8a22 | 2006-04-04 17:48:10 +0000 | [diff] [blame] | 483 | Note that by using a subline display time of 0 in one branch of a conditional, |
William Wilgus | dc87e9e | 2016-11-22 06:21:31 +0100 | [diff] [blame] | 484 | a subline can be skipped (not displayed) when that condition is met. |
Martin Arver | a245e88 | 2006-03-08 15:04:36 +0000 | [diff] [blame] | 485 | |
Martin Arver | a245e88 | 2006-03-08 15:04:36 +0000 | [diff] [blame] | 486 | \subsubsection{Using Images} |
William Wilgus | dc87e9e | 2016-11-22 06:21:31 +0100 | [diff] [blame] | 487 | You can have as many as 52 images in your WPS. There are various ways of |
Dominik Riebeling | ebb8a22 | 2006-04-04 17:48:10 +0000 | [diff] [blame] | 488 | displaying images: |
Martin Arver | a245e88 | 2006-03-08 15:04:36 +0000 | [diff] [blame] | 489 | \begin{enumerate} |
Martin Arver | 68e4017 | 2006-06-07 16:37:04 +0000 | [diff] [blame] | 490 | \item Load and always show the image, using the \config{\%x} tag |
William Wilgus | dc87e9e | 2016-11-22 06:21:31 +0100 | [diff] [blame] | 491 | \item Preload the image with \config{\%xl} and show it with \config{\%xd}. |
Martin Arver | 68e4017 | 2006-06-07 16:37:04 +0000 | [diff] [blame] | 492 | This way you can have your images displayed conditionally. |
Nils Wallménius | da55588 | 2006-11-13 15:14:28 +0000 | [diff] [blame] | 493 | \nopt{archos}{% |
William Wilgus | dc87e9e | 2016-11-22 06:21:31 +0100 | [diff] [blame] | 494 | \item Load an image and show as backdrop using the \config{\%X} tag. The |
Martin Arver | 09c3961 | 2006-08-18 16:57:56 +0000 | [diff] [blame] | 495 | image must be of the same exact dimensions as your display. |
Nils Wallménius | da55588 | 2006-11-13 15:14:28 +0000 | [diff] [blame] | 496 | }% |
Martin Arver | a245e88 | 2006-03-08 15:04:36 +0000 | [diff] [blame] | 497 | \end{enumerate} |
Martin Arver | 959d23e | 2006-06-04 15:03:39 +0000 | [diff] [blame] | 498 | |
Nils Wallménius | 12eb058 | 2008-03-23 22:07:09 +0000 | [diff] [blame] | 499 | \optv{swcodec}{% This doesn't depend on swcodec but we don't have a \noptv |
Nils Wallménius | da55588 | 2006-11-13 15:14:28 +0000 | [diff] [blame] | 500 | % command. |
Martin Arver | 47ea906 | 2006-06-07 12:15:46 +0000 | [diff] [blame] | 501 | Example on background image use: |
| 502 | \begin{example} |
Alex Parker | 64d4ddf | 2010-06-20 12:58:41 +0000 | [diff] [blame] | 503 | %X(background.bmp) |
Martin Arver | 47ea906 | 2006-06-07 12:15:46 +0000 | [diff] [blame] | 504 | \end{example} |
| 505 | The image with filename \fname{background.bmp} is loaded and used in the WPS. |
Nils Wallménius | da55588 | 2006-11-13 15:14:28 +0000 | [diff] [blame] | 506 | }% |
Martin Arver | 47ea906 | 2006-06-07 12:15:46 +0000 | [diff] [blame] | 507 | |
| 508 | Example on bitmap preloading and use: |
| 509 | \begin{example} |
Alex Parker | 64d4ddf | 2010-06-20 12:58:41 +0000 | [diff] [blame] | 510 | %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 Arver | 47ea906 | 2006-06-07 12:15:46 +0000 | [diff] [blame] | 516 | \end{example} |
William Wilgus | dc87e9e | 2016-11-22 06:21:31 +0100 | [diff] [blame] | 517 | Four images at the same x and y position are preloaded in the example. Which |
Martin Arver | 68e4017 | 2006-06-07 16:37:04 +0000 | [diff] [blame] | 518 | image to display is determined by the \config{\%mm} tag (the repeat mode). |
Martin Arver | a245e88 | 2006-03-08 15:04:36 +0000 | [diff] [blame] | 519 | |
| 520 | \subsubsection{Example File} |
Martin Arver | 47ea906 | 2006-06-07 12:15:46 +0000 | [diff] [blame] | 521 | \begin{example} |
William Wilgus | dc87e9e | 2016-11-22 06:21:31 +0100 | [diff] [blame] | 522 | %s%?in<%in - >%?it<%it|%fn> %?ia<[%ia%?id<, %id>]> |
Dominik Riebeling | f949c8e | 2006-06-07 17:09:06 +0000 | [diff] [blame] | 523 | %pb%pc/%pt |
Martin Arver | 47ea906 | 2006-06-07 12:15:46 +0000 | [diff] [blame] | 524 | \end{example} |
Dominik Riebeling | ebb8a22 | 2006-04-04 17:48:10 +0000 | [diff] [blame] | 525 | That is, ``tracknum -- title [artist, album]'', where most fields are only |
| 526 | displayed if available. Could also be rendered as ``filename'' or ``tracknum -- |
| 527 | title [artist]''. |
Martin Arver | a245e88 | 2006-03-08 15:04:36 +0000 | [diff] [blame] | 528 | |
Nils Wallménius | 12eb058 | 2008-03-23 22:07:09 +0000 | [diff] [blame] | 529 | %\opt{lcd_bitmap}{ |
Martin Arver | a245e88 | 2006-03-08 15:04:36 +0000 | [diff] [blame] | 530 | % \begin{verbatim} |
Martin Arver | 47ea906 | 2006-06-07 12:15:46 +0000 | [diff] [blame] | 531 | % %s%?it<%?in<%in. |>%it|%fn> |
Alex Parker | 64d4ddf | 2010-06-20 12:58:41 +0000 | [diff] [blame] | 532 | % %s%?ia<%ia|%?d2<%d(2)|(root)>> |
| 533 | % %s%?id<%id|%?d1<%d(1)|(root)>> %?iy<(%iy)|> |
William Wilgus | dc87e9e | 2016-11-22 06:21:31 +0100 | [diff] [blame] | 534 | % |
Martin Arver | 47ea906 | 2006-06-07 12:15:46 +0000 | [diff] [blame] | 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 Arver | 8e8207f | 2006-02-11 00:57:17 +0000 | [diff] [blame] | 541 | |
Marc Guay | 85eec85 | 2008-06-24 05:16:23 +0000 | [diff] [blame] | 542 | \section{\label{ref:manage_settings}Managing Rockbox Settings} |
Martin Arver | 8e8207f | 2006-02-11 00:57:17 +0000 | [diff] [blame] | 543 | |
Alexander Levin | 15c850c | 2010-01-22 22:54:05 +0000 | [diff] [blame] | 544 | \subsection{Introduction to \fname{.cfg} Files} |
Marianne Arnold | b24f5ce | 2008-01-17 19:45:22 +0000 | [diff] [blame] | 545 | Rockbox allows users to store and load multiple settings through the use of |
| 546 | configuration files. A configuration file is simply a text file with the |
| 547 | extension \fname{.cfg}. |
Martin Arver | 8e8207f | 2006-02-11 00:57:17 +0000 | [diff] [blame] | 548 | |
Marianne Arnold | a352c62 | 2007-05-19 19:03:39 +0000 | [diff] [blame] | 549 | A configuration file may reside anywhere on the disk. Multiple |
Martin Arver | 09c3961 | 2006-08-18 16:57:56 +0000 | [diff] [blame] | 550 | configuration files are permitted. So, for example, you could have |
| 551 | a \fname{car.cfg} file for the settings that you use while playing your |
| 552 | jukebox in your car, and a \fname{headphones.cfg} file to store the |
Nils Wallménius | 01bd736 | 2009-02-04 14:22:35 +0000 | [diff] [blame] | 553 | settings that you use while listening to your \dap{} through headphones. |
Martin Arver | 8e8207f | 2006-02-11 00:57:17 +0000 | [diff] [blame] | 554 | |
William Wilgus | dc87e9e | 2016-11-22 06:21:31 +0100 | [diff] [blame] | 555 | See \reference{ref:cfg_specs} below for an explanation of the format |
Marianne Arnold | b24f5ce | 2008-01-17 19:45:22 +0000 | [diff] [blame] | 556 | for configuration files. See \reference{ref:manage_settings_menu} for an |
Martin Arver | 09c3961 | 2006-08-18 16:57:56 +0000 | [diff] [blame] | 557 | explanation of how to create, edit and load configuration files. |
Martin Arver | 8e8207f | 2006-02-11 00:57:17 +0000 | [diff] [blame] | 558 | |
Alexander Levin | 15c850c | 2010-01-22 22:54:05 +0000 | [diff] [blame] | 559 | \subsection{\label{ref:cfg_specs}Specifications for \fname{.cfg} Files} |
Michael DiFebbo | 0623841 | 2006-08-12 15:56:33 +0000 | [diff] [blame] | 560 | |
William Wilgus | dc87e9e | 2016-11-22 06:21:31 +0100 | [diff] [blame] | 561 | The Rockbox configuration file is a plain text file, so once you use the |
| 562 | \setting{Save .cfg file} option to create the file, you can edit the file on |
Marianne Arnold | b24f5ce | 2008-01-17 19:45:22 +0000 | [diff] [blame] | 563 | your computer using any text editor program. See |
William Wilgus | dc87e9e | 2016-11-22 06:21:31 +0100 | [diff] [blame] | 564 | Appendix \reference{ref:config_file_options} for available settings. Configuration |
Marianne Arnold | b24f5ce | 2008-01-17 19:45:22 +0000 | [diff] [blame] | 565 | files use the following formatting rules: % |
Martin Arver | 09c3961 | 2006-08-18 16:57:56 +0000 | [diff] [blame] | 566 | |
William Wilgus | dc87e9e | 2016-11-22 06:21:31 +0100 | [diff] [blame] | 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. |
Martin Arver | 09c3961 | 2006-08-18 16:57:56 +0000 | [diff] [blame] | 574 | \end{enumerate} |
| 575 | |
| 576 | Example of a configuration file: |
| 577 | \begin{example} |
Alexander Levin | 005caba | 2009-03-22 12:14:03 +0000 | [diff] [blame] | 578 | 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 Arver | 09c3961 | 2006-08-18 16:57:56 +0000 | [diff] [blame] | 587 | \end{example} |
| 588 | |
William Wilgus | dc87e9e | 2016-11-22 06:21:31 +0100 | [diff] [blame] | 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 |
| 591 | that change only certain settings. So, for example, suppose you |
| 592 | typically use the \dap{} at one volume in the car, and another when using |
| 593 | 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 |
| 599 | files} option to quickly change settings.\\} |
Nils Wallménius | 01bd736 | 2009-02-04 14:22:35 +0000 | [diff] [blame] | 600 | |
| 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 Arver | 09c3961 | 2006-08-18 16:57:56 +0000 | [diff] [blame] | 606 | |
William Wilgus | dc87e9e | 2016-11-22 06:21:31 +0100 | [diff] [blame] | 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 |
| 609 | Menu}. The \setting{Manage Settings} menu allows you to save and load |
Nils Wallménius | 01bd736 | 2009-02-04 14:22:35 +0000 | [diff] [blame] | 610 | \fname{.cfg} files. |
Martin Arver | 09c3961 | 2006-08-18 16:57:56 +0000 | [diff] [blame] | 611 | |
| 612 | \begin{description} |
William Wilgus | dc87e9e | 2016-11-22 06:21:31 +0100 | [diff] [blame] | 613 | |
Nils Wallménius | 01bd736 | 2009-02-04 14:22:35 +0000 | [diff] [blame] | 614 | \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 Arnold | 8c54767 | 2010-07-04 22:33:37 +0000 | [diff] [blame] | 617 | contained in that file. Pressing \ActionStdCancel{} will exit back to the |
Nils Wallménius | 01bd736 | 2009-02-04 14:22:35 +0000 | [diff] [blame] | 618 | \setting{Manage Settings} menu. See the \setting{Write .cfg files} option on |
William Wilgus | dc87e9e | 2016-11-22 06:21:31 +0100 | [diff] [blame] | 619 | the \setting{Manage Settings} menu for details of how to save and edit a |
Martin Arver | 56b339e | 2006-08-27 20:44:23 +0000 | [diff] [blame] | 620 | configuration file. |
William Wilgus | dc87e9e | 2016-11-22 06:21:31 +0100 | [diff] [blame] | 621 | |
Marc Guay | 162a8f2 | 2008-06-28 16:10:02 +0000 | [diff] [blame] | 622 | \item [Reset Settings]This wipes the saved settings |
William Wilgus | dc87e9e | 2016-11-22 06:21:31 +0100 | [diff] [blame] | 623 | in the \dap{} and resets all settings to their default values. |
| 624 | |
Szymon Dziok | f7253e3 | 2010-05-24 19:24:38 +0000 | [diff] [blame] | 625 | \opt{IRIVER_H100_PAD,IRIVER_H300_PAD,IAUDIO_X5_PAD,SANSA_E200_PAD,SANSA_C200_PAD% |
Szymon Dziok | e7f113e | 2014-10-22 09:58:28 +0200 | [diff] [blame] | 626 | ,PBELL_VIBE500_PAD,SAMSUNG_YH92X_PAD,SAMSUNG_YH820_PAD}{ |
William Wilgus | dc87e9e | 2016-11-22 06:21:31 +0100 | [diff] [blame] | 627 | \note{You can also reset all settings to their default |
Marc Guay | 162a8f2 | 2008-06-28 16:10:02 +0000 | [diff] [blame] | 628 | values by turning off the \dap, turning it back on, and holding the |
Nils Wallménius | 01bd736 | 2009-02-04 14:22:35 +0000 | [diff] [blame] | 629 | \ButtonRec{} button immediately after the \dap{} turns on.} |
William Wilgus | dc87e9e | 2016-11-22 06:21:31 +0100 | [diff] [blame] | 630 | } |
Marc Guay | 162a8f2 | 2008-06-28 16:10:02 +0000 | [diff] [blame] | 631 | \opt{IRIVER_H10_PAD}{\note{You can also reset all settings to |
Marianne Arnold | 56b3f92 | 2008-01-20 16:33:12 +0000 | [diff] [blame] | 632 | their default values by turning off the \dap, and turning it back on |
Nils Wallménius | 01bd736 | 2009-02-04 14:22:35 +0000 | [diff] [blame] | 633 | with the \ButtonHold{} button on.} |
Marcoen Hirschberg | 1e51477 | 2007-04-27 19:38:16 +0000 | [diff] [blame] | 634 | } |
William Wilgus | dc87e9e | 2016-11-22 06:21:31 +0100 | [diff] [blame] | 635 | \opt{IPOD_4G_PAD}{\note{You can also reset all settings to their default |
Marc Guay | 162a8f2 | 2008-06-28 16:10:02 +0000 | [diff] [blame] | 636 | values by turning off the \dap, turning it back on, and activating the |
Nils Wallménius | 01bd736 | 2009-02-04 14:22:35 +0000 | [diff] [blame] | 637 | \ButtonHold{} button immediately after the backlight comes on.} |
Marc Guay | 162a8f2 | 2008-06-28 16:10:02 +0000 | [diff] [blame] | 638 | } |
Marianne Arnold | 56b3f92 | 2008-01-20 16:33:12 +0000 | [diff] [blame] | 639 | \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énius | 01bd736 | 2009-02-04 14:22:35 +0000 | [diff] [blame] | 641 | \ButtonA{} button immediately after the \dap{} turns on.} |
Marianne Arnold | b24f5ce | 2008-01-17 19:45:22 +0000 | [diff] [blame] | 642 | } |
| 643 | |
William Wilgus | dc87e9e | 2016-11-22 06:21:31 +0100 | [diff] [blame] | 644 | \item [Save .cfg File]This option writes a \fname{.cfg} file to |
| 645 | your \daps{} disk. The configuration file has the \fname{.cfg} |
| 646 | extension and is used to store all of the user settings that are described |
Martin Arver | 09c3961 | 2006-08-18 16:57:56 +0000 | [diff] [blame] | 647 | throughout this manual. |
Nils Wallménius | 01bd736 | 2009-02-04 14:22:35 +0000 | [diff] [blame] | 648 | |
William Wilgus | dc87e9e | 2016-11-22 06:21:31 +0100 | [diff] [blame] | 649 | Hint: Use the \setting{Save .cfg File} feature (\setting{Main Menu |
| 650 | $\rightarrow$ Manage Settings}) to save the current settings, then |
| 651 | use a text editor to customize the settings file. See Appendix |
| 652 | \reference{ref:config_file_options} for the full reference of available |
Martin Arver | 09c3961 | 2006-08-18 16:57:56 +0000 | [diff] [blame] | 653 | options. |
William Wilgus | dc87e9e | 2016-11-22 06:21:31 +0100 | [diff] [blame] | 654 | |
| 655 | \item [Save Sound Settings]This option writes a \fname{.cfg} file to |
| 656 | your \daps{} disk. The configuration file has the \fname{.cfg} |
Dominik Riebeling | d3bf94f | 2008-03-11 18:43:56 +0000 | [diff] [blame] | 657 | extension and is used to store all of the sound related settings. |
William Wilgus | dc87e9e | 2016-11-22 06:21:31 +0100 | [diff] [blame] | 658 | |
| 659 | \item [Save Theme Settings]This option writes a \fname{.cfg} file to |
| 660 | your \daps{} disk. The configuration file has the \fname{.cfg} |
Dominik Riebeling | d3bf94f | 2008-03-11 18:43:56 +0000 | [diff] [blame] | 661 | extension and is used to store all of the theme related settings. |
Michael DiFebbo | 0623841 | 2006-08-12 15:56:33 +0000 | [diff] [blame] | 662 | |
Martin Arver | 09c3961 | 2006-08-18 16:57:56 +0000 | [diff] [blame] | 663 | \end{description} |
Martin Arver | 8e8207f | 2006-02-11 00:57:17 +0000 | [diff] [blame] | 664 | |
Martin Arver | 8e8207f | 2006-02-11 00:57:17 +0000 | [diff] [blame] | 665 | \section{\label{ref:FirmwareLoading}Firmware Loading} |
Martin Arver | 96f898e | 2006-03-25 09:22:43 +0000 | [diff] [blame] | 666 | \opt{player,recorder,recorderv2fm,ondio}{ |
Martin Arver | 7bdd03a | 2006-08-27 15:00:50 +0000 | [diff] [blame] | 667 | When your \dap{} powers on, it loads the Archos firmware in ROM, which |
William Wilgus | dc87e9e | 2016-11-22 06:21:31 +0100 | [diff] [blame] | 668 | automatically checks your \daps{} root directory for a file named |
| 669 | \firmwarefilename. Note that Archos firmware can only read the first |
| 670 | ten characters of each filename in this process, so do not rename your old |
| 671 | firmware files with names like \firmwarefilename.\fname{old} and so on, |
| 672 | because it is possible that the \dap{} will load a file other than the one |
Martin Arver | 7bdd03a | 2006-08-27 15:00:50 +0000 | [diff] [blame] | 673 | you intended. |
Martin Arver | d3d3e34 | 2006-03-15 10:56:14 +0000 | [diff] [blame] | 674 | } |
Martin Arver | 8e8207f | 2006-02-11 00:57:17 +0000 | [diff] [blame] | 675 | |
Marc Guay | 85eec85 | 2008-06-24 05:16:23 +0000 | [diff] [blame] | 676 | \subsection{\label{ref:using_rolo}Using ROLO (Rockbox Loader)} |
William Wilgus | dc87e9e | 2016-11-22 06:21:31 +0100 | [diff] [blame] | 677 | Rockbox is able to load and start another firmware file without rebooting. |
Dominik Riebeling | 2794888 | 2006-07-24 20:53:27 +0000 | [diff] [blame] | 678 | You just ``play'' a file with the extension % |
| 679 | \opt{recorder,recorderv2fm,ondio}{\fname{.ajz}.} % |
| 680 | \opt{player}{\fname{.mod}.} % |
Marianne Arnold | b43b493 | 2011-01-17 18:30:18 +0000 | [diff] [blame] | 681 | \opt{iriverh100,iriverh300}{\fname{.iriver}.} % |
Dominik Riebeling | 2794888 | 2006-07-24 20:53:27 +0000 | [diff] [blame] | 682 | \opt{ipod}{\fname{.ipod}.} % |
| 683 | \opt{iaudio}{\fname{.iaudio}.} % |
Szymon Dziok | a8b5589 | 2014-10-15 16:23:34 +0200 | [diff] [blame] | 684 | \opt{sansa,iriverh10,iriverh10_5gb,mrobe100,vibe500,samsungyh}{\fname{.mi4}.} % |
Jean-Louis Biasini | 6637e24 | 2012-02-21 16:41:35 +0100 | [diff] [blame] | 685 | \opt{sansaAMS,fuzeplus}{\fname{.sansa}.} % |
Alex Parker | 5174341 | 2009-08-25 21:51:55 +0000 | [diff] [blame] | 686 | \opt{gigabeatf,gigabeats}{\fname{.gigabeat}.} % |
Dominik Riebeling | 2794888 | 2006-07-24 20:53:27 +0000 | [diff] [blame] | 687 | This can be used to test new firmware versions without deleting your |
Dominik Riebeling | ebb8a22 | 2006-04-04 17:48:10 +0000 | [diff] [blame] | 688 | current version. |
Martin Arver | 8e8207f | 2006-02-11 00:57:17 +0000 | [diff] [blame] | 689 | |
Martin Arver | 30b0e66 | 2006-06-15 11:56:50 +0000 | [diff] [blame] | 690 | \opt{archos}{\input{advanced_topics/archos-flashing.tex}} |
Alexander Levin | b57fe48 | 2009-12-23 20:05:29 +0000 | [diff] [blame] | 691 | |
Andree Buschmann | 10023ad | 2010-03-29 17:58:17 +0000 | [diff] [blame] | 692 | \section{Optimising battery runtime} |
William Wilgus | dc87e9e | 2016-11-22 06:21:31 +0100 | [diff] [blame] | 693 | Rockbox offers a lot of settings that have high impact on the battery runtime |
Andree Buschmann | 10023ad | 2010-03-29 17:58:17 +0000 | [diff] [blame] | 694 | of your \dap{}. The largest power savings can be achieved through disabling |
| 695 | unneeded hardware components -- for some of those there are settings |
William Wilgus | dc87e9e | 2016-11-22 06:21:31 +0100 | [diff] [blame] | 696 | available. |
| 697 | |
| 698 | |
Andree Buschmann | 10023ad | 2010-03-29 17:58:17 +0000 | [diff] [blame] | 699 | \opt{swcodec}{ |
| 700 | Another area of savings is avoiding or reducing CPU boosting |
William Wilgus | dc87e9e | 2016-11-22 06:21:31 +0100 | [diff] [blame] | 701 | through disabling computing intense features (e.g. sound processing) or |
| 702 | using effective audio codecs. |
| 703 | } The following provides a short overview of the most relevant settings and |
Andree Buschmann | 10023ad | 2010-03-29 17:58:17 +0000 | [diff] [blame] | 704 | rules of thumb. |
| 705 | |
| 706 | \nopt{ondio}{ |
| 707 | \subsection{Display backlight} |
| 708 | The active backlight consumes a lot of power. Therefore choose a setting that |
William Wilgus | dc87e9e | 2016-11-22 06:21:31 +0100 | [diff] [blame] | 709 | disables the backlight after timeout (for setting \setting{Backlight} see |
| 710 | \reference{ref:Displayoptions}). Avoid having the backlight enabled all the |
| 711 | time (Activating \setting{selectivebacklight} |
| 712 | \reference{ref:selectivebacklight} can further reduce power consumption). |
Andree Buschmann | 10023ad | 2010-03-29 17:58:17 +0000 | [diff] [blame] | 713 | } |
| 714 | |
| 715 | \opt{lcd_sleep}{ |
| 716 | \subsection{Display power-off} |
William Wilgus | dc87e9e | 2016-11-22 06:21:31 +0100 | [diff] [blame] | 717 | Shutting down the display and the display controller saves a reasonable amount |
Andree Buschmann | 10023ad | 2010-03-29 17:58:17 +0000 | [diff] [blame] | 718 | of power. Choose a setting that will put the display to sleep after timeout |
William Wilgus | dc87e9e | 2016-11-22 06:21:31 +0100 | [diff] [blame] | 719 | (for setting \setting{Sleep} see \reference{ref:Displayoptions}). Avoid to |
Andree Buschmann | 10023ad | 2010-03-29 17:58:17 +0000 | [diff] [blame] | 720 | have the display enabled all the time -- even, if the display is transflective |
William Wilgus | dc87e9e | 2016-11-22 06:21:31 +0100 | [diff] [blame] | 721 | and is readable without backlight. Depending on your \dap{} it might be |
| 722 | significantly more efficient to re-enable the display and its backlight for a |
Andree Buschmann | 10023ad | 2010-03-29 17:58:17 +0000 | [diff] [blame] | 723 | glimpse a few times per hour than to keep the display enabled. |
| 724 | } |
| 725 | |
| 726 | \opt{accessory_supply}{ |
| 727 | \subsection{Accessory power supply} |
| 728 | As default your \dap{}'s accessory power supply is always enabled to ensure |
William Wilgus | dc87e9e | 2016-11-22 06:21:31 +0100 | [diff] [blame] | 729 | proper function of connected accessory devices. Disable this power supply, if |
| 730 | -- or as long as -- you do not use any accessory device with your \dap{} while |
Andree Buschmann | 10023ad | 2010-03-29 17:58:17 +0000 | [diff] [blame] | 731 | running Rockbox (see \reference{ref:AccessoryPowerSupply}). |
| 732 | } |
| 733 | |
| 734 | \opt{lineout_poweroff}{ |
| 735 | \subsection{Line Out} |
William Wilgus | dc87e9e | 2016-11-22 06:21:31 +0100 | [diff] [blame] | 736 | Rockbox allows to switch off the line-out on your \dap{}. If you do not need |
Andree Buschmann | 10023ad | 2010-03-29 17:58:17 +0000 | [diff] [blame] | 737 | the line-out, switch it off (see \reference{ref:LineoutOnOff}). |
| 738 | } |
| 739 | |
| 740 | \opt{spdif_power}{ |
| 741 | \subsection{Optical Output} |
William Wilgus | dc87e9e | 2016-11-22 06:21:31 +0100 | [diff] [blame] | 742 | Rockbox allows to switch off the S/PDIF output on your \dap{}. If you do not |
Andree Buschmann | 10023ad | 2010-03-29 17:58:17 +0000 | [diff] [blame] | 743 | need this output, switch it off (see \reference{ref:SPDIF_OnOff}). |
| 744 | } |
| 745 | |
| 746 | \opt{disk_storage}{ |
| 747 | \subsection{Anti-Skip Buffer} |
| 748 | Having a large anti-skip buffer tends to use more power, and may reduce your |
William Wilgus | dc87e9e | 2016-11-22 06:21:31 +0100 | [diff] [blame] | 749 | battery life. It is recommended to always use the lowest possible setting |
Andree Buschmann | 10023ad | 2010-03-29 17:58:17 +0000 | [diff] [blame] | 750 | that allows correct and continuous playback (see \reference{ref:AntiSkipBuf}). |
| 751 | } |
| 752 | |
Andree Buschmann | 2349cf5 | 2010-04-12 06:40:58 +0000 | [diff] [blame] | 753 | \opt{swcodec}{ |
| 754 | \subsection{Replaygain} |
William Wilgus | dc87e9e | 2016-11-22 06:21:31 +0100 | [diff] [blame] | 755 | Replaygain is a post processing that equalises the playback volume of audio |
| 756 | files to the same perceived loudness. This post processing applies a factor |
| 757 | to each single PCM sample and is therefore consuming additional CPU time. If |
| 758 | you want to achieve some (minor) savings in runtime, switch this feature off |
Andree Buschmann | 2349cf5 | 2010-04-12 06:40:58 +0000 | [diff] [blame] | 759 | (see \reference{ref:ReplayGain}). |
| 760 | } |
| 761 | |
Andree Buschmann | 2a72e0a | 2011-12-18 12:41:52 +0000 | [diff] [blame] | 762 | \opt{lcd_bitmap}{ |
| 763 | \subsection{Peak Meter} |
William Wilgus | dc87e9e | 2016-11-22 06:21:31 +0100 | [diff] [blame] | 764 | The peak meter is a feature of the While Playing Screen and will be updated with a |
| 765 | high framerate. Depending on your \dap{} this might result in a high CPU load. To |
Andree Buschmann | 2a72e0a | 2011-12-18 12:41:52 +0000 | [diff] [blame] | 766 | save battery runtime you should switch this feature off (see \reference{ref:peak_meter}). |
| 767 | \opt{ipodvideo}{ |
| 768 | \note{Especially the \playerman{} \playertype{} suffers from an enabled peak meter.} |
| 769 | } |
| 770 | } |
| 771 | |
Andree Buschmann | 10023ad | 2010-03-29 17:58:17 +0000 | [diff] [blame] | 772 | \opt{swcodec,disk_storage,flash_storage}{ |
| 773 | \subsection{Audio format and bitrate} |
| 774 | \opt{swcodec}{ |
| 775 | In general the fastest decoding audio format will be the best in terms of |
William Wilgus | dc87e9e | 2016-11-22 06:21:31 +0100 | [diff] [blame] | 776 | battery runtime on your \dap{}. An overview of different codec's performance |
Andree Buschmann | 10023ad | 2010-03-29 17:58:17 +0000 | [diff] [blame] | 777 | on different \dap{}s can be found at \wikilink{CodecPerformanceComparison}. |
| 778 | } |
| 779 | |
| 780 | \opt{flash_storage}{ |
| 781 | Your target uses flash that consumes a certain amount of power during access. |
William Wilgus | dc87e9e | 2016-11-22 06:21:31 +0100 | [diff] [blame] | 782 | The less often the flash needs to be switched on for buffering and the shorter |
| 783 | the buffering duration is, the lower is the overall power consumption. |
| 784 | Therefore the bitrate of the audio files does have an impact on the battery |
| 785 | runtime as well. Lower bitrate audio files will result in longer battery |
Andree Buschmann | 10023ad | 2010-03-29 17:58:17 +0000 | [diff] [blame] | 786 | runtime. |
| 787 | } |
| 788 | \opt{disk_storage}{ |
| 789 | Your target uses a hard disk which consumes a large amount of power while |
William Wilgus | dc87e9e | 2016-11-22 06:21:31 +0100 | [diff] [blame] | 790 | spinning -- up to several hundred mA. The less often the hard disk needs to |
| 791 | spin up for buffering and the shorter the buffering duration is, the lower is |
| 792 | the power consumption. Therefore the bitrate of the audio files does have an |
| 793 | impact on the battery runtime as well. Lower bitrate audio files will result |
Andree Buschmann | 10023ad | 2010-03-29 17:58:17 +0000 | [diff] [blame] | 794 | in longer battery runtime. |
| 795 | } |
| 796 | |
William Wilgus | dc87e9e | 2016-11-22 06:21:31 +0100 | [diff] [blame] | 797 | Please do not re-encode any existing audio files from one lossy format to |
Andree Buschmann | 10023ad | 2010-03-29 17:58:17 +0000 | [diff] [blame] | 798 | another based upon the above mentioned. This will reduce the audio quality. |
William Wilgus | dc87e9e | 2016-11-22 06:21:31 +0100 | [diff] [blame] | 799 | If you have the choice, select the best suiting codec when encoding the |
Andree Buschmann | 10023ad | 2010-03-29 17:58:17 +0000 | [diff] [blame] | 800 | original source material. |
| 801 | } |
| 802 | |
| 803 | \opt{swcodec}{ |
| 804 | \subsection{Sound settings} |
| 805 | In general all kinds of sound processing will need more CPU time and therefore |
William Wilgus | dc87e9e | 2016-11-22 06:21:31 +0100 | [diff] [blame] | 806 | consume more power. The less sound processing you use, the better it is for |
Andree Buschmann | 10023ad | 2010-03-29 17:58:17 +0000 | [diff] [blame] | 807 | the battery runtime (for options see \reference{ref:configure_rockbox_sound}). |
| 808 | } |