Log in

View Full Version : Need help about highlight button...


jamewoong
23rd July 2007, 13:00
I'm editing a menu by adding an extra button for the extra audio added. After few hours of testing/error, I can't manage to make the highlighted button as the original one.

The PGC 10 (2 cells) is a transition menu, it will jump to PGC 11 (same contents as 2nd cell of PGC 10) when it will ended.


ORIGINAL COMMANDS - PGC 10 (2 CELLS) - 7 BUTTONS

********** pre commands:
1 NOP
2 NOP
3 NOP
4 NOP
5 NOP
6 Set gprm(6) =(mov) 128
7 Set gprm(0) =(mov) gprm(4)
8 Set gprm(0) &=(and) 63
9 if ( gprm(0) != 0 ) then { Goto line 11 }
10 Set gprm(0) =(mov) 1
11 Set gprm(0) &=(and) 63
12 Set gprm(0) *=(mul) 1024
13 NOP
14 Set gprm(3) =(mov) 4
15 (SetHL_BTN) Set Highlighted Button =(mov) gprm(0)
16 Set gprm(1) =(mov) 0
17 Set gprm(4) &=(and) 32768
18 if ( gprm(4) == 32768 ) then { LinkCN Cell 2 }
********** post commands:
1 Set gprm(4) =(mov) 1
2 LinkPGCN PGC 11
********** cell commands:

ORIGINAL COMMANDS - PGC 11 - 7 BUTTONS
********** pre commands:
1 NOP
2 NOP
3 NOP
4 NOP
5 NOP
6 Set gprm(6) =(mov) 160
7 Set gprm(0) =(mov) gprm(4)
8 Set gprm(0) &=(and) 63
9 if ( gprm(0) != 0 ) then { Goto line 11 }
10 Set gprm(0) =(mov) 1
11 Set gprm(0) &=(and) 63
12 Set gprm(0) *=(mul) 1024
13 NOP
14 Set gprm(3) =(mov) 5
15 (SetHL_BTN) Set Highlighted Button =(mov) gprm(0)
16 Set gprm(1) =(mov) 0
********** post commands:
1 Set gprm(3) =(mov) 0
2 Set gprm(0) =(mov) sprm(8:Highlighted button number)
3 Set gprm(0) /=(div) 1024
4 if ( gprm(0) != 1 ) then { Goto line 8 }
5 (SetSTN) Set Audio stream = 0
6 Set gprm(4) =(mov) 3
7 LinkPGCN PGC 11
8 if ( gprm(0) != 2 ) then { Goto line 12 }
9 (SetSTN) Set Audio stream = 1
10 Set gprm(4) =(mov) 3
11 LinkPGCN PGC 11
12 if ( gprm(0) != 3 ) then { Goto line 16 }
13 (SetSTN) Set Sub-picture stream = 0, on
14 Set gprm(4) =(mov) 6
15 LinkPGCN PGC 11
16 if ( gprm(0) != 4 ) then { Goto line 20 }
17 (SetSTN) Set Sub-picture stream = 1, on
18 Set gprm(4) =(mov) 6
19 LinkPGCN PGC 11
20 if ( gprm(0) != 5 ) then { Goto line 24 }
21 (SetSTN) Set Sub-picture stream = 0, off
22 Set gprm(4) =(mov) 6
23 LinkPGCN PGC 11
24 if ( gprm(0) != 6 ) then { Goto line 28 }
25 Set gprm(3) =(mov) 257
26 (JumpSS) Jump to VMGM PGC 2
27 NOP
28 if ( gprm(0) != 7 ) then { Goto line 32 }
29 Set gprm(4) =(mov) 3
30 LinkPGCN PGC 8
31 NOP
32 NOP
********** cell commands:
1 LinkTopCell


INFO:

BUTTON 1: 1st audio -->BUTTON 3 if pressed.
BUTTON 2: 2nd audio -->BUTTON 3 if pressed.
BUTTON 3: 1st subtitles -->BUTTON 6 if pressed.
BUTTON 4: 2nd subtitles -->BUTTON 6 if pressed.
BUTTON 5: Subtitles off -->BUTTON 6 if pressed.
BUTTON 6: Resume movie
BUTTON 7: Main menu

When started (just after the cell 1), the BUTTON 1 (1st audio) is highlighted, When clicking on it or BUTTON 2, it will jump to the BUTTON 3 (1st subtitles) and when clicking on it, it will jump to the BUTTON 6 (resume movie).

When started (just after the cell 1), if we select the BUTTON 3, 4, 5, it will jump to BUTTON 6 (resume movie).


EDITED COMMANDS FOR EXTRA BUTTON - PGC 10 (2 CELLS) - 8 BUTTONS
********** pre commands:
1 NOP
2 NOP
3 NOP
4 NOP
5 NOP
6 Set gprm(6) =(mov) 128
7 Set gprm(0) =(mov) gprm(4)
8 Set gprm(0) &=(and) 63
9 if ( gprm(0) != 0 ) then { Goto line 11 }
10 Set gprm(0) =(mov) 1
11 Set gprm(0) &=(and) 63
12 Set gprm(0) *=(mul) 1024
13 NOP
14 Set gprm(3) =(mov) 4
15 (SetHL_BTN) Set Highlighted Button =(mov) gprm(0)
16 Set gprm(1) =(mov) 0
17 Set gprm(4) &=(and) 32768
18 if ( gprm(4) == 32768 ) then { LinkCN Cell 2 }
********** post commands:
1 Set gprm(4) =(mov) 1
2 LinkPGCN PGC 11
********** cell commands:

EDITED COMMANDS FOR EXTRA BUTTON - PGC 11 - 8 BUTTONS
********** pre commands:
1 NOP
2 NOP
3 NOP
4 NOP
5 NOP
6 Set gprm(6) =(mov) 160
7 Set gprm(0) =(mov) gprm(4)
8 Set gprm(0) &=(and) 63
9 if ( gprm(0) != 0 ) then { Goto line 11 }
10 Set gprm(0) =(mov) 1
11 Set gprm(0) &=(and) 63
12 Set gprm(0) *=(mul) 1024
13 NOP
14 Set gprm(3) =(mov) 5
15 (SetHL_BTN) Set Highlighted Button =(mov) gprm(0)
16 Set gprm(1) =(mov) 0
********** post commands:
1 Set gprm(3) =(mov) 0
2 Set gprm(0) =(mov) sprm(8:Highlighted button number)
3 Set gprm(0) /=(div) 1024
4 if ( gprm(0) != 1 ) then { Goto line 8 }
5 (SetSTN) Set Audio stream = 0
6 Set gprm(4) =(mov) 4
7 LinkPGCN PGC 11
8 if ( gprm(0) != 2 ) then { Goto line 12 }
9 (SetSTN) Set Audio stream = 1
10 Set gprm(4) =(mov) 4
11 LinkPGCN PGC 11
12 if ( gprm(0) != 3 ) then { Goto line 16 }
13 (SetSTN) Set Audio stream = 2
14 Set gprm(4) =(mov) 4
15 LinkPGCN PGC 11
16 if ( gprm(0) != 4 ) then { Goto line 20 }
17 (SetSTN) Set Sub-picture stream = 0, on
18 Set gprm(4) =(mov) 7
19 LinkPGCN PGC 11
20 if ( gprm(0) != 5 ) then { Goto line 24 }
21 (SetSTN) Set Sub-picture stream = 1, on
22 Set gprm(4) =(mov) 7
23 LinkPGCN PGC 11
24 if ( gprm(0) != 6 ) then { Goto line 28 }
25 (SetSTN) Set Sub-picture stream = 0, off
26 Set gprm(4) =(mov) 7
27 LinkPGCN PGC 11
28 if ( gprm(0) != 7 ) then { Goto line 32 }
29 Set gprm(3) =(mov) 257
30 (JumpSS) Jump to VMGM PGC 2
31 NOP
32 if ( gprm(0) != 8 ) then { Goto line 36 }
33 Set gprm(4) =(mov) 4
34 LinkPGCN PGC 8
35 NOP
36 NOP
********** cell commands:
1 LinkTopCell


INFO:

BUTTON 1: 1st audio -->BUTTON 4 if pressed.
BUTTON 2: 2nd audio -->BUTTON 4 if pressed.
BUTTON 3: 3rd audio -->BUTTON 4 if pressed.
BUTTON 4: 1st subtitles -->BUTTON 7 if pressed.
BUTTON 5: 2nd subtitles -->BUTTON 7 if pressed.
BUTTON 6: Subtitles off -->BUTTON 7 if pressed.
BUTTON 7: Resume movie
BUTTON 8: Main menu

The same as above, except when I click on the BUTTON 1, 2 or 3, the highlight will be ON on the 1st button. --> IT SHOULD HIGHLIGHT THE BUTTON 4 (1st subtitles)!

The same goes for BUTTON 3,4,5. If I click on one of them, it will highlight the BUTTON 1 --> IT SHOULD HIGHLIGHT THE BUTTON 7!

The problem only occurs in the transition menu (PGC 10). When the PGC 10 ended, it will goes to PGC 11 - everything is working on this PGC.

Brief:
What I want to do is to have the same commands executed (with the extra button added) in my modified menu as in the original one.

Can anyone help me to solve this puzzle?

Thanks.

goonix
23rd July 2007, 19:04
Hi jamewoong!

In PGC11 the highlighted button depends on gprm(4).
If you press a button in PGC11, gprm(4) is set to 4 or 7 and one of these buttons get highlighted when PGC11 starts over.

If PGC10 is played without pressing a button, gprm(4) is set to 1 (see post commands) and button 1 gets highlighted.

So it depends on the button commands of PGC10 what will happen.

goonix

jamewoong
24th July 2007, 01:03
Hi jamewoong!

In PGC11 the highlighted button depends on gprm(4).
If you press a button in PGC11, gprm(4) is set to 4 or 7 and one of these buttons get highlighted when PGC11 starts over.

If PGC10 is played without pressing a button, gprm(4) is set to 1 (see post commands) and button 1 gets highlighted.

So it depends on the button commands of PGC10 what will happen.

goonix
Yes, this is from my EDITED MENU. However, if you check the ORIGINAL MENU:

--> If PGC10 is played without pressing a button, gprm(4) is set to 1 and button 3 (1st subtitles) gets highlighted after pressing BUTTON 1 or 2. If we choose to press BUTTON 3, 4, 5, then BUTTON 6 (Resume movie) will be highlighted.

In my EDITED MENU, it doesn't matter what button you press, it will highlight the BUTTON 1!

I want it to do the same thing as the original menu:

1st highlighted --> button 1 --> PASS
Pressing button 1,2,3 (audio commands) --> WILL HIGHLIGHT BUTTON 4 (1st subtitles) -->NOT PASS

Pressing button 4,5,6 (substitles commands) --> WILL HIGHLIGHT BUTTON 7 (resume movie) -->NOT PASS

Well, it's hard to explain in a way... You should test it with the menu below and you'll see what I mean...

HERE'S THE ORIGINAL MENU:
http://download.yousendit.com/6AD289366A53B678

HERE'S MY EDITED MENU:
http://download.yousendit.com/5B8BE97955D2122E

NOTE:
PGC 8-12 --> MAIN_MENU (STABLE)
PGC 9-13 --> CHAPTER_MOTION (BLANKED)
PGC 10-14 --> SETUP_MENU WITH TRANSITION
PGC 11-15 --> SETUP_MENU (STABLE)

STABLE = NO TRANSITION.

Try to click on the BUTTON 1, 2 (audio) of the SETUP MENU (3rd BUTTON of MAIN MENU) from the ORIGINAL.
Now, try to click on the BUTTON 3,4 (subtitles) of the SETUP MENU (3rd BUTTON of MAIN MENU) from the ORIGINAL.

What do you notice?

Now, do the same thing over my EDITED MENU (1 new button added, so number are followed, but different from original), but this time, click on BUTTON 1, 2 or 3 instead; and you'll see that my menu is not working as the ORIGINAL one.

Try it over BUTTON 4, 5, 6 (subtitles)...

What do you notice?

Well, there's a commands in my menu that need ro be edited, but I don't know which one...

Anyway, thanks for helping.

r0lZ
24th July 2007, 09:23
Replace the two post-commands of PGC 10 by all post-commands of PGC 11.

Another thng:
Take care! I have noticed that the "Return to Main Menu" button leads to a dead end. PGC 8 is repeated endlessly. But maybe it's because you have blanked it to reduce the size of the archive?

jamewoong
24th July 2007, 12:32
Replace the two post-commands of PGC 10 by all post-commands of PGC 11.

Another thng:
Take care! I have noticed that the "Return to Main Menu" button leads to a dead end. PGC 8 is repeated endlessly. But maybe it's because you have blanked it to reduce the size of the archive?
You're right. Sorry if I forget to mention that. But, you can extract them from the original menu and replace it to the modified one. That's why I blank it out from the edited menu to save bandwidth for you guys...

About your commands. It is working, but is there any other way to make it just by edited a command code? I want to keep it as original as possible.

How come the original menu doesn't need the post-commands you provide and it still working?

In the original menu, we choose a button to click, then it is recorded into the memory, then it will jump to PGC 11 with the proper highlight button:

Button 1, 2 --> highlight button 3
Button 3, 4, 5 --> highlight button 6

This is what I'm looking for!

But, anyway, thanks for the help! :)

r0lZ
24th July 2007, 13:28
In the original menu, we choose a button to click, then it is recorded into the memory, then it will jump to PGC 11 with the proper highlight button: ...That's not true. All original buttons commands of PGCs 10 and 11 are links to PGC 17, where, of course, exactly the same commands are executed, regardless of the source PGC. From that PGC 17, some commands jump then back to PGC 11.

How come the original menu doesn't need the post-commands you provide and it still working?I don't know why you have changed the button commands of PGCs 10 and 11 to LinkTailPGC, and copied the commands of PGC 17 in the post commands area of PGC 11 ONLY, but it's obviously your mistake. You should either restore the original button commands and modify PGC 17 to suit your needs, or, if you want to skip PGC 17 (why?) you have to copy the commands in PGC 10 (as recommended in my prev post) and PGC 11 (you did it already.)

I want to keep it as original as possible.Why? You have already made very important changes, as explained above.