HDMV

 
HDMV (High Definition Movie) mode is an interactive framework with the well-known features of DVD, but it's more advanced than DVD menus.

It uses a 16 MB memory buffer for graphics. They're stored into the preloading memory buffer before loading the main video, audio, and subtitle streams into the primary memory buffer. HDMV provides multi-stream handling called Out-of-Mux. Out-of-Mux is when the primary stream with individual streams is stored separately but decoded simultaneously in a 27 Mhz clock.

HDMV supports two types of raster bitmap graphics streams for menus and interactive content, the Presentation Graphics stream (available in HDMV and BD-J) is for subtitles and animated graphics, and the Interactive Graphics stream (available only in HDMV) is for interactive menu graphics. IG streams (No file extension name) are separately stored in M2TS files and their decoding process works on a 27MHz clock. To synchronize with the Primary Video and Audio streams, an IG stream operates at a frequency of 90KHz. Like PG streams, IG streams are similar to PNG and use Run Length Encoding for lossless compression to conserve space and memory.

Interactive Graphics are limited to 8-bit 256 colors and alpha transparency, and sprites cannot overlap. They support simple animations such as scrolls, wipes, cuts, fades (transparency changes), and color changes with frame rates up to 30Hz. Supported resolutions are 1920x1080 / 1280x720 / 720x480 / 720x576.

Here's an example of a simple HDMV menu that uses Interactive Graphics (on the right) and AVC video for the background. Made in Abyss S1 D2 (US)

HDMV's Movie Objects are executable object files. They are written in a low-level navigation command language with strict conditional statements, and then it is compiled into binary object code for the player to read. Object code is the machine language representation of programming source code.

Here's a portion from Made in Abyss' MovieObject; this is the code that powers the HDMV application:
 
Move [4075] {Title(4)}
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 portion code that powers the interactive main menu and controls the navigation and BOGs (Button Overlap Groups aka sprites):

Move [4075] [3553]
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] 
SetButtonPage Button: [2575] Page (Effect:On): [4076]
GoTo Label_34

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). It can get confusing since there's little documentation!

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. 

All of these commands are stored in a “ MovieObject.bdmv” file. The file is in machine-readable binary form, to see its contents in human-readable form, you must open it in a Blu-ray editor program like BDedit or Scenarist. Blu-ray has 10x times more commands than DVD (16+) and HD-DVD (400+).

Commands for Interactive titles can be stored inside a M2TS container along with Interactive Graphics. You will also see it's magic number, 48 44 4D 56,  "HDMV".

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 GPR4075PSR4 ;PSR4: Title Number (b15-b0) {1-999,$ffff}
[50000001,00000A27 ,00000FEB]  Move GPR2599GPR4075
[50000001,00000FEB ,00000A27]  Move GPR4075GPR2599
[50400001,00000FEC ,0000FFFF]  Move GPR407665535
[48000300,00000FEB ,00000FEC]  NE GPR4075GPR4076
[20810000,00000007 ,00000000]  GoTo 7
[20810000,00000009 ,00000000]  GoTo 9
[20810000,000007D5 ,00000000]  GoTo 2005
[20810000,00000009 ,00000000]  GoTo 9
[50400001,00000FEB ,00000000]  Move GPR40750
[50000001,000009F8 ,00000FEB]  Move GPR2552GPR4075

 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.

    See: List of HDMV Commands

 

General Purpose Registers (GPRs)

A GPR stores a fixed length variable. The variable is stored as a 32-bit unsigned integer. There are 4096 GPRs available. Navigation commands are used to change the values contained in General Purpose Registers. 

In Scenarist, GPRs are written in the program as a number value in square brackets. For example: [ 5 ]

In BDedit they are written like this:  GPR5.

    See: List of GPRs


Player Status Registers (PSRs)

A PSR stores a fixed length variable. The variable is stored as a 32-bit unsigned integer. There are 128 PSRs including reserved ones in total. Navigation commands can not change the values contained in PSRs. 

In Scenarist, PSRs are written in the program in three equivalent forms:

  1. Number in the curly brackets: { 4 };
  2. Name in the curly brackets: { Title };
  3. Name with a number in the round brackets in the curly brackets: { Title ( 4 ) }
In BDedit, they are written like this: PSR4 ;PSR4: Title Number (b15-b0) {1-999,$ffff}

    See: List of PSRs 

 

 
The 2006 release of Memento uses a fancy HDMV menu with animated graphics and sound effects that fit the movie's theme.


HDMV mode may be a simple interactive framework with cool features but it was not intended or recommended for complex video games or applications. The only possible video games that developers would make would be:
  •     Telltale-style FMV game
  •     FMV games
  •     Virtual Board game
  •     Text adventure (with graphics and sound)
  •     Trivia/party games
  •     Linear or non-linear Visual Novels

 HDMV mode does not support local storage for saving game progress, installing content from the disc, or accessing network features. However, HDMV supports resume play, and you can use old-fashioned passwords to save your progress (using number keys on the remote). Which are revealed after a certain point, and the player must write it down should they wish to continue. Still, it's highly NOT recommended for video games, that's what BD-J mode is for.

Warner Bros. and Indie/Boutique labels often prefer using HDMV for their Blu-ray development projects due to its simplicity, quick loading, and ease of running on computers without requiring a runtime environment. For those interested in Blu-ray development, HDMV is a "beginner-friendly" framework to consider due to its standardization.


Author(s) : Æ Firestone

on Friday, February 23, 2024 | | A comment?
0 responses to “HDMV”

Leave a Reply

Popular Pages