Jump to content

Inside DVD-Video/Instruction Set Details

From Wikibooks, open books for an open world
Inside DVD-Video
 ← Interaction Machine Instruction Set Details Limits → 

For explanations of basic instruction set concepts, see the previous page.

(References: instruction set summary and details)

In each table showing the instruction bit patterns, the top row shows the byte numbers from 0 to 7, and optionally also the bit numbers within each byte (numbered from 7 down to 0), separated by a colon. E.g. the top bit of byte 1 is written as “1:7”. A field containing multiple bits is written with a hyphen separating the starting and ending (inclusive) bit numbers, e.g. the bottom four bits of byte 2 are written as “2:3-0”.

Below the top row is one or two rows. Each row describes one set of valid forms of the instruction.

The fields filled in with cccc.... are for the conditional formats, while those filled in with llll.... may be copied from the corresponding fields of any of the Link instructions, also highlighted in the same colour. Don’t-care fields are filled in thus:    .

Group 0 NOP

[edit | edit source]
0:7-5 0:4-0 1:7-4 1:3-0 2 3 4 5 6 7
0   0  

No operation.

0:7-5 0:4-0 1:7-4 1:3-0 2 3 4 5 6 7
0   cccc 1   cccccccc cccccccc cccccccc   instrnr

Transfers control to the specified instruction number within the current sequence. Sequences of multiple instructions are only allowed in the FPC and pre- and post-sections of PGCs, so those are the only places where this instruction makes sense. Instructions within a sequence are numbered from 1.

Conditional format: 1.

Break

[edit | edit source]
0:7-5 0:4-0 1:7-4 1:3-0 2 3 4 5 6 7
0   cccc 2   cccccccc cccccccc cccccccc  

Terminates the current instruction sequence. Sequences of multiple instructions are only allowed in the FPC and pre- and post-sections of PGCs, so those are the only places where this instruction makes sense.

Conditional format: 1.

SetTmpPML

[edit | edit source]
0:7-5 0:4-0 1:7-4 1:3-0 2 3 4 5 6:7-4 6:3-0 7
0   cccc 3   cccccccc cccccccc cccccccc   level instrnr

Sets a new temporary Parental Management Level, which may require the user to enter a password if the level is being raised. Transfers control to the specified instruction on success. Sequences of multiple instructions are only allowed in the FPC and pre- and post-sections of PGCs, so those are the only places where this instruction makes sense. Instructions within a sequence are numbered from 1.

Conditional format: 1.

Group 1 NOP

[edit | edit source]
0:7-5 0:4-0 1:7-4 1:3-0 2 3 4 5 6 7
1   0  

No operation.

[edit | edit source]
0:7-4 0:3-0 1:7-4 1:3-0 2 3 4 5 6:7-2 6:1-0 7:7-5 7:4-0
2   cccc 1   cccccccc cccccccc | cccccccc hl_bn   lnk

Highlights the button number hl_bn if nonzero (if hl_bn is zero, leaves the button highlight setting unchanged), and transfers control to the target identified by lnk:

Lnk Name
0 no transfer of control (just highlights button, if specified)
1 LinkTopCell (“link to top of cell”, i.e. restart playback of current cell)
2 LinkNextCell
3 LinkPrevCell
5 LinkTopPG (“link to top of program”, i.e. restart playback of current program)
6 LinkNextPG
7 LinkPrevPG
9 LinkTopPGC (“link to top of PGC”, i.e. restart playback of current PGC, presumably re-executing the pre-commands)
10 LinkNextPGC
11 LinkPrevPGC
12 LinkGoupPGC (“go up”)
13 LinkTailPGC (stop playing PGC and jump to post-commands)
16 RSM (resume execution from the last Call)

Note that “next”, “previous” and “up” relationships among PGCs are explicitly defined by fields in the IFO entry for each PGC.

Conditional format: 1.

LinkPGCN

[edit | edit source]
0:7-4 0:3-0 1:7-4 1:3-0 2 3 4 5 6 7
2   cccc 4   cccccccc cccccccc cccccccc pgcn

Link to a PGC by number. The PGC must be in the same domain.

Conditional format: 1.

LinkPTTN

[edit | edit source]
0:7-4 0:3-0 1:7-4 1:3-0 2 3 4 5 6:7-2 6:1-0 7
2   cccc 5   cccccccc cccccccc cccccccc hl_bn pttn

Link to a chapter (PTT) by number. Can only be used within a title, to transfer within the same title.

Conditional format: 1.

LinkPGN

[edit | edit source]
0:7-4 0:3-0 1:7-4 1:3-0 2 3 4 5 6:7-2 6:1-0 7
2   cccc 6   cccccccc cccccccc cccccccc hl_bn 0 pgn

Link to a program by number. Can only transfer within a PGC.

Conditional format: 1.

LinkCN

[edit | edit source]
0:7-4 0:3-0 1:7-4 1:3-0 2 3 4 5 6:7-2 6:1-0 7
2   cccc 7   cccccccc cccccccc cccccccc hl_bn 0 cn

Link to a cell by number. Can only transfer within a PGC.

Conditional format: 1.

0:7-4 0:3-0 1:7-4 1:3-0 2 3 4 5 6 7
3   cccc 1   cccccccc cccccccc

Stops playback. Equivalent to hitting the Stop button on the remote.

Conditional format: 2.

JumpTT

[edit | edit source]
0:7-4 0:3-0 1:7-4 1:3-0 2 3 4 5 6 7
3   cccc 2   ttn cccccccc cccccccc
Valid within: FPC VMGM VTSM VTST
Y Y N N

Jump to the entry PGC of a title by number (index within titlemap?).

Conditional format: 2.

JumpVTS_TT

[edit | edit source]
0:7-4 0:3-0 1:7-4 1:3-0 2 3 4 5 6 7
3   cccc 3   ttn cccccccc cccccccc
Valid within: FPC VMGM VTSM VTST
N N Y Y

Jump to a VTS title entry PGC by number (index within current titleset?). Only transfers within the same titleset.

Conditional format: 2.

JumpVTS_PTT

[edit | edit source]
0:7-4 0:3-0 1:7-4 1:3-0 2 3 4 5 6 7
3   cccc 5   pttn   ttn cccccccc cccccccc
Valid within: FPC VMGM VTSM VTST
N N Y Y

Jump to a VTS chapter (PTT) of a specified title (index within current titleset?) by number. Only transfers within the same titleset.

Conditional format: 2.

JumpSS FP

[edit | edit source]
0:7-4 0:3-0 1:7-4 1:3-0 2 3 4 5:7-6 5:5 5:4-0 6 7
3   cccc 6   0   cccccccc cccccccc
Valid within: FPC VMGM VTSM VTST
N Y Y N

Jump to FPC.

Conditional format: 2.

JumpSS VMGM menu

[edit | edit source]
0:7-4 0:3-0 1:7-4 1:3-0 2 3 4 5:7-6 5:5 5:4-0 6 7
3   cccc 6   1   menu cccccccc cccccccc
Valid within: FPC VMGM VTSM VTST
Y N Y N

Jump to a VMG entry menu. The only valid value for menu is 2 for the title menu.

Conditional format: 2.

JumpSS VTSM

[edit | edit source]
0:7-4 0:3-0 1:7-4 1:3-0 2 3 4 5:7-6 5:5 5:4-0 6 7
3   cccc 6   ttn vts 2   menu cccccccc cccccccc
Valid within: FPC VMGM VTSM VTST
Y Y N N

Jump to a VTS entry menu. Valid values for menu are:

menu entry type
3 root
4 subpicture (subtitle)
5 audio
6 angle
7 chapter

Conditional format: 2.

JumpSS VMGM PGC

[edit | edit source]
0:7-4 0:3-0 1:7-4 1:3-0 2 3 4 5:7-6 5:5 5:4-0 6 7
3   cccc 6 pgcn   3   cccccccc cccccccc
Valid within: FPC VMGM VTSM VTST
Y Y Y N

Jump to a VMGM PGC.

Conditional format: 2.

CallSS FP

[edit | edit source]
0:7-4 0:3-0 1:7-4 1:3-0 2 3 4 5:7-6 5:5 5:4-0 6 7
3   cccc 8   rsm_cell 0   cccccccc cccccccc
Valid within: FPC VMGM VTSM VTST
N N N Y

Save resume point and transfer control to FPC. rsm_cell specifies the cell number to resume at if nonzero (Within what unit? Current program or PGC?), else resume at the next cell.

Conditional format: 2.

CallSS VMGM menu

[edit | edit source]
0:7-4 0:3-0 1:7-4 1:3-0 2 3 4 5:7-6 5:5 5:4-0 6 7
3   cccc 8   rsm_cell 1   menu cccccccc cccccccc
Valid within: FPC VMGM VTSM VTST
N N N Y

Save resume point and transfer control to a VMG entry menu. rsm_cell specifies the cell number to resume at if nonzero (Within what unit? Current program or PGC?), else resume at the next cell. The only valid value for menu is 2 for the title menu.

Conditional format: 2.

CallSS VTSM

[edit | edit source]
0:7-4 0:3-0 1:7-4 1:3-0 2 3 4 5:7-6 5:5 5:4-0 6 7
3   cccc 8   rsm_cell 2   menu cccccccc cccccccc
Valid within: FPC VMGM VTSM VTST
N N N Y

Save resume point and transfer control to a menu within the current titleset. rsm_cell specifies the cell number to resume at if nonzero (Within what unit? Current program or PGC?), else resume at the next cell. Valid values for menu are:

menu entry type
3 root
4 subpicture (subtitle)
5 audio
6 angle
7 chapter

Conditional format: 2.

CallSS VMGM PGC

[edit | edit source]
0:7-4 0:3-0 1:7-4 1:3-0 2 3 4 5:7-6 5:5 5:4-0 6 7
3   cccc 8 pgcn rsm_cell 3   cccccccc cccccccc
Valid within: FPC VMGM VTSM VTST
N N N Y

Save resume point and transfer control to a VMGM PGC. rsm_cell specifies the cell number to resume at if nonzero (Within what unit? Current program or PGC?), else resume at the next cell.

Conditional format: 2.

Group 2 NOP

[edit | edit source]
0:7-5 0:4 0:3-0 1:7 1:6-0 2 3 4 5 6 7
2   0   0  

No operation.

SetSTN

[edit | edit source]
0:7-5 0:4 0:3-0 1:7-4 1:3-0 2 3:7 3:6-0 4:7 4:6-0 5:7 5:6-0 6 7
2 immed 1 cccc 0   af asrc sf ssrc vf vsrc cccccccc cccccccc
0 llll llllllll llllllll

This instruction can set all of the audio, subpicture and view angle registers (SPRMs 1, 2 and 3 respectively), or any combination thereof, at once.

  • If af is 1, then the audio SPRM is set from asrc. If af is 0, asrc is ignored and SPRM 1 is not changed.
  • If sf is 1, then the subpicture SPRM is set from ssrc. If sf is 0, ssrc is ignored and SPRM 2 is not changed.
  • If vf is 1, then the angle SPRM is set from vsrc. If vf is 0, vsrc is ignored and SPRM 3 is not changed.

The interpretation of asrc, ssrc and vsrc are controlled by the immed flag. If this is 1, then all these fields are the literal new 7-bit value for the corresponding register. If immed is 0, then the bottom 8 bits of each field is the number of the source register containing the new value for the destination register.

The values yielded from asrc and ssrc are not stream numbers directly, but are indexes into the PGC_AST_CTL and PGC_SPST_CTL tables respectively in the current PGC. PGC_SPST_CTL in turn can contain four stream numbers in each entry; the selection of which is made according to the current video playback mode (see the description of SPRM 14 above).

Conditional format: 2.

SetNVTMR

[edit | edit source]
0:7-5 0:4 0:3-0 1:7-4 1:3-0 2 3 4 5 6 7
2 immed 2 cccc 0 src pgcn cccccccc cccccccc
0 llll llllllll llllllll

Arms the navigation timer: puts pgcn into NV_PGCN (SPRM 10) and the value of src into NVTMR (SPRM 9), which starts decrementing once a second. When NVTMR reaches 0, a jump is made to pgcn if it is nonzero.

Specifying both (either?) src and pgcn as zero seems like the obvious way to clear the navigation timer before it goes off.

The interpretation of src is controlled by the immed flag. If this is 1, then src is the literal 16-bit value. If immed is 0, then the bottom 8 bits of src are the number of the register containing the value.

Conditional format: 2.

SetGPRMMD

[edit | edit source]
0:7-5 0:4 0:3-0 1:7-4 1:3-0 2 3 4 5:7 5:6-4 5:3-0 6 7
2 immed 3 cccc 0 src   mode   reg cccccccc cccccccc
0 llll llllllll llllllll

Sets GPRM reg to the value given by src; enables counter mode if mode is 1, disables counter mode if mode is 0. In counter mode, the GPRM starts incrementing once per second, otherwise, its value stays constant until changed again.

The interpretation of src is controlled by the immed flag. If this is 1, then src is the literal 16-bit value. If immed is 0, then the bottom 8 bits of src are the number of the register containing the value.

Conditional format: 2.

SetAMXMD

[edit | edit source]
0:7-5 0:4 0:3-0 1:7-4 1:3-0 2 3 4 5 6 7
2 immed 4 cccc 0   src cccccccc cccccccc
0 llll llllllll llllllll

Sets the karaoke mixing mode (SPRM 11) to the value of src.

The interpretation of src is controlled by the immed flag. If this is 1, then src is the literal 16-bit value. If immed is 0, then the bottom 8 bits of src are the number of the register containing the value.

Conditional format: 2.

SetHL_BTNN

[edit | edit source]
0:7-5 0:4 0:3-0 1:7-4 1:3-0 2 3 4 5 6 7
2 immed 6 cccc 0 src   cccccccc cccccccc
0 llll llllllll llllllll

Sets HL_BTNN (SPRM 8) to the value of src. This sets the current highlighted button, 1-36 or 0 for no button. Note that the value must be the button number multiplied by 1024.

The interpretation of src is controlled by the immed flag. If this is 1, then src is the literal 16-bit value. If immed is 0, then the bottom 8 bits of src are the number of the register containing the value.

Conditional format: 2.

0:7-5 0:4 0:3-0 1:7-4 1:3-0 2 3:7-4 3:3-0 4 5 6 7
3 immed op cccc 0 cccccccc   reg src cccccccc cccccccc
0 llll 0 llllllll llllllll

Sets a GPRM to a value computed from a function of its existing value and that of the source operand (and can also change the source operand in the case of a swap). Does it leave counter mode unchanged? op determines the operation to perform according to set-operations (above).

The interpretation of src is controlled by the immed flag. If this is 1, then src is the literal 16-bit value. If immed is 0, then the bottom 8 bits of src are the number of the register containing the value. But note restrictions on src as listed in the set-operation table.

Conditional format: 3.

SetCLnk

[edit | edit source]
0:7-5 0:4 0:3-0 1:7 1:6-4 1:3-0 2 3 4 5 6:7-2 6:1-0 7
4 simmed op cimmed cmp reg ssrc csrc hl_bn   lnk

Sets GPRM reg to the function of it and ssrc according to operation op, then compares the updated reg with the value of csrc according to cmp, and performs the Link operation defined by hl_bn and lnk if the condition is true. These fields are interpreted as in the Link Subset instruction (above).

The interpretation of ssrc is controlled by the simmed flag. If this is 1, then ssrc is the literal 16-bit value. If simmed is 0, then the bottom 8 bits of ssrc are the number of the register containing the value. But note restrictions on ssrc as listed in the set-operation table.

The interpretation of csrc is controlled by the cimmed flag. If this is 1, then csrc is the literal 16-bit value. If cimmed is 0, then the bottom 8 bits of csrc are the number of the register containing the value.

CSetCLnk

[edit | edit source]
0:7-5 0:4 0:3-0 1:7 1:6-4 1:3-0 2 3 4 5 6:7-2 6:1-0 7
5 0 op cimmed cmp reg srcreg creg1 csrc2 hl_bn   lnk
1 0 simmed creg1 creg2

Performs the comparison according to cmp of register creg1 with register creg2 or operand csrc2, and if it is true, set GPRM reg to the computation using it and the value of register srcreg or immediate value simmed according to op, and also perform the Link Subset operation defined by hl_bn and lnk. If the condition is false, neither the set or the link operation is performed.

The interpretation of csrc2 is controlled by the cimmed flag. If this is 1, then csrc2 is the literal 16-bit value. If cimmed is 0, then the bottom 8 bits of csrc2 are the number of the register containing the value.

CSetLnk

[edit | edit source]
0:7-5 0:4 0:3-0 1:7 1:6-4 1:3-0 2 3 4 5 6:7-2 6:1-0 7
6 0 op cimmed cmp reg srcreg creg1 csrc2 hl_bn   lnk
1 0 simmed creg1 creg2

Performs the comparison according to cmp of register creg1 with register creg2 or operand csrc2, and if it is true, set GPRM reg to the computation using it and the value of register srcreg or immediate value simmed according to op. Regardless of the comparison result, perform the Link Subset operation defined by hl_bn and lnk.

The interpretation of csrc2 is controlled by the cimmed flag. If this is 1, then csrc2 is the literal 16-bit value. If cimmed is 0, then the bottom 8 bits of csrc2 are the number of the register containing the value.