HDMV Navigation Command Language
HDMV mode uses the HDMV Navigation Command Language (or Navi Commands) for it's HDMV interactive applications. It is used primarily for scripting menu navigation and button actions, its typing discipline is relatively straightforward. It is also used to program the menu's Interactive graphics and animations.
These commands are stored in the Movie Object file. The language is a standard but has added a few additions for Blu-ray 3D (2010) and Ultra HD Blu-ray (2016).The programming commands are opcodes (abbreviated from operation code) and operands. Opcode is the portion of a machine language instruction that specifies the basic operation to be performed. An Operand is any object capable of being manipulated. All Operation codes and Operands are binary codes (ones and zeros)
An Opcode is a single instruction that can be executed by the CPU. In machine language, a binary or hexadecimal value is loaded into the instruction register.
There are two Operand Registers:
- General Purpose Register (The player has 4096 GPRs total).
-
Player Status Register (The player has 128 PSRs in total) represents the Player’s playback status, configuration, and preferences.
Move [2599] 4075
Move [4075] 2599
Move [4076] 65535 /*0xffff*/
If [4075] != 4076
GoTo 7
GoTo 9
GoTo 2005 /*0x7d5*/
Move [4075] 0
Move [2552] 4075
Another example code that powers the interactive main menu and controls the navigation and BOGs (Button Overlap Groups):
And [4076] 10 /*0xa*/
If [4075] == [4076]
GoTo Label1_0
GoTo Label1_1
Label_0:
Move [4075] 0
Move [4075] 1
SetButtonPage Button: [2577] Page (Effect:On): [4076]
GoTo Label_34
Label_1:
Move [4075] [3553]
Move [4076] 11 /*0xb*/
If [4075] == [4076]
GoTo Label1_2
GoTo Label1_3
Label_2:
Move [4075] 1
Move [4076] 1
SetButtonPage Button: [2575] Page (Effect:On): [4076]
GoTo Label_34
When you open the MovieObject file in BDEdit, it makes the commands a little easier to read. Here's the same MovieObject code from Made in Abyss:
[50000001,00000FEB ,80000004] Move GPR4075, PSR4 ;PSR4: Title Number (b15-b0) {1-999,$ffff}
[50000001,00000A27 ,00000FEB] Move GPR2599, GPR4075
[50000001,00000FEB ,00000A27] Move GPR4075, GPR2599
[50400001,00000FEC ,0000FFFF] Move GPR4076, 65535
[48000300,00000FEB ,00000FEC] NE GPR4075, GPR4076
[20810000,00000007 ,00000000] GoTo 7
[20810000,00000009 ,00000000] GoTo 9
[20810000,000007D5 ,00000000] GoTo 2005
[20810000,00000009 ,00000000] GoTo 9
[50400001,00000FEB ,00000000] Move GPR4075, 0
[50000001,000009F8 ,00000FEB] Move GPR2552, GPR4075
On the left, the blue numbers represent the Opcode's hexadecimal value (machine code) and the right represents the Operand GPR/PSR commands. Think of GPRs as controlling the software (the disc) and PSRs as controlling the hardware (the player).
When you open a Movie Object file in a hex editor, you will see the file's magic number, 4D 4F 42 4A 30 32 30 30, which translates to MOB0100 or MOB0200, letting the player and developer know that this is a Movie Object file.
00000000 4D 4F 42 4A 30 32 30 30 00 00 00 00 00 00 00 00
00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00000020 00 00 00 00 00 00 00 00 00 01 38 BA 00 00 00 00
00000030 00 18 80 00 08 63 50 00 00 01 00 00 0F EB 80 00
00000040 00 04 50 00 00 01 00 00 0A 27 00 00 0F EB 50 00
00000050 00 01 00 00 0F EB 00 00 0A 27 50 40 00 01 00 00
00000060 0F EC 00 00 FF FF 48 00 03 00 00 00 0F EB 00 00
00000070 0F EC 20 81 00 00 00 00 00 07 00 00 00 00 20 81
00000080 00 00 00 00 00 09 00 00 00 00 20 81 00 00 00 00
00000090 07 D5 00 00 00 00 20 81 00 00 00 00 00 09 00 00
000000A0 00 00 50 40 00 01 00 00 0F EB 00 00 00 00 50 00
Then you'll see the list of commands in it's hexadecimal values (colored).
[50000001,00000FEB ,80000004] Move GPR4075, PSR4 ;PSR4: Title Number (b15-b0) {1-999,$ffff}
[50000001,00000A27 ,00000FEB] Move GPR2599, GPR4075
[50000001,00000FEB ,00000A27] Move GPR4075, GPR2599
[50400001,00000FEC ,0000FFFF] Move GPR4076, 65535
[48000300,00000FEB ,00000FEC] NE GPR4075, GPR4076
[20810000,00000007 ,00000000] GoTo 7
[20810000,00000009 ,00000000] GoTo 9
[20810000,000007D5 ,00000000] GoTo 2005
[20810000,00000009 ,00000000] GoTo 9
[50400001,00000FEB ,00000000] Move GPR4075, 0
[50000001,000009F8 ,00000FEB] Move GPR2552, GPR4075
It is possible to edit the Movie Object file directly using a hex editor like ImHex or Hexed.it. But it's recommended to use Blu-ray editing software like BDedit or Scenarist. Unless, your a chad and knows each hexadecimal commands by heart.
If a developer wishes to develop complex applications such as video games it is recommended to use BD-J mode which uses the object-orientated language, Java.
See Also
- HDMV Mode
- List of Navigation Commands
- List of General Purpose Registers
- List of Player Status Registers
Author(s) : Æ Firestone
Popular Pages
-
Clip Information File Type of format Data format First released 2006 Developer Blu-ray Disc Association Filename...
-
INI Type of format Configuration file First released 1985? Developer Microsoft? Filename extension .ini Op...
-
HDMV (High Definition Movie) mode is an interactive framework with the well-known features of DVD, but it's more advanced than DVD m...