if ( GPRM0 & GPRM0 ) { Mov GPRM7, 2 ; LinkTailPGC, button=1 }demonstrates some handy tricks for use in BOV and other areas.
First is the use of the & compare operator and the same operand on both sides. What this accomplishes is to test the GPRM for non-zero.
Any non-zero value ANDed with itself will be non-zero, and therefore true. This allows us to set up a GPRM to tell us if the BOV subpictures
are being displayed, and that the button command, which is present regardless of which subpicture stream is displaying (if any), should
activate the feature.
If GPRM0 (in this example) is zero neither the Mov or LinkTailPGC will be performed, causing the button to be ignored.
The rest of the command is typical of a BOV command in that it sets a GPRM to a value which post commands can then use to determine at what point in the movie the button was pressed. And the LinkTailPGC is how we cause the post commands to execute.
This example was taken from an actual DVD, the convention used was to set GPRM0 to 0 if BOV was inactive, and to 1 if active. GPRM7 was intially set to 0 so that when the post commands execute at the end of the movie no extras are shown. After each extra is shown GPRM7 must be reset to 0. However if we reserve a value, say "1", to indicate the button was not pressed and this is the normal exit from the movie, then only one GPRM needs to be used. Set it to 0 to inhibit BOV, or the reserved value to enable. Whenever a button is pressed the GPRM gets set to a non-zero value other than the reserved value causing post commands to show the extra and reset the GPRM to the reserved value.
Prev | Next |
Muxman home page | MXP documentation index | DVD-Video info home |
Copyright © 2005 - 2012 MPUCoder, all rights reserved. |