View Full Version : [PGCEdit] Help with chapter menus and root menu button?
Meez
4th November 2008, 16:42
i created a dvd with tmpgenc dvd author. it has one title menu with 2 titles and each title has a chapter menu. the chapter menus have multiple pages due to a lot of chapters.
now, when i am in a chapter menu and select a chapter to watch, i press the root menu button and it returns to the chapter menu. which its supposed to do. no problem.
but, let's say i am on the second page of the chapter menu and i select a chapter to watch, then after a few seconds i press the root menu button, it then returns me to the first page of the chapter menu.... not the second page where i selected the chapter.
is there a way to edit the chapter menu so that it returns me to the second or third page of a chapter menu after selecting a chapter on that page, when i press the root menu button?
thanks!
Alex_ander
4th November 2008, 20:07
is there a way to edit the chapter menu so that it returns me to the second or third page of a chapter menu after selecting a chapter on that page, when i press the root menu button?
Yes, there is. You can copy data from SPRM7 (current chapter#) and use that # in pre-commands of the first menu page' PGC for conditional linking to PGC's of other menu pages.
Meez
4th November 2008, 21:48
sounds good!! could you give me an example of the command and where i need to put it?
thanks!
blutach
4th November 2008, 22:06
It's not just one command!
Further to Alex_ander's post, you can implement something like below (where there are 16 chapters, for example, contained in PGCs 10, 11, 12 and 13). In PgcEdit, make a new PGC with the following code in it. I have assumed gprm(1) is free (or at least can be used without harm). If not, find a free gprm.
You will need to re-program the chapter menu button on the main menu to link to this new PGC.
1 Set gprm(1) =(mov) sprm(4:Title number in volume)
2 if ( gprm(1) != 1 ) then { Goto line 15 }
3 Set gprm(1) =(mov) sprm(7:Chapter number (or PGN))
4 if ( gprm(1) == 17 ) then { Goto line 15 }
5 Set gprm(1) -=(sub) 1
6 Set gprm(1) %=(mod) 4
7 Set gprm(1) +=(add) 1
8 Set gprm(1) *=(mul) 1024
9 (SetHL_BTN) Set Highlighted Button =(mov) gprm(1)
10 Set gprm(1) =(mov) sprm(7:Chapter number (or PGN))
11 if ( gprm(1) >= 13 ) then { LinkPGCN PGC 13 }
12 if ( gprm(1) >= 9 ) then { LinkPGCN PGC 12 }
13 if ( gprm(1) >= 5 ) then { LinkPGCN PGC 11 }
14 LinkPGCN PGC 10
15 (SetHL_BTN) Set Highlighted Button =(mov) 1024 (button 1) ; LinkPGCN PGC 10
The theory behind this is simple. Commands 1-4 test whether we have the correct title (title 1 is assumed) and whether the title has been finished (chapter 17 is a tiny cell at the end; if one is not present, you can add it with PgcEdit). If either command 2 or 4 is true, command 15 is executed (chapter 1 is selected). Commands 5-9 select the correct button (where menus contain 6 buttons per page then change line 6) and commands 10-14 select the correct page of the chapter menu.
Where the chapter menu works by using a gprm to select the correct button (say gprm(5)), you can change the following:
....
8 NOP
9 Set gprm(5) =(mov) gprm(1)
....
15 Set gprm(5) =(mov) 1 ; LinkPGCN PGC 10
If the chapter menu is in one PGC, you can usually substitute Link PGN (or Link CN) for Link PGCN.
However, I must stress that this is no panacea, since there are various ways of authoring chapter menus and complications arise if there are say 6 buttons per page for 3 pages and 4 buttons per page thereafter, or where one button represents 2 chapters etc etc.
As well, some DVDs actually implement a jump to correct chapter correctly anyway - just test your DVD to see.
On the bright side for newbies, wencaS has developed a little app, which can be used in conjunction with PgcEdit to automatically skip to the correct chapter on pressing the chapter menu button on the main menu.
Hope this helps.
Regards
Meez
5th November 2008, 01:57
thanks for the info.! sounds too complicated for me. i tried to do it, but i don't know where to begin.
where can i find that app?
blutach
5th November 2008, 02:42
wencaS hasn't posted it yet.
Regards
wencaS
5th November 2008, 08:41
First, I'm sorry please, my English is very bad.
This app is running under AutoHotKey version 1.0.47.0
I tested this only on Windows XP Pro SP2.
Here is that.
Downloads:
ChapterCommandsGenerator v. 0.3 (http://www.wencas.cz/ChapterCommands/ChapterCommands.zip)
videotutorial more PGC (http://www.wencas.cz/ChapterCommands/ChpaterCGenerator_morePGC.rar) (winrar or 7-zip (freeware) will unpack it.
videotutorial one PGC (http://www.wencas.cz/ChapterCommands/ChpaterCGenerator_one.rar) (winrar or 7-zip (freeware) will unpack it.
sample DVD - one PGC (http://www.wencas.cz/ChapterCommands/sample_DoneOnePGC.zip)
Meez
5th November 2008, 22:24
thanks for the app.! after i messed around with it, i finally figured out how to make it work with my menus. :)
Meez
13th November 2008, 14:50
ok, i'm having a problem. my chapter menu is 2 pages where the first page has 6 chapter buttons and the second page has 4 chapter buttons. the first 2 chapter buttons on the 1st page work correctly when pressing the root menu button, but every chapter button after in both pages highlight a button on page 2 when the root button is pressed. how can i fix that?
blutach
13th November 2008, 23:48
That's more complicated and the next version of wencaS's program will take care of it.
Regards
Meez
14th November 2008, 00:27
ok, sounds good!
another issue that i think should be added is a way to select which chapter each button points to. currently, the app only supports sequential chapters where button 1 is chapter 1, button 2 is chapter 2....etc...
i usually make my menus with non-sequential chapters where button 1 is chapter2, button 2 is chapter 5...etc...
blutach
14th November 2008, 01:03
Already addressed in next version.
But you can try commands like:
if gprm(x) = 1 (chapter 1) then Link Program 1, button x
if gprm(x) = 2 (chapter 2) then Link Program 1, button y
if gprm(x) = 3 (chapter 3) then Link Program 1, button z
....
if gprm(x) = 7 (chapter 7) then Link Program 2, button x
if gprm(x) = 8 (chapter 8) then Link Program 2, button y
This takes care of 6 chapters on page 1 and 4 on the next.
Regards
r0lZ
14th November 2008, 04:24
You can also reorder the menu buttons with PgcEdit's menu editor.
Meez
14th November 2008, 15:13
^ oh yeah, i forgot about that!
blutach
14th November 2008, 15:18
Remember, if you do ever renumber buttons, check carefully any statements that set the highlight button before entering the PGC. This seems academic (or even silly) in this case, since the whole idea of the macro is to set a proper HL button based on the chapter that is playing.
Regards
wencaS
17th November 2008, 20:13
@blutach, r0lZ
Thanks for yours replys here.
@Meez and all
For bug report or suggestion for ChapterCommandsGenerator please use this thread http://forum.doom9.org/showthread.php?t=142863. Thanks!
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.