Log in

View Full Version : Highlight/auto-select button in language menu


CoNS
3rd September 2005, 12:41
I have DVD with a language selection menu prior to the main menu. There're three languages: Danish (button 1), Swedish (button 2) and English (button 3). ATM no button is automatically highlighted, and the menu, which is still pic menu, goes on forever until a button is highlighted and selected via the remote (cell still time is set to "255").

When the menu pops up, I want it to read my player's default language (from SPRM 8, maybe?). If it's Danish, I want it to highlight button 1. If it's Swedsh, I want it to highlight button 2, and if it's anything else (including English), I want it to highlight button 3. Which pre commands do I use for this?

Second, I want the menu to time out after 10 seconds, auto-selecting the button that is highlighted when it times out. I know how to change the cell still time from "255" to "10" in PgcEdit, making it time out after 10 seconds, but which cell commands do I need to auto-select the button that's highlighted when the menu times out?

BTW, on a side note, the post commands are displayed before the cell commands in PgcEdit. Why is that? I thought that the cell commands are executed before the post commands, but I'm probably wrong, then?

blutach
3rd September 2005, 14:08
There are 3 SPRMs for default language:

0 for menu language
16 for audio
18 for subpic

They are usually the same but don't have to be.

Let's pick SPRM (0)

Assume you have a spare (or unused to this stage) GPRM. Let's assume it is gprm (0).

So, pop this code at the end of your precommands for the menu PGC:

... ; other precommands
...
[56 00 00 00 0C 00 00 00] 1 (SetHL_BTN) Set Highlighted Button =(mov) 3072 (button 3)
[71 00 00 00 64 61 00 00] 2 Set gprm(0) =(mov) 25697 ("da")
[56 20 00 00 04 00 00 80] 3 if ( gprm(0) == sprm(0:Preferred menu language) ) then { (SetHL_BTN) Set Highlighted Button =(mov) 1024 (button 1) }
[00 00 00 00 00 00 00 00] 4 NOP
[71 00 00 00 73 76 00 00] 5 Set gprm(0) =(mov) 29558 ("sv")
[56 20 00 00 08 00 00 80] 6 if ( gprm(0) == sprm(0:Preferred menu language) ) then { (SetHL_BTN) Set Highlighted Button =(mov) 2048 (button 2) }
Check your menu to ensure there is no forced button select as this will override the pre-commands.

Regards

blutach
3rd September 2005, 14:49
As for the cell:

Change the cell still time to 10 seconds. Make sure there is no cell command.

Edit the menu for that cell to say force action button after 10 seconds (advanced settings). Make sure force select button = 0 and force action button also = 0. Number of numerically selectable buttons will automatically be set for you at 3.

http://img85.imageshack.us/img85/9928/untitled3sx1.png (http://imageshack.us)

After 10 seconds you will go to the post commands.

Now this is where you need to replicate what goes on in the buttons.

You need to first transfer sprm (8) to gprm (0) and compare that to successively buttons 1, 2 and 3.

[61 00 00 00 00 88 00 00] 1 Set gprm(0) =(mov) sprm(8:Highlighted button number) Here it becomes impossible to be precriptive without seeing your IFOs. Let's suppose button 1 set gprm(5) =1 and linked to the post commands, button 2 set gprm(5) = 2 and button 3 set gprm(5) = 3 (this is quite typical).

The the following code would be appropriate:
[71 00 00 05 00 03 00 00] 2 Set gprm(5) =(mov) 3 ; default action for English
[71 A0 00 05 00 01 04 00] 3 if ( gprm(0) == 1024 ) then { Set gprm(5) =(mov) 1 } ; action for Danish
[71 A0 00 05 00 02 08 00] 4 if ( gprm(0) == 2048 ) then { Set gprm(5) =(mov) 2 } ; action for Swedish
... ; other post commands which take you out of the PGCMaybe instead they link to different PGCs, in which case the if/thens would link to various PGCNs - say, 11 (English), 12 (Danish) and 13 (Swedish).

[20 04 00 00 00 00 00 0B] 2 LinkPGCN PGC 11 ; default PGCN for English
[20 A4 00 00 04 00 00 0C] 3 if ( gprm(0) == 1024 ) then { LinkPGCN PGC 12 } ; PGCN for Danish
[20 A4 00 00 08 00 00 0D] 4 if ( gprm(0) == 2048 ) then { LinkPGCN PGC 13 } ; PGCN for Swedish
Regards

CoNS
3rd September 2005, 16:11
blutach, thank you very much for your answer. :)

I'll give it a try on my disc...

cheers,

CoNS

EDIT: In the first part (the pre commands), what does the NOP do? (command no. 4). About which SPRM to pick: In the setup menu of my standalone, I can only specify one general default language, so SPRM (0), (16) and (18) are all set to the same value? Or are only one of them set? And which one?

In the second part (the cell thing), I don't understand the interaction or difference between the cell still time and the Force Action Button settings? Why do I need them both? And what does SPRM (8) contain? And why do I need the post commands to reflect the button commands, if the highlighted button is forced selected (Force Action Button)?

:thanks:

2COOL
3rd September 2005, 18:53
In the first part (the pre commands), what does the NOP do? it means No OPerations. If you want to know what the command is all about, just click on the button in command editor. ;)

http://img230.imageshack.us/img230/2038/screenhunter0172zu.png (http://imageshack.us)


About which SPRM to pick: In the setup menu of my standalone, I can only specify one general default language, so SPRM (0), (16) and (18) are all set to the same value? Or are only one of them set? And which one?All three SPRMs are read-only so you can't change them using instructional commands. They read whatever you set your player to.

Here's some info on them

SPRM 0 (Preferred Menu Language): If a DVD has more than one menu language units (LUs), then the player will automatically display the menus that have a language code that matches the value in this register. One way to view the language codes in PgcEdit is to go to Help > ISO639 language codes.

SPRM 16 (Preferred Audio Language): This is used to hold the initial audio language code, which can be configured in your DVD player's settings. The default initial audio language code is "not specified", which is a value of 65535.

SPRM 18 (Preferred Subpicture Language): Same as SPRM 16.

In the second part (the cell thing), I don't understand the interaction or difference between the cell still time and the Force Action Button settings? The cell still time sets the amount of delay seconds after video content has completely played. You have up to 254 seconds and a value of 255 means infinite seconds, which is common for still menus. The Force action button works by when you have the button highlighted, it will automatically execute its button command, hence the "force action". You can also set the delay time on when it's going to be executed.

Why do I need them both?Logically, the way blutach mentions, by default, button 1 is normally highlighted. If the Force action button is set to force button 1 after 10 seconds, then button 1 will execute its command. But, I tried doing this a couple of years ago and it doesn't work this way. How I got it to work is that when the menu displays, I have to highlight another button and go back to button 1 to force activate it.

And what does SPRM (8) contain? It stores your current or recent highlighted button number if you are not in a PGC with buttons. You have up to 36 buttons. Default value is 1024 or button 1.

And why do I need the post commands to reflect the button commands, if the highlighted button is forced selected (Force Action Button)? I already stated my findings on force action flag. The post commands alone should suffice. Don't get confused on force select and force action. Force select is to force the highlighting of a button and force action forces the button commands of highlighted button.

blutach
4th September 2005, 08:56
I used the NOP simply as a "divider" - you will see this a lot in professional authoring, where a couple of NOPs are inserted to make it easier to understand what each little sub-section is all about.

Regards

r0lZ
4th September 2005, 15:18
BTW, on a side note, the post commands are displayed before the cell commands in PgcEdit. Why is that? I thought that the cell commands are executed before the post commands, but I'm probably wrong, then?You're right. The cell commands should be displayed before the post commands.
There are several reasons to layer them in that (confusing?) order.
First, the commands are organized this way in the IFOs.
Furthermore, the pre and post commands are executed sequentially, while only one cell command is executed when a specific cell has finished playing (and only if there is a cell command number associated with that cell). Cell commands are therefore a little bit special, and keeping them between the pre and post commands could be confusing.
Finally, it's the standard in all authoring or reauthoring programs I've seen so far.

CoNS
5th September 2005, 12:35
Thanks to all three of you for the help... Much appreciated. :)

About the NOP: Ok, blutach, I kinda figured that was the reason, but I just had to make sure that I got it right.

@r0lZ: Ok, thanks for elaborating.

@2COOL: Ok, so the conclusion to your reply is that there're in fact two separate ways of controlling the highlight button/force action button, which shouldn't (or at least don't have to) be used at the same time: It can either be controlled by editing the menu vobs in PgcEdit's menu editor, or it can be done with pre/post commands in the menu IFO file, using the normal interface in PgcEdit, right? I think that was the conclusion in this thread (http://forum.doom9.org/showthread.php?p=611886#post611886), too, where I asked some questions about a more simple version of the highlight/timeout function.

Also, at that time (where I did the menu vob editing using VobEdit with instructions from r0lZ), the conclusion was that my software player (MPC) would accept either solution, whereas my Sony standalone player would only accept the pre/post command solution. Kinda like you've experienced, no?

So I'll probably only control be able to control the highlight button/force action button this time, too, by the use of IFO commands... But then there's another thing I don't understand... Wrt the auto-selection of the button when the menu times out, why must I add the commands suggested by blutach as post commands, not cell commands? At page 2 (http://home.tiscali.be/debie.roland/pgcedit/third_party/2cool/remove_language_aspect_ratio_menus/remove_language_and_aspect_ratio_menus_2.htm) of your aspect ratio menu guide, you describe that the button command should be copied into the IFO as a cell command, not post command? Or maybe it doesn't matter?

Are the post commands always executed, no matter what the cell commands are, or can the cell commands make it jump to another PGC and skip the post commands?

blutach
5th September 2005, 13:15
You could use a cell command - but there can only be 1 cell command per cell. So what you do is make a cell command Link PGCN (New Dummy PGC) and pop your command sequence in there.

Regards

CoNS
5th September 2005, 14:25
Would that skip any post commands in the first PGC?

blutach
5th September 2005, 14:50
Yes - the cell command is executed before the post commands. So if that takes you to a new PGC, the post commands in the original PGC won't get executed. Instead the commands you have written in the new PGC will be :)

Regards

2COOL
5th September 2005, 18:41
@CoNS

I believe this thread (http://forum.doom9.org/showthread.php?p=693904#post693904) will provide you with the solution to your request. Basically, if you don't select anything in your menu, it will auto-execute your preferred button command after a time delay of up to 254 seconds. In your case, you mentioned 10 seconds.

CoNS
5th September 2005, 19:09
@2COOL: I think I've got it now. I'd just like to fully understand what's up and down of this thing, so I'll be capable of doing the next disc right. :) Am I right about my assumptions in my above post from earlier today?

2COOL
5th September 2005, 20:04
But then there's another thing I don't understand... Wrt the auto-selection of the button when the menu times out, why must I add the commands suggested by blutach as post commands, not cell commands?blutach's solution is a different beast (algorithm) from mine. My guide doesn't do anything with the post commands.

At page 2 (http://home.tiscali.be/debie.roland/pgcedit/third_party/2cool/remove_language_aspect_ratio_menus/remove_language_and_aspect_ratio_menus_2.htm) of your aspect ratio menu guide, you describe that the button command should be copied into the IFO as a cell command, not post command? yes

Or maybe it doesn't matter? It does matter. Is see that you are still hazy on cell commands. Here's my explanation (http://forum.doom9.org/showthread.php?p=370485#post370485) on this subject.

Are the post commands always executed, no matter what the cell commands are No, you may have cell commands like these.

********** cell commands:
1 (JumpSS) Jump to VMGM PGC 5
2 LinkPGCN PGC 9
3 LinkTopPG
4 LinkTopPGC
5 (JumpSS) Jump to First Play PGC
6 LinkPGN Program 2

, or can the cell commands make it jump to another PGC and skip the post commands?yes, see above cell commands example: 1,2, and 5