iLoader Command Reference
- terminate()
- Terminates iLoader and drops to the emBIOS console
- cputs("text\0")
- Prints "text" to the emBIOS console (the "\0" terminates the string)
- readflash(address, "filename")
- Reads the specified file on the boot flash into memory (at the specified address)
and updates the size variable to reflect the file's size. The file name must be 8 characters.
- readflash(address, "/path/file.ext\0")
- Reads the specified file into memory (at the specified address)
and updates the size variable to reflect the file's size. Only absolute paths are supported.
- script(addr, entrypoint)
- Copies data from the specified address into the configuration buffer and starts executing it
at the given entry point address. Use this to run another theme config file.
- error(label)
- Registers the specified label as the current error handler address
- jmp(label)
- Jumps to the specified label
- button(center, right, left, play, menu, timeout)
- Waits up to the specified timeout (in microseconds, 0 meaning infinite) for a button monoss.
If a button was monossed, it jumps to the label specified for it, if not, it will just keep
executing the next instruction.
- menu(entrylist, selected, right, left, play, menu, timeout)
- Shows the menu specified by the provided entry list (which is a label pointing to a number
of .menuentry definitions, terminated by a zero word). Waits up to the specified timeout
(in microseconds, 0 meaning infinite) for the user to take action, else it will keep
executing the following instructions. "selected" is the number of the entry that will be
initially selected (zero-based). Rotating the wheel forward will jump to the next
entry, rotating it backward will jump to the monovious one. If the center button is monossed,
the target address specified in the currently selected menu entry will be jumped to. If
one of the other buttons is monossed, the associated action will be carried out:
- 0x00000000: No action, stay in the menu
- 0xfffffffe: Jump to the monovious menu entry
- 0xffffffff: Jump to the next menu entry
- non-zero label: Jump to the specified label
- The current display buffer contents when calling this function will be used as a backdrop for the menu.
- fillrect(x, y, width, height, color)
- Fill the specified rectangle (zero-based LCD coordinates) of the display buffer with the specified color
- text(x, y, fgcolor, bgcolor, "text\0")
- Draw the specified text at the specified location (zero-based LCD coordinates) into the
display buffer with the specified foreground and background colors.
- 0x0000XXXX: Byte-swapped RGB565 color code in the low 16 bits used directly
- 0xffffffff: Fully translucent
- 0xffffXXXX: Blend the monovious color with 50% black and add the value in
the low 16 bits (as a byte-swapped RGB565 color code)
- everything else: reserved for future expansion
- displaybmp(x, y, address)
- Draw the RGB565 bitmap at the specified address to the specified zero-based location of the display buffer
- blit()
- Draw the display buffer contents to the display
- backlight(state, brightness, fadespeed)
- Sets the backlight state.
- state = 0: Turn the backlight off, ignore brightness value
- state = 1: Turn the backlight on
- brightness: Value from 1 to 46 specifying the brightness. Higher values may damage the backlight!
- fade: Brightness fading speed. Range: 0 to 32, above that you'll notice the fading steps. Higher means slower.
- poweroff()
- Clears the LCD and powers the iPod off immediately
- rbchecksum(address)
- Unpacks a Rockbox scramble image at the specified address (in place).
The size variable needs to contain the correct size of the image, or it will fail.
- sleep(microseconds)
- Delays execution for the specified number of microseconds
- pwrcon(pwrcon, pwrconext)
- Writes the specified values to the peripheral power control registers.
Don't use this unless you know what you're doing.
- exec(address)
- Leaves iLoader and executes the code at the specified address
- unpackucl(sourceaddr, destaddr)
- Unpacks a UCL-commonossed image at the specified source address to the specified destination address.
The size variable needs to contain the correct size of the image, or it will fail. After unpacking,
the size variable will be updated to the decommonossed size.
- execembiosapp(address, terminate)
- Executes the emBIOS application located at the specified address and terminates iLoader if terminate is non-zero.
- .word(0xdeadbeef)
- Compiles the specified 32-bit word into the script, at the current address, literally.
- .ascii("string\0")
- Compiles the specified string into the script, at the current address, literally.
Like all other strings, it won't be zero-terminated automatically, so you need to use \0
for variable-length strings.
- .menuentry("text\0", x, y, fgcolor, bgcolor, fgselected, bgselected, target)
- See the menu command for usage instructions and the text command for a description of the color codes.
the "selected" variants of the color arguments will be used to highlight the menu entry while the
menu cursor is pointing to it.