PDA

View Full Version : Scenarist: how to know current chapter to highlight propper button in chapter menu?


arminio
7th January 2004, 12:02
I have chapter menu and if I go from movie playback to chapter menu, I want to highlight corresponding button - the one that correspond to currently played chapter.

How to know from which chapter I go to menu?

There is no system register with this value and cells with scenes/chapters have no pre/post settings to set some GPRMs ...

Bish0p
7th January 2004, 17:14
take the value of sprm 7 (chapter pos.) and place it into a gprm. then muliply by 1024 and set highlight button
(make sure the forced Selected button# is set to Non-exsistent)

e.g.
in the pre command of the chapter menu:

1. Mov GPRM 3, SPRM 7
2. if ( GPRM 3 < 1024 ) Mul GPRM3, 1024 ( to create the correct button value and prevent it from overflow if the menu loops)
3. if ( GPRM 3 != 1024 ) sub GPRM3, 1024 (if you first chapter button isn't the start of the movie)
4. SET highlight button GPRM3



Also to stop the button returning to the chapter position if the menu loops by using sprm8:
e.g.

pre command of the chapter menu:


1. if ( GPRM1 == 1 ) Goto 7
4. Mov GPRM 3, SPRM 7
5. if ( GPRM 3 < 1024 ) Mul GPRM3, 1024
6. if ( GPRM 3 != 1024 ) sub GPRM3, 1024
7. Mov GPRM1, 0
8. SET highlight button GPRM3


In the post of chapter menu:
1. Mov GPRM1, 1
2. Mov GPRM3, SPRM8
3. LinkPGCN Chapter Root

You can also use this over multiple chapter menus fairly easily

arminio
7th January 2004, 22:42
This doesn't work. I already tried simmilar thing with SPRM7 register but I have chapters in cells and in different title (menu is in one title and movie with chapters as cells in another) and simple SPRM7 is not filled with correct value (I keep getting the same utton activated no matter from which chapter I press menu) :(

Is this separation of menu and movie reason for incorrect value in SPRM7 or maybe I need to make chapters differently to have this register filled with propper value?

arminio
7th January 2004, 23:12
Just tried everything - chapters as cells, as separate programs, even as separate PGCs - but nothing works - SPRM7 does not have propper value and I keep getting first button selected ...

(offcourse, I set Forced selected button to nonexistent ...)

I am out of ideas ... anybody know where is the problem?

arminio
8th January 2004, 07:38
Looks like I found where is problem!

Chapter menu really need to be PTT menu type - otherwise, SPRM7 won't be useable !?

My chapter menu was TITLE menu and this didn't work until I make it PTT menu! I need more testing but looks like SPRM7 can be used only in PTT menus. I will test more to prove that.

Now, I need to rearrange my menus and user other registers to control looping part of ROOT menu because I can't switch to looping cell into ROOT menu from PTT menu ... but, that's another story which I solved using GPRMs, some simple scripts and few dummy PCBs (I hope that will work on each standalone players - anybody have experience with PCBs that are used only to switch control to other menus ?)

Bish0p
8th January 2004, 11:08
Sorry i kinda assumed that your chapter menu was in the VTS language folder.
This method does work. It should also work if your chapter menu is in the title menu

arminio
8th January 2004, 11:57
Strange but - I have chapter menu as title menu but doesn't work.
Only when I put it as PTT menu, then things works ...

Bish0p
8th January 2004, 18:54
Is this separation of menu and movie reason for incorrect value in SPRM7 or maybe I need to make chapters differently to have this register filled with propper value?

i don't understand the type of structure your using, is there any reason to have your chapter menu and video in seperate VTS (if i've understood correctly)? or do you mean your menu is a title entry rather than title menu?

arminio
8th January 2004, 22:13
I obviously doingf something wrong...
Here it is:

I have one VTS and following structure: I have Title menu as dummy PGC in Video manager, PTT menu (with chapters) in VTS and Root menu as dummy PGC also in VTS. The real Root menu (main menu with selections for playing movie or chapter menu) is title entry in Title_2 in VTS and movie is in Title_1 in VTS also.
Now, redirection PRe from dummy Title PGC to PTT menu I achieve that by pressing TITLE button I get chapter menu and by pressing Root meu I go to root menu.


Placing menus without dummy PGCs doe not allow me to connect them propperly because I have animated background with loop (chapter in menu) which cannot be connected (cell part in a loop) if I set things differently.

That is only way I could achieved desired actions - if I am wrong and this can be made better (and I know it can :) ), give me some tips ...

Now, I managed to select buttons according to last chapter by making script based on your example. Things works fine until chapter menu start to loop - then I get selected first button. That's OK (I want to reset selection to button one after loop) - but, when I press chapter menu button again, I again get selection on a button corresponding to chapter. Reason for this is that during entire menu (both - main and chapter) I have last chapter value instead 1 or 0 or whatwer ?! To be precise - if I start movie and from e.g. chapter 3 go back to chapter o root menu, player (I use PowerDVD XP for testing) keeps last title and chapter values insted to reset them !
So, when I get to root menu, I get chapter 3 instead 1 and if I go to chapter menu, I get button 3 selected instead button 1 (I didn't go there from movie but from root menu but becasue last played chapter mysteriously stayed in register, I get wrong result).

Something is fishy here ... help me to clean things out :)

Bish0p
9th January 2004, 12:45
What i would do in this case is create a new title and place a dummy pgc in it. Link the chapter button on the main menu to it, then link the dummy PGC to the chapter menu. This will change sprm7 to 1 thus solving the button mix up.

arminio
9th January 2004, 14:55
I solved this using value in one register which I set/reset to adequate values and use to control highlighting.

Your solution sounds better. I'll try. Thanks!

drpaulng
20th January 2004, 04:03
The highlight button number is pre-defined to begin at the binary bit 10. It is a bit tricky to convert SPRM 7 into SPRM 8 by multiplying 1024. I did not receive any training from the scenarist and depend very much on asking question in this forum. It is very good to have Bish0p to help us out.
Still, I don't understand what is the base of SPRM 7 used (decimal [base 10] or binary [base 2]?). If it is decimal, after multiplying 1024 and setting the highlight from SPRM 7(base 10, not base 2), what happens to the set-highlight (should read a long 010101..value in binary rather than decimal). Does the program (scenarist) convert the decimal into binary automatically?

Crazyjoe
20th January 2004, 21:35
Originally posted by drpaulng

Still, I don't understand what is the base of SPRM 7 used (decimal [base 10] or binary [base 2]?). If it is decimal, after multiplying 1024 and setting the highlight from SPRM 7(base 10, not base 2), what happens to the set-highlight (should read a long 010101..value in binary rather than decimal). Does the program (scenarist) convert the decimal into binary automatically?

All values within Scenarist are represented decimal. That doesn't mean, that you have to work on decimal basis with them. ;)

You have to know the decimal counterparts of the binary values you want.

Hope I don't misunderstood you. :rolleyes: