11.  Advanced Topics

11.1 Customising the User Interface
11.1.1 Getting Extras
11.1.2 Loading Fonts
11.1.3 Loading Languages
11.1.4 Changing Colours
11.1.5 Changing Filetype Colours
11.1.6 Loading Backdrops
11.2 Configuring the WPS
11.2.1 WPS – General Info
11.2.2 WPS – Build Your Own
11.3 Managing Rockbox Settings
11.3.1 Introduction to .cfg Files.
11.3.2 Specifications for .cfg Files.
11.3.3 The Manage Settings menu
11.4 Firmware Loading
11.4.1 Using ROLO (Rockbox Loader)

11.1.  Customising the User Interface

11.1.1.  Getting Extras

Rockbox supports custom fonts. A collection of fonts is available for download in the font package at http://www.rockbox.org/daily.shtml.

11.1.2.  Loading Fonts

Rockbox can load fonts dynamically. Simply copy the .fnt file to the player and “play” it in the File Browser. If you want a font to be loaded automatically every time you start up, it must be located in the /.rockbox/fonts directory and the filename must be at most 24 characters long. You can browse the fonts in /.rockbox/fonts under Settings General Settings Display Browse Fonts in the Main Menu.

Warning: Advanced Users Only: Any BDF font file up to 16 pixels high should be usable with Rockbox. To convert from .bdf to .fnt, use the convbdf tool. This tool can be found in the tools directory of the Rockbox source code.

11.1.3.  Loading Languages

Rockbox can load language files at runtime. Simply copy the .lng file (do not use the .lang file) to the player and “play” it in the Rockbox directory browser or select Settings General Settings Languages from the Main Menu.

Note: If you want a language to be loaded automatically every time you start up, it must be located in the /.rockbox/langs directory and the filename must be a maximum of 24 characters long.

If your language is not yet supported and you want to write your own language file find the instructions on the Rockbox website: LangFiles

11.1.4.  Changing Colours

The colours used in the Rockbox interface can be changed to any combination of background and foreground colour you like. To do this go to the Settings General Settings Display and select Background Colour or Foreground Colour. The colours set here are used in all menus, browsers and in the While Playing Screen.

11.1.5.  Changing Filetype Colours

Rockbox has the capability to modify the File Browser to show different filetypes in different colours depending upon the file extension. See the CustomFiletypeColours Wiki page for details.

11.1.6.  Loading Backdrops

Rockbox supports showing an image as a backdrop in the File Browser and the menus. The backdrop image must be a .bmp file of the exact same dimensions as the display in your player (320x240x16 with the last number giving the colour depth in bits). To use an image as a backdrop browse to it in the File Browser and open the Context Menu (see section 4.1.2) on it and select the option Set As Backdrop. If you want rockbox to remember your backdrop the next time you start your player the backdrop must be placed in the /.rockbox/backdrops directory.

11.2.  Configuring the WPS

11.2.1.  WPS – General Info

Description:
The WPS or While Playing Screen is the name used to describe the information displayed on the player’s screen whilst an audio track is being played. The default WPS is a relatively simple screen displaying Track name, Artist, Album etc. in the default font as a purely text based layout. There are a number of WPS files included in Rockbox, and you can load one of these at anytime by selecting it in General Settings Display Browse .wps files.

Note: “Playing” a .wps from the file browser has the same effect.

File Location:
Custom WPS files may be located anywhere on the drive. The only restriction is that they must end in .wps. When you “play” a .wps file, it will be used for future WPS screens, and if the “played” .wps file is located in the /.rockbox/wps directory, it will be remembered and used after reboot. The .wps filename must be no more than 24 characters long for it to be remembered.

11.2.2.  WPS – Build Your Own

Quite simply, enter the WPS code in your favourite text editor, Notepad on Windows works fine. When you save it, instead of saving it as a .txt file, save it as a .wps file. Example: Instead of Rockbox.txt, save the file as Rockbox.wps. To make sure non english characters display correctly in your WPS you must save the .wps file with UTF-8 character encoding. This can be done in most editors, for example Notepad in Windows 2000 or XP (but not in 9x/ME) can do this. See appendix section B for all the tags that are available.

Note: Keep in mind that your player resolution is 320x240x16 (with the last number giving the colour depth in bits) when designing your own WPS, or if you use a WPS designed for another target.

Conditional Tags
If/else:
Syntax: %?xx<true|false>

If the tag specified by “xx” has a value, the text between the “<” and the “|” is displayed (the true part), else the text between the “|” and the “>” is displayed (the false part). The else part is optional, so the “|” does not have to be specified if no else part is desired. The conditionals nest, so the text in the if and else part can contain all % commands, including conditionals.

Enumerations:
Syntax: %?xx<alt1|alt2|alt3||else>

For tags with multiple values, like Play status, the conditional can hold a list of alternatives, one for each value the tag can have. Example enumeration:

   %?mp<Stop|%Play|Pause|Ffwd|Rew>

The last else part is optional, and will be displayed if the tag has no value. The WPS parser will always display the last part if the tag has no value, or if the list of alternatives is too short.

Next Song Info

You can display information about the next song – the song that is about to play after the one currently playing (unless you change the plan).

If you use the upper-case versions of the three tags: F, I and D, they will instead refer to the next song instead of the current one. Example: %Ig is the genre name used in the next song and %Ff is the mp3 frequency.

Note: The next song information will not be available at all times, but will most likely be available at the end of a song. We suggest you use the conditional display tag a lot when displaying information about the next song!

Alternating Sublines

It is possible to group items on each line into 2 or more groups or “sublines”. Each subline will be displayed in succession on the line for a specified time, alternating continuously through each defined subline.

Items on a line are broken into sublines with the semicolon ’;’ character. The display time for each subline defaults to 2 seconds unless modified by using the ’%t’ tag to specify an alternate time (in seconds and optional tenths of a second) for the subline to be displayed.

Subline related special characters and tags:

;
Split items on a line into separate sublines
%t
Set the subline display time. The ’%t’ is followed by either integer seconds (%t5), or seconds and tenths of a second (%t3.5).

Each alternating subline can still be optionally scrolled while it is being displayed, and scrollable formats can be displayed on the same line with non-scrollable formats (such as track elapsed time) as long as they are separated into different sublines. Example subline definition:

   %s%t4%ia;%s%it;%t3%pc %pr : Display id3 artist for 4 seconds,
                               Display id3 title for 2 seconds,
                               Display current and remaining track time
                               for 3 seconds,
                               repeat...

Conditionals can be used with sublines to display a different set and/or number of sublines on the line depending on the evaluation of the conditional. Example subline with conditionals:

  %?it<%t8%s%it|%s%fn>;%?ia<%t3%s%ia|%t0>

The format above will do two different things depending if ID3 tags are present. If the ID3 artist and title are present:

If the ID3 artist and title are not present:

Note that by using a subline display time of 0 in one branch of a conditional, a subline can be skipped (not displayed) when that condition is met.

Using Images

You can have as many as 52 images in your WPS. There are various ways of displaying images:

  1. Load and always show the image, using the %x tag
  2. Preload the image with %xl and show it with %xd. This way you can have your images displayed conditionally.
  3. Load an image and show as backdrop using the %X tag. The image must be of the same exact dimensions as your display.

Example on background image use:

  %X|background.bmp|

The image with filename background.bmp is loaded and used in the WPS.

Example on bitmap preloading and use:

  %x|a|static_icon.bmp|50|50|
  %xl|b|rep_off.bmp|16|64|
  %xl|c|rep_all.bmp|16|64|
  %xl|d|rep_one.bmp|16|64|
  %xl|e|rep_shuffle.bmp|16|64|
  %?mm<%xdb|%xdc|%xdd|%xde>

Four images at the same x and y position are preloaded in the example. Which image to display is determined by the %mm tag (the repeat mode).

Example File

  %s%?in<%in - >%?it<%it|%fn> %?ia<[%ia%?id<, %id>]>
  %pb%pc/%pt

That is, “tracknum – title [artist, album]”, where most fields are only displayed if available. Could also be rendered as “filename” or “tracknum – title [artist]”.

11.3.  Managing Rockbox Settings

11.3.1.  Introduction to .cfg Files.

Rockbox allows users to store and load multiple settings through the use of configuration files. A configuration file is simply a text file with the extension .cfg.

A configuration file may reside anywhere on the disk. Multiple configuration files are permitted. So, for example, you could have a car.cfg file for the settings that you use while playing your jukebox in your car, and a headphones.cfg file to store the settings that you use while listening to your player through headphones.

See section 11.3.2 below for an explanation of the format for configuration files. See section 11.3.3 for an explanation of how to create, edit and load configuration files.

11.3.2.  Specifications for .cfg Files.

The Rockbox configuration file is a plain text file, so once you use the Save .cfg file option to create the file, you can edit the file on your computer using any text editor program. See Appendix section C for available settings. Configuration files use the following formatting rules:

  1. Each setting must be on a separate line.
  2. Each line has the format “setting: value”.
  3. Values must be within the ranges specified in this manual for each setting.
  4. Lines starting with # are ignored. This lets you write comments into your configuration files.

Example of a configuration file:

  Example configuration file
  volume: 70
  bass: 11
  treble: 12
  balance: 0
  time format: 12hour
  volume display: numeric
  show files: supported
  wps: /.rockbox/car.wps
  lang: /.rockbox/afrikaans.lng

Note: As you can see from the example, configuration files do not need to contain all of the Rockbox options. You can create configuration files that change only certain settings. So, for example, supppose you typically use the player at one volume in the car, and another when using headphones. Further, suppose you like to use an inverse LCD when you are in the car, and a regular LCD setting when you are using headphones. You could create configuration files that control only the volume and LCD settings. Create a few different files with different settings, give each file a different name (such as car.cfg, headphones.cfg, etc.), and you can then use the Browse .cfg files option to quickly change settings.

A special case configuration file can be used to force a particular setting or settings every time Rockbox starts up (e.g. to set the volume to a safe level). Format a new configuration file as above with the required setting(s) and save it into the /.rockbox directory with the filename fixed.cfg.

11.3.3.  The Manage Settings menu

The Manage Settings menu can be found in the Main Menu. The Manage Settings menu allows you to save and load .cfg files.

Browse .cfg Files
Opens the file browser in the /.rockbox directory and displays all .cfg (configuration) files. Selecting a .cfg file will cause Rockbox to load the settings contained in that file. Pressing Prev will exit back to the Manage Settings menu. See the Write .cfg files option on the Manage Settings menu for details of how to save and edit a configuration file.
Reset Settings
This wipes the saved settings in the player and resets all settings to their default values.

Note: You can also reset all settings to their default values by turning off the player, turning it back on, and activating the Hold button immediately after the backlight comes on.

Save .cfg File
This option writes a .cfg file to your player’s disk. The configuration file has the .cfg extension and is used to store all of the user settings that are described throughout this manual.

Hint: Use the Save .cfg File feature (Main Menu General Settings) to save the current settings, then use a text editor to customize the settings file. See Appendix section C for the full reference of available options.

Save Sound Settings
This option writes a .cfg file to your player’s disk. The configuration file has the .cfg extension and is used to store all of the sound related settings.
Save Theme Settings
This option writes a .cfg file to your player’s disk. The configuration file has the .cfg extension and is used to store all of the theme related settings.

11.4.  Firmware Loading

11.4.1.  Using ROLO (Rockbox Loader)

Rockbox is able to load and start another firmware file without rebooting. You just “play” a file with the extension .ipod. This can be used to test new firmware versions without deleting your current version.