Log in

View Full Version : Set default main menu button with PgcEdit?


MilesAhead
26th September 2005, 03:18
I'm totally new to PgcEdit but it seems like something easy that I just can't find. I'm using SVCD2DVD and it creates simple menus with one button per title and an optional "Play All" button. Thing is, I can't find anywhere how to change the default button to "Play All". The menu editor GUI is designed to make the button for the first title the default. It would just be nice if the
menu came up with Play All highlighted, if possible.

I tried to edit this with PgcEdit "Advanced Features" but I'm wondering if the fact that the button isn't hooked to a title maybe messes things up?

I read through some of the guides but there seemed to be everything else but explained... is it possible?

Video Dude
26th September 2005, 03:32
You can add a precommand to highlight a button by default.

1 - Open your DVD in PCGEdit and in the left pane select the VTSM which contains the menu. (If you don't know which VTSM contains the menu, you can preview it by selecting a VTSM and then click on the green Menu button on the top menu bar. Keep going through each VTSM until you find the menu with your button you want to make default.)

2 - Use the menu preview and note the button number of the Play All button, then close the preview.

3 - Add a new precommand in the same VTSM as the menu, "NOP" should be displayed. Select it with the mouse and hit the Space Bar on the keyboard to bring up the command edit window.

4 - In the command edit window menu, select Alphabetically --> SetHL_BTN

5 - Then use the slide bar to set the button number of the "Play All" button (the one you noted before).

6 - The NOP should have been replaced by the highlight button command. Save and test. The Play All button should be highlighted as default.

Note: If there is already a highlight button command that is already present, but points to a different button, edit it so that it contains the Play All button number. (step 5)


EDIT: A picture would be helpful. Unfortunately I can't upload one, but a did find a picture of the command in this thread. (http://forum.doom9.org/showpost.php?p=685526&postcount=3) The highlight command is precommand #5. (The linked post refers to something else, just look at the picture.)

2COOL
26th September 2005, 05:56
It would just be nice if the
menu came up with Play All highlighted, if possible.You were almost there. All you had to do was check your "Advanced" checkbox to expand your dialog and set your "force select" button.

http://img335.imageshack.us/img335/7567/screenhunter0172ou.gif (http://imageshack.us)

Keep in mind that if you have multiple cells of this menu, you have to repeat the force select with them too.

This is mentioned briefly in PgcEdit's Help > Documentation. Go to 9.3 Menu Editor (http://www.videohelp.com/~r0lZ/pgcedit/doc/PgcEdit_manual_3.htm#Menu_Editor), go down 6 bullets.

CoNS
26th September 2005, 09:18
@MilesAhead: The two methods that Video Dude and 2COOL described are in fact two totally separate ways of doing what you're after.

So, it can either be done by editing the menu vobs (for example in PgcEdit's menu editor) as described by 2COOL, or it can be done with pre/post commands in the menu IFO file (for example using the normal interface in PgcEdit) as described by Video Dude.

However, it seems that not all standalone players executes the menu vob file flags correctly. My software player (MPC) will accept either solution, whereas my Sony standalone player only accepts the pre/post command solution.

See these threads for further details on the subject:

http://forum.doom9.org/showthread.php?p=693904
http://forum.doom9.org/showthread.php?p=707085
http://forum.doom9.org/showthread.php?p=611886#post611886

MilesAhead
26th September 2005, 16:22
Thank you all for the info. 2Cool I did get to the advanced force select and set it to the button number but prolly what happened is I only edited one cell and it didn't "take". With this info I should get there though. Thanks again.

MilesAhead
26th September 2005, 18:27
Using the precommand to highlight the button worked but I'm curious about something. I modified 2 DVDs. In the first one I added a precommand before the menu script that jumps to titles but I didn't notice the Edit command to increment the Gotos. So the script is broken, but AFAICT
the menu works anyway!! Is there a FAQ or some online docs with basics what "gprm" and all that is about?

What I did on the second DVD is in the VMG First Play I set the highlight button before it jumps to the menu. Seems to work just the same. I'm just curious why I don't see any effect from breaking the script.

Here's the script for VMGM with 5 button menu

************** pre commands:
1 if ( grpm(13) == 1028 ) then { Goto line 3 }
2 Break
3 if ( grpm(14) == 1 ) then { Goto line 8 }
4 if ( grpm(14) == 2 ) then { Goto line 9 }
5 if ( grpm(14) == 3 ) then { Goto line 10 }
6 if ( grpm(14) == 4 ) then { Goto line 11 }
7 Break
8 (JumpTT) Jump to Title 1
9 (JumpTT) Jump to Title 2
10 (JumpTT) Jump to Title 3
11 (JumpTT) Jump to Title 4
**************** post commands:
1 if ( gprm(0) == 0 ) then { Goto line 7 }
2 if ( gprm(0) == 1 ) then { Goto line 8 }
3 if ( gprm(0) == 2 ) then { Goto line 9 }
4 if ( gprm(0) == 3 ) then { Goto line 10 }
5 if ( gprm(0) == 4 ) then { Goto line 11 }
6 LinkPGCN PGC 2
7 (JumpTT) Jump to Title 1
8 (JumpTT) Jump to Title 2
9 (JumpTT) Jump to Title 3
10 (JumpTT) Jump to Title 4
11 Set grpm(13) =(mov) 1028
12 Set gprm(14) =(mov) 1
13 (JumpTT) Jump to Title 1
************** cell commands:
1 LinkTopCell

CirTap
26th September 2005, 19:01
Hi,
could you please highlight|bold|color the lines you edited or added?
Is "1028" the intended value for GPRM(13)? If this is supposed to be the number of the button, it should be 1024, unless some other command in Title 1 deals with the "offset of 4" correctly to SetHL_BTN accordingly.

Have fun,
CirTap

Video Dude
26th September 2005, 19:54
Is there a FAQ or some online docs with basics what "gprm" and all that is about?This may help: http://www.dvd-replica.com/DVD/gprm.php
http://www.dvd-replica.com/DVD/setgprmops.php


In the first one I added a precommand before the menu script that jumps to titles but I didn't notice the Edit command to increment the Gotos. So the script is broken, but AFAICT the menu works anyway!! It still worked because the menu button most likely called the post command. The precommands are executed before the menu is displayed on your screen. If you add commands before a goto statement, then edit each goto line and increment it by the number of commands you added.

For example:
Original DVD:
************** pre commands:
1 if ( grpm(13) == 1028 ) then { Goto line 3 }
2 Break
3 if ( grpm(14) == 1 ) then { Goto line 8 }
4 if ( grpm(14) == 2 ) then { Goto line 9 }
5 if ( grpm(14) == 3 ) then { Goto line 10 }
6 if ( grpm(14) == 4 ) then { Goto line 11 }
.
.
.

After you add the command make sure it looks like this:
************** pre commands:
1 New Highlight Button Command
2 if ( grpm(13) == 1028 ) then { Goto line 4 }
3 Break
4 if ( grpm(14) == 1 ) then { Goto line 9 }
5 if ( grpm(14) == 2 ) then { Goto line 10 }
6 if ( grpm(14) == 3 ) then { Goto line 11 }
7 if ( grpm(14) == 4 ) then { Goto line 12 }
.
.
.


An even easier approach in this particular case is the put your New Highlight Button Command after all the other precommands, so you don't have to increment each GOTO line. Since you are having the menu display, that means the the Jump to Title commands are not executing.

MilesAhead
26th September 2005, 20:27
Video Dude thanks for the link. That's interesting. When I was reading the script it seemed like they were hardware registers. So I was curious.

CirTap I should have been clearer in my post. That script I posted is from the 2nd DVD menu that I didn't edit. Instead I put the highlight button command before the jump to the menu. Afterward I noticed the Edit commands to rework the Gotos. I was just wondering why the first DVD with the broken Gotos wasn't totally hosed is all. Apparently once in the menu itself the logic is not shown so I couldn't break it. :)

For my purpose, for now, with these simple one-stage menus the button highlight before jump to the menu seems to work fine. I guess I'll go with that since it's a one-liner. I may not bother to change it on future DVDs but it was buggin' me that I couldn't find out how to modify it. :)

Thanks to everyone for the responses and also to the authors of neat freeware. It's nice to be able to tweak things without spending $500. :)

r0lZ
26th September 2005, 23:14
An even easier approach in this particular case is the put your New Highlight Button Command after all the other precommands, so you don't have to increment each GOTO line. Since you are having the menu display, that means the the Jump to Title commands are not executing.No, that cannot work in this particular case. Since there are Break and JumpTT commands , the SetHL_BTN command will never be executed!

r0lZ
26th September 2005, 23:20
@MilesAhead
In PgcEdit, there is an option to automatically renumber the GOTO commands when you insert, remove, cut or paste commands. Look in the Options menu.

BTW, I like your pseudo. I'm a big fan of Miles!

MilesAhead
27th September 2005, 00:04
BTW, I like your pseudo. I'm a big fan of Miles!


Heh heh. Sometimes I don't see what's there cuz I'm lookin' for what's not there. :cool:

Video Dude
27th September 2005, 00:23
No, that cannot work in this particular case. Since there are Break and JumpTT commands , the SetHL_BTN command will never be executed!

wow .. I looked at those commands and did not notice the breaks (I even cut and pasted one :p ) For some reason I was thinking it was just gotos and jumps.