View Single Post
Old 15th November 2004, 03:58   #1  |  Link
lamster
Registered User
 
Join Date: Nov 2003
Posts: 299
Jeanl's guide, "Jumping straight to the main menu or the movie with PgcEdit"

Quote:
What if I don't have a free GPRM?

I can't think of a solution that's easy to describe in a guide at this point.
The way I would do it is look at the target PGC (i.e., the VTST PGC if you're going straight to the movie, or the VTSM PGC if you're going straight to a menu), and see if there's a register that gets set before it's used. If so, then I'd use that register, set it to an unlikely value in the first play PGC, and check for that value in the target PGC.

E.g., the Title 1 in Shrek starts out:
Code:
********** pre commands:
[00 A1 00 03 00 0A 00 06]   1  if ( gprm(3) == 10 ) then { Goto line 6 } 
[79 00 00 01 00 03 00 00]   2  Set gprm(1) &=(and) 3 
[41 00 00 81 00 00 00 00]   3  (SetSTN) Set Audio stream = gprm(1) 
[79 00 00 02 00 43 00 00]   4  Set gprm(2) &=(and) 67 
[41 00 00 00 82 00 00 00]   5  (SetSTN) Set Sub-picture stream = gprm(2) 
[71 00 00 07 00 00 00 00]   6  Set gprm(7) =(mov) 0 
[71 00 00 03 00 0A 00 00]   7  Set gprm(3) =(mov) 10 
[51 00 00 00 00 81 00 00]   8  (SetSTN) Set Angle = 1 
[71 00 00 00 00 02 00 00]   9  Set gprm(0) =(mov) 2 
[...]
Note that in line 6, register 7 gets set; that it is not referenced by this PGC before this point; and that there is nothing like a goto or break that would prevent line 6 from being reached. So I'd initialize gprm 7 to, say, hex DEED in the first play PGC:
Code:
[71 00 00 07 DE ED 00 00]   7  Set gprm(7) =(mov) 57069
Then, for your step four, use this register and "magic value" as the test.
Code:
[00 B1 00 07 DE ED 00 04]   1  if ( gprm(7) != 57069 ) then { Goto line 4 }
lamster is offline   Reply With Quote