Working with GPRs and user-defined parameters
Blu-ray provides 4096 (0-4095) General Purpose Registers (GPR). Each register can store a 32-bit unsigned
integer.
4091-4095 are reserved by BDMV; 1000-4005 are reserved by the application for internal use:
- 1000-1999 - the current audio/subtitle values;
- 2000-3999 - the resume times;
- 4001 - the current SFX state (5 in GPR 4001 means that SFX is off);
- 4005 - the pressed state of the Top Menu button. 5 in GPR 4005 means that the Top Menu button was pressed. You
can use this to execute an action assigned to the Top Menu: set GPR 4005 to 5 and use the
"Select JAR title" action.
You can use the remaining registers for your own purposes.
You can set a GPR in a Multi-action or a Switch, or directly in
a script (Java code).
User-defined parameters can be declared in the
project properties.
Setting a value in a Switch or a Multi-action
When you select the Set value action in a Switch or a Multi-action, a new window pops up:

Here you can specify:
- what you want to assign to - a parameter or a GPR (the first drop-down list);
- the number of the GPR register;
- the operation - assign (=), add a value to the specified register/parameter (=+), subtract a value (=-),
multiply by a value (=*), divide by a value (=/);
- the type of the value - a simple value, a GPR/PSR register, or a parameter;
- the value itself (for a simple value); for a GPR/PSR register this is the register number.