Jumping straight to the main menu

or the movie with PgcEdit

_______________________________________________________

Last updated: 11/9/2004 by Jeanl.

Thanks to everybody in the forums for their help, to 2COOL
for his guides that inspired this one, and r0lZ for coding PgcEdit!
If you're having problems with this guide, see this or post here!
_______________________________________________________

Goal: In this guide, you will learn how you can setup your DVD to jump straight to the main movie (or to the main menu) from the first-play PGC (i.e. as soon as the DVD is inserted in the player), bypassing any video (FBI warning, previews etc) and any undesirable menu in between! This can be very useful in various cases:


Note: 2COOL wrote a pretty very nice guide for bypassing a single menu (for example an aspect-ratio menu or a language menu). The technique he used is very different than what's described here and the results are not the same. I'll discuss the differences in the end.

Basic Idea: PgcEdit has a great function called "Trace" which you can use to step through the commands and the videos in your DVD pretty much the way a settop DVD player would, while watching everything that's going on (except the actual video, and that's too bad). If you're familiar with programming, this is the equivalent of putting a breakpoint at the start of your program, and single-stepping through each instruction, enabling/disabling breakpoints etc.
We're going to use this function to play your DVD from the start as we would on a regular player, pushing the right buttons if menus pop up, until we get to the movie. At that point, we will take a "picture" of the values in the player's registers (gprm and sprm) and we'll add commands to replicate that picture in the pre-command area of the appropriate PGC. Finally, we'll put a jump command in the First-Play PGC to get us straight to this PGC so the DVD will start with the main menu (or the movie), with exactly the setup we chose.
Does it really have to be that complicated? Well yes, see why here.

_______________________________________________________
 

A - Jumping straight to the movie
If you want to jump to the main menu instead of the movie, go there.

Quick summary

If you're already familiar with PgcEdit and you don't need all the details: here's a quick summary:
  1. Open the DVD in PgcEdit, enable the trace and find an unused GPRM.
  2. Go to the movie title and put a "playback breakpoint" there.
  3. Start the trace from the top, when you get to menus, click the right buttons to take you to the movie
  4. When you hit the breakpoint. Add the following commands at the top of the pre-commands:

  5. [00 B1 00 0E 00 00 00 04]   1  if ( gprm(14) != 0 ) then { Goto line 4 } 
    [71 00 00 0E 00 01 00 00]   2  Set gprm(14) =(mov) 1
    [00 02 00 00 00 00 00 00]   3  Break
    [00 00 00 00 00 00 00 00]   4  Nop

    modify them to use your free GPRM (mine was 14). I have shortcuts here for various GPRM.
  6. Then in the Trace panel, click the menu "Clipboard/Copy Changed Registers as Commands" and paste them above the "break" above. Make sure you use "Copy Changed Registers as Commands" and not "Copy Used Registers as Commands".
  7. At the top of the First-Play PGC, add

  8. [00 B1 00 0E 00 00 00 03]   1  if ( gprm(14) != 0 ) then { Goto line 3 }
    [30 02 00 00 00 02 00 00]   2  (JumpTT) Jump to Title 2
    making sure you're using your GPRM and jumping to the right title!
  9. Save and test!


Now if you need the details here they are:

Step 0: Play your DVD in your favorite player

This will give you a chance to see what gets played before you get to the main menu or the movie. If there are menus in between (language menus or aspect ratio menus), take a sheet of paper and make quick drawings of the buttons you'll need to click to select the right language or the right aspect ratio. PgcEdit will not be able to show you the exact buttons, only their shape and placement, which is why we need to do that. Go all the way to the beginning of the movie, and write down its title number (as displayed by the player). This will be useful later on.

Step 1: Open your DVD in PgcEdit and find an unused gprm

 
This will enable the Trace display at the bottom of the window.

 
More info:
If you're not familiar with PgcEdit, what you see on the left is the list of PGC (Program Chains), and on the right the pre, post and cell commands for the selected PGC. Click here if you need to learn about PGC, pre-commands, post-commands and cell commands.
This option makes sure that when you insert commands in the middle of pre or post-commands, the goto are modified so they still point to the same command as before.
Here's what I got:
All the gprms are used except for number 14. That's the one we'll use so write down that number and proceed to the next step. If you can't find an unused gprm, see the note at the end.

 
More info:
GPRMs and SPRMs are registers (memories) that can be used by the DVD program to store information. GPRMs are used by the commands in the various PGC of your DVD, and SPRMs are system registers that store information about the current player setup (for example, which audio track is currently selected). GPRMs are accessible for both reading from and writing into. Only a few SPRMs can be written. There are only 16 GPRMs. To read more about the system registers (SPRMs), you can go here.

Step 2: Put a breakpoint at the movie playback.

You can also see that the PGC is quite long and you could also check that it has a bunch of chapters.
 
 
Note:
If your movies comes in widescreen and fullscreen versions, there will be 2 titles with the same duration (one for the fullscreen version and one for the widescreen version). Make sure you select the one you intend to jump to! 

The PGC will beblue-highlighted to indicate the playback breakpoint.

 
More Info:
A "playback breakpoint" stops the playback after pre-commands have executed and before the actual video playback starts. A "pre/post breakpoint" stops playback at the top of the pre-command area and at the top of the post-command area. 
The reason why we need the former and not the latter is a bit tricky: In some DVDs, you enter the movie PGC twice before playback actually starts. The first time around you jump back outside of the PGC to another one (for example to play the THX bit), then the second time around you go to the movie playback. If we put a breakpoint at the top of the pre-command area, we would hit it the first time, thinking that the movie is about to start. Jumping there from the first-play PGC would still not go straight to the movie PGC! 
By contrast, our breakpoint is at the start of the actual movie playback, so we're pretty sure that this time around the registers are all set the way they need to be for the movie to play.

Step 3: Start the trace!

Now we're going to "play" the DVD in PgcEdit much like a regular DVD playwer would, and click on the appropriate menu buttons to take us to the main movie, with the right aspect-ratio or language menu.
 
As you can see, a new window pops up, with the layout of the menu in the PGC we arrived at. PgcEdit is not able to display the actual menu, but still gives you the button layout, which is usually enough to recognize the button you'll need to push to select what you want to select (here, the aspect ratio), if you can compare with the drawings you made during Step 0. In the present case, I backed up the full-screen version so I'll click on the lower button (button 2) because that's the one that points to that version according to my notes, then on the "Select" button.

 
More info:
You can see the commands associated with each button by letting your mouse hover over each button. If there is a "link" command (a command that jumps to another part of the PGC), the target of the jump will be highlighted if you click on the button.

Step 4: Insert pre-commands in the movie PGC.

The idea is now to insert precommands to reproduce the state of the player (the values in the general purpose registers GPRMs and system registers SPRMs), so that if we jump straight from the first-play PGC to the movie, all the registers will have the correct values. This is essential for the playback to be normal. If we jumped to the movie without setting these registers, more often than not the playback would break. However, we want to set these registers only the first time we jump from the First-Play PGC, because we don't want to override selections we might be doing later-on during playback. This is where we use the free GPRM we found in Step 1.
 
 
This PgcEdit menu automatically creates commands that replicate the current state of all the GPRMs and four important SPRMs that have been changed since the beginning of the playback. These commands are put on the clipboard.

We can then paste them in the pre-commands, above line 3 (the "break" command), by selecting line 3 and pressing Shift-V or "Paste After". You will see a bunch of new commands that set GPRMs and SPRMs:

 
 
The Goto in command 1 should now points to command 18, a "NOP" (no-operation) just above the first command in the original PGC.

 
More info:
As you can see, our new pre-command first test whether GPRM 14 is zero (which would indicate that we just inserted the DVD in the player). 
If GPRM 14 is zero, we set it to 1, and we set the values of a series of GPRMs, SPRM 1,2 and 3 (which control which audio, which subtitle and which angle is selected), and SPRM 8 which holds the last button selected. This exactly replicates the state of the DVD player at the start of the movie playback. Then we call a "break" command which stops the execution of the pre-commands and jumps to the PGC playback. 
A non-zero value for GPRM 14 means that the DVD wasn't just inserted in the player, we're jumping here after some other navigation. In that case we don't want to reset the registers because they could be holding changes that we made (for example, if we selected another audio stream). So we jump to a no-operation then to the line that was our original first pre-command (before we added any). In that case, the pre-commands will be exactly the same as in the original DVD. 

As a note, you can easily select another default audio track or other subtitles by modifying the SetSTN command (or adding one if there are none!)

Step 5: Jump straight from the First-Play PGC.

The First-Play PGC is the first PGC that gets played when the DVD is inserted in the player. We just need to insert a command that will make us jump straight to the movie, and we're done! To do this:
 
 
More Info
These 2 commands will check whether GPRM 14 is zero. If it is, this indicates the DVD was just inserted in the player, and we'll jump straight to the movie PGC where the precommands we added will be executed. As a result, the player will get to the movie with registers corresponding exactly to the setup we selected in step 3, and GPRM 14 will be set to 1. If by any chance playback later on jumped back to the First-Play PGC, the normal set of commands would execute, guaranteeing that the DVD will behave as the original one at this point.

Step 6: Save the DVD, and try it!

Click on the save icon  and open the DVD in a software player. The player should start straight with the movie, with the audio track, the aspect ratio and the subtitles you selected.

Step 7: Sorry but it doesn't work!

Here are a few things you might have done wrong:


B - Jumping straight to the main menu
 

1) The surest solution: go straight to the movie, then jump to the menu.

To jump to the main menu, you can jump to the main movie (as described above) and in Step 4, you can replace the break command (at line 17 in my example) with the following command:

[30 08 00 00 01 83 00 00]  17  (CallSS) Call the VTSM Root menu of the current VTS, resume cell 1.

This will go to the main menu instead of continuing on to the movie. Upon playback, the DVD will behave as if we went through all the steps to go to the movie, then pressed the menu button.
This solution is especially good if you want to bypass additional menus between the main menu and the movie playback (as for example in Monsters Inc where there's an angle menu after you press "Play", before you get to the movie). If you don't want to bypass these menus, then this is not a good solution for you.
 

2) Another solution: go straight to the menu.

This solution is also simple, but will only work if you main menu PGC is one you can jump straight to.
For you to be able to jump to a specific PGC in the VTSM domain from the First-Play PGC, the target PGC has to be either a "title", "root", "angle", "audio", "subpicture" or "chapter" menu (that's imposed by the DVD specs). If it's not one of these then you can't jump straight to it (you might still be able to make it work, but it's more complicated).
Unfortunately, it sometimes happens that the "root" menu PGC is a dummy PGC (with no video) and simply jumps to another PGC that has the actual main menu with the buttons. Here's an example, taken from Monsters Inc (region 1):


As you can see, the root menu for VTST4 (the 16:9 version of the movie) has a 1 frame video associated with it (the duration shows 0:00) and no buttons. The actual main menu is in another VTSM, and is not a root menu, so we couldn't jump straight to it from the First-Play PGC. You might still be able to change it to one of the menu types above ("title", "root", "angle", "audio", "subpicture" or "chapter") but I'm not going to go into that in this guide.
However, if you're lucky, the main menu will indeed be a "root" menu, and you can jump straight to it from the fist-play PGC.
In that case, follow the steps above (for jumping to the movie), applying everything to the menu PGC instead of the movie PGC: set a playback breakpoint in the menu, then trace to it and add the pre-commands. In the First-Play PGC, you'd add the following commands:

[00 B1 00 0E 00 00 00 03]   1  if ( gprm(14) != 0 ) then { Goto line 3 } 
[30 06 00 01 04 83 00 00]   2  (JumpSS) Jump to VTSM 4, Root menu (TTN 1) 
assuming that your root menu is in Video Titleset 4. Upon playback, the DVD will behave as if we went through all the steps to go to the main menu.

3) Note about jumping to the main menu

The difference between the two solutions above is a bit subtle. In the first solution, because you're going to the main menu from the movie, playback will most likely skip the little intro to the menu (if there is one). Most DVDs which have an intro to the main menu usually skip it if you press menu from the movie playback (because it can really get annoying to have to wait for the intro to be done before you can access a setup submenu for example). By contrast, the second solution 2 will not skip this intro, so if you want to preserve this little intro, this would be your preferred solution if you can actually do it.
On the other hand, as mentioned above, if there's another menu after the main menu, the first solution gives you a chance to bypass it, but the second solution does not.

A few notes:

1) Subtle stuff!

  1. Ok, but why does it have to be that complicated? Good question!
    You might have the idea, by now, to simply jump from the First-Play PGC straight to the movie title using this command
    [30 02 00 00 00 02 00 00]   1  (JumpTT) Jump to Title 2
    but forget about all the commands we put in the movie PGC pre-command area to set all the registers. You can definitely try that, but chances are something will go wrong. Most DVDs are authored in a complicated way with jumps back and forth between various areas of the disc. All these jumps are orchestrated by the values in the GPRMs, so if the GPRMs are not set the proper way, the DVD does not play normally (for example, it might decide to go play previews, or jump to the language menu). That's because of all the pre-commands in the movie title PGC. OK then, why not get rid of them? You could certainly try that, but chances are things would get messed up later on, for example if you decide to go to the root menu then come back to the movie!
    To reliably be able to go straight to the movie, you really have to duplicate the state of the player at the start of the movie, and that's what we do in this guide.
  2. Default settings of your player: The technique outlined here will make it so your DVD goes straight to the movie (or the main menu) with the settings you enforced during the procedure above. In other words, if you selected this or that audio track, or subtitles, then the DVD will come up with these by default, no matter what the settings are on your DVD player! In a way, the DVD loses a bit of its "intelligence" (adapting to the defaults that you setup in your DVD player).

2) Help, I screwed up!

Don't panic! Simply click the "restore backup" icon  and click OK when prompted. This will restore the original DVD and you can try again!

3) What if I don't have a free GPRM?

Then you're in trouble! You should probably see if there's one that's used only once (sometimes, GPRMs are set once and then never set or read again!). The menu "Info/Find Unused GPRMs" will tell you how many times each GPRM is used. If you find one, you're good but make sure you delete the line where it was set (so that does not mess up our little scheme!). If you still can't find one, I can't think of a solution that's easy to describe in a guide at this point. Sorry :(
 

Here's a list of the commands you'll need based on which unused gprm you use:

4) I can't get this to work, what's going on?

If you're having problems with this guide, see this or post here and you'll get some help!