View Full Version : pgcedit & strange acting dvd
blake3
21st April 2013, 21:56
i posted this over at videohelp b4 i realized pgcedit was still active here. wasn't sure as it hadn't been updated in a few years.
i been playing with pgcedit & following one of the how-to guides to remove warnings/logos from beginning of dvds.
been successful with a couple of them but run into a strange problem with one of my 24 disks.
these dvds have all been backed up to my hard drive using anydvd.
following the usual procedure with pgcedit, it gets into a neverending oscillating loop between 'pre commands:' and '1 LinkPGCN PGC 10'.
playback symtoms are strange with the unedited copy of this disk:
burned to dvd & played in my my stand alone player it plays fine but goes thru the usual 2 min of warnings & logos im trying to get rid of.
played on my computer with powerdvd it sez 'wrong region code' & stops.
played on my computer with vlc it does just what im trying to accomplish, skips all the warnings & goes straight to the episode menu.
any dvd experts have any ideas in this?
--------------------
Yeah that’s what ive been doing following this guide:
http://jean.laroche.free.fr/SkippingStuff0.4.3.1/index.html
it worked great til I got to this 24 disk, I start the trace, get to the 1st black screen,delete it, goto ‘next pb’ & it gets stuck in this never ending loop as described above, going back & forth between the 'pre commands:' & the line below it.
i should add ive just started messing around with this & dont know that much about the dvd details tho ive made & burned a lot of them usually using anydvd, clonedvd2 & videoredo.
--------------------------
ok, ive been looking at this closer trying to follow this:
http://jean.laroche.free.fr/Jumping0.4.3.1/index#MOVIE
did finally find the main menu but now stuck on step 3 in the above guide, when i play the virtual dvd using trace it gets to that pgc10 & loops, yet it plays fine on a reg dvd player.
Regarding the above loop, closer examination shows why:
The pre commands section in vmgm pgc 10 sez: ‘1 (JumpSS) Jump to VMGM PGC 10’
So its telling it to jump to itself.
Now what?
---------------------
one suggestion over there was to just remove the pgc 10 cmd, tho since ive just started using pgcedit im a little hesitant to do that. then again its just a copy on my hard drive, i can always recopy it.
it is strange tho that it plays ok with vlc on computer & standalone player but loops when 'played' in trace mode of pgcedit. tho it does get stuck with wrong region if i try & play it with powerdvd on computer.
blake3
21st April 2013, 22:52
i tried exiting, reloading & running the dvd in trace mode.
that pgc10 does show the wrong region code screen, but no matter what i do i can't get rid of it.
if i kill it, it just goes back & loops. i tried deleting the command & it just stopped there.
blake3
22nd April 2013, 01:00
Using trace I found the pgc where it was telling it to jump to the looping pgc & poking around in edit mode found the jump to title menu bit, saved & now it goes right to the title menu.
Not bad considering I dont know what the hell im doing.
Still, the user guide didn’t work like it did for the 1st 2 disks. Seems the region code bit threw it a curve.
I looked at the 1st two disks & didn’t see anything about region code.
I thought I had it, but burned to dvd & played on my stand alone player it still goes thru the intro stuff. but not when played on computer!
Ill reburn it & maybe try going thru the user guide with the edited pgc version
ok, got another screwy problem. when its burned to dvd using clonedvd2, the intro stiuff comes back. but playing the files used to burn the dvd on the computer, it jumps right to the menu.
Ill see if I can burn it with imgburn.
same result with imgburn, both it & clonedvd add an empty audio subdir & the dvd player runs thru all the intro screens that it skips if i play the same files on the computer with powerdvd or vlc.
im 90% sure its because of all this region code, parental control crap im seeing in there but its hard to get rid of.
r0lZ
22nd April 2013, 08:25
It is difficult to understand what's happening without the DVD, but the infinite loop at PGC 10 is probably normal. Your original DVD checks the region code somewhere, and then, if it is NOT correct, it jumps to PGC 10, where the "wrong region" screen appears, and the DVD stops playing, or loops for ever to force you to eject it.
There is a simple method to change the command that checks the region code so that it will always "think" that the region code is correct. Usually, the decrypter program (or, in your case, AnyDVD) should patch that command automatically, but perhaps it missed it. Anyway, use Info -> SPRM, and see if SPRM 20 "Player region code" is used somewhere in the DVD. If it's the case, click on the button in the right column (with the number of occurrences) to search the command(s) that uses SPRM 20. Click the command to open it in the main window, and close the search windows. Double-click the command to edit it, and change the SPRM 20 to a constant value. The value to use should be the region code of the DVD (not your region). For example, if your DVD is compatible with region 1, and the command is if ( gprm(0) == sprm(20:Player region code) ) then { Goto line 4 }, you should replace it with if ( gprm(0) == 1 ) then { Goto line 4 }. Similarly, if the command is Set gprm(3) =(mov) sprm(20:Player region code), replace it with Set gprm(3) =(mov) 1. Repeat for all occurrences of SPRM 20 in the DVD. Test with the trace.
If there is no occurrences of SPRM 20 in the DVD, that means that the decrypter (AnyDVD) has replaced the commands automatically. But if the DVD does not work as expected, that may indicate that it did its job badly. You'll have to copy the DVD again with a better decrypter program, or use the following method to try to fix the problem:
To skip the region code check and follow the "normal route", you have to locate the command that jumps to PGC 10. It's easy: right-click on PGC 10 in the left pane, and select "Go to calling command". You should see a window with at least one button with a command. (If there are several commands, you're not lucky, and you may have to repeat the following steps several times.) Click on the button with the command to open the PGC with that command. In that PGC, the command that jumps to PGC 10 should be already selected. I can't explain exactly what to do without seeing the PGC, but it should contain at least two jumps (or links): the jump to PGC 10, and another jump to another PGC, or to a menu or Title. Simply replace the target of the jump to PGC 10 with the target of the other command. Again, test with the trace. (If you can't do it, use Info -> PGC, copy the content of the window, and paste it here. I'll try to help.)
The two guides you've used to jump to the movie are good, but they explain how to do the modifications manually. PgcEdit has a function to do that more easily. It's PGC -> Jump to PGC upon dvd insert. There is a good guide here (http://www.digital-digest.com/~blutach/Jump2PGC/Jump2PGC_guide.html). But note that I don't think the problem comes from your way to jump to the menu or movie. It is probably caused by a bad handling of the region code, as I've explained above.
Do not use VLC or PowerDVD to test: both are not really DVD-Video compliant. I prefer MPC-HC or The KMPlayer. Or just use the PgcEdit trace. Also, of course, to test a DVD on your PC, you must disable AnyDVD, as it modifies the navigation commands of the DVD on the fly. And I don't like to use it to copy the DVDs. It changes many things in the navigation commands, and often it introduces navigation errors. Try DVDFab HD Decrypter (http://www.dvdfab.com/hd-decrypter.htm) (without AnyDVD running, of course). DVDFab is not free, but the decrypter is free.
Anyway, the program you use to burn the DVD is probably NOT responsible of the problem. It should burn the DVD without modification. (Adding AUDIO_TS is normal: that empty folder is required by the DVD-Video standard.) Anyway, I highly recommend to use ImgBurn to burn the DVD-Videos. It is bug free and really powerful.
Good luck!
Ghitulescu
22nd April 2013, 15:02
Robotically applying a guide will lead anyone sometimes to a point where no immediate solution is available. To avoid this, that one should learn a bit of how the things works.
r0lZ is right, this behaviour indicates a wrongly patched DVD region code. I believe this is also why PowerDVD loops but vlc not, as PowerDVD is set to obey a region code, while vlc has probably code 0 (all regions).
While r0lZ is technically correct, I would simply delete the lines with conditional jumps based on SPRM 20, in my experience these jumps went always to an unique PGC (or identical PGCs) where the playback loops. Afterwards, a Delete uncalled PGCs will remove them as well.
r0lZ
22nd April 2013, 15:20
Hum, simply deleting the jumps to the "dead end" PGC may work if they are conditional jumps, but that will not work in some cases, for example when the conditional jump goes to the "normal PGC" and the following, unconditional jump goes to the dead end. IMO, it is more prudent to replace the jumps to the dead end with jumps to the normal PGC. You can't break the nav that way.
I agree that vlc may be region free, and that can explain its behaviour.
Ghitulescu
22nd April 2013, 16:36
I do not dispute that there might be DVDs that use the "reverse logic" I just never met one.
blake3
22nd April 2013, 21:22
thanks for the detailed response & info.
just to clarify, these dvds were backed up to hard drive a few years ago, at which time i believe i was using dvd43 & 1clickdvdcopy, cant really remember. they are one of the few disks i have on hard drive with this region code hassle.
the region code hasn't really been a problem til i started trying to get rid of the 1/2 dozen warning/logo screens at the start of the disks. as i say above, it worked fine for the 1st 2 disks i tried (not 24 disks) until i got to this one.
ill try your suggestions re sprm20 & if that works see if i can then delete all the warning stuff.
odd thing is, my dvd player (toshiba dr560ku recorder/player) plays these disks fine with no mention of region codes, just have to sit thru all the warnings. i dont recall setting it region free, maybe it comes that way. i did try mpc-hc & it does same thing as powerdvd, stops with wrong region code error.
thanks for the tips, ill try the sprm 20 stuff now, info found 5 instances.
there were 6 jumps to pgc 10 below is the 1st one:
VMGM , LU 1 (en) , 9 (dummy) - Chapters: n/a, Programs: 0, Cells: 0
********** pre commands:
1 Set gprm(0) =(mov) sprm(20:Player region code)
2 Set gprm(0) &=(and) 255
3 if ( gprm(0) == 1 ) then { LinkPGCN PGC 11 }
4 (JumpSS) Jump to VMGM PGC 10
********** post commands:
********** cell commands:
Playback time: 00:00:00.00 (at 30 fps)
PG Playback mode: sequential
PUOs: 33554415 (0x01FFFFEF)
- Time play or search (0x00000001)
- PTT play or search (0x00000002)
- Title play (0x00000004)
- Stop (0x00000008)
- Time or PTT search (0x00000020)
- TopPG or PrevPG search (0x00000040)
- NextPG search (0x00000080)
- Forward scan (0x00000100)
- Backward scan (0x00000200)
- Menu call - Title (0x00000400)
- Menu call - Root (0x00000800)
- Menu call - Subpicture (0x00001000)
- Menu call - Audio (0x00002000)
- Menu call - Angle (0x00004000)
- Menu call - PTT (0x00008000)
- Resume (0x00010000)
- Button select or activate (0x00020000)
- Still off (0x00040000)
- Pause on (0x00080000)
- Audio stream change (0x00100000)
- Subpicture stream change (0x00200000)
- Angle change (0x00400000)
- Karaoke audio mix change (0x00800000)
- Video presentation mode change (0x01000000)
NextPGCN: 0
PrevPGCN: 0
GoUpPGCN: 0
PGC Still Time: 0
----------------------------------
and this is pgc 10:
VMGM , LU 1 (en) , 10 (0:00) - Chapters: n/a, Programs: 1, Cells: 1
********** pre commands:
********** post commands:
1 (JumpSS) Jump to VMGM PGC 10
********** cell commands:
********** menu buttons commands:
Playback time: 00:00:00.15 (at 30 fps)
PG Playback mode: sequential
PUOs: 33554415 (0x01FFFFEF)
- Time play or search (0x00000001)
- PTT play or search (0x00000002)
- Title play (0x00000004)
- Stop (0x00000008)
- Time or PTT search (0x00000020)
- TopPG or PrevPG search (0x00000040)
- NextPG search (0x00000080)
- Forward scan (0x00000100)
- Backward scan (0x00000200)
- Menu call - Title (0x00000400)
- Menu call - Root (0x00000800)
- Menu call - Subpicture (0x00001000)
- Menu call - Audio (0x00002000)
- Menu call - Angle (0x00004000)
- Menu call - PTT (0x00008000)
- Resume (0x00010000)
- Button select or activate (0x00020000)
- Still off (0x00040000)
- Pause on (0x00080000)
- Audio stream change (0x00100000)
- Subpicture stream change (0x00200000)
- Angle change (0x00400000)
- Karaoke audio mix change (0x00800000)
- Video presentation mode change (0x01000000)
NextPGCN: 0
PrevPGCN: 0
GoUpPGCN: 0
PGC Still Time: 0
But- Prog. Cell Type Seam- Ang VOBU Cell Cell Playback End Entry First Last Last VOB Cell
tons Flags less Still Still Cmd. Time Time VOBU ILVU VOBU VOBU ID ID
Joint Time # sector End Start End
0 1 1 2 no - no 255 0 00:00:00.15 00:00:00.15 0 0 0 109 1 1
blake3
22nd April 2013, 22:03
hey r0IZ, followed your steps re sprm20 & it appears to have worked! had to stare at the screen a few minutes b4 i figured out how to edit but managed to get 5 instances of sprm20 down to 0.
the dvd now plays in mpc-hc & powerdvd just like it originally played in my dvd player (no region code but warning screens). tho i should probably burn it. last time i thought i had a fix, as soon as i put it on dvd it went back to acting like the pre-edit condition.
next step ill see if can can remove the warnings following the guide like i did the the other disks.
thanks
r0lZ
22nd April 2013, 22:32
I'm glad it worked. Thanks for the confirmation.
blake3
22nd April 2013, 22:36
r0IZ:
tried to make a donation.
theres no box for entering the state & it complains cause i haven't entered a state.
reminds me of this dvd im working on.
r0lZ
22nd April 2013, 22:55
No state? In the paypal page? Honestly, I don't know how it works. It's paypal stuff, and since I live in Belgium, I don't need to specify a state when I pay with paypal. Thanks anyway for your intention to donate. :-)
Ghitulescu
23rd April 2013, 10:04
I'll try your suggestions re sprm20 & if that works see if i can then delete all the warning stuff.
If you use the r0lZ approach you can't delete any warning stuff, as it's still referenced. You may want to blank it instead, to gain some space.
VMGM , LU 1 (en) , 9 (dummy) - Chapters: n/a, Programs: 0, Cells: 0
********** pre commands:
1 Set gprm(0) =(mov) sprm(20:Player region code)
2 Set gprm(0) &=(and) 255
3 if ( gprm(0) == 1 ) then { LinkPGCN PGC 11 }
4 (JumpSS) Jump to VMGM PGC 10
********** post commands:
********** cell commands:
and this is pgc 10:
VMGM , LU 1 (en) , 10 (0:00) - Chapters: n/a, Programs: 1, Cells: 1
********** pre commands:
********** post commands:
1 (JumpSS) Jump to VMGM PGC 10
********** cell commands:
********** menu buttons commands:
So, the warning must be in PGC 10.
Just change the commands into (command 3 simply has to have the condition unchecked - double click the command and remove the check before the If)
1 deleted
2 deleted
3 LinkPGCN PGC 11
4 deleted
Actually, it suffices to have the condition unchecked (commands 1, 2 and 4 may stay as they are - command 4 must be removed, by hand or automatically, if you want to delete the warning completely, and this has to be done for each of the 5 instances), maybe the country code or GPRM 0 is used to do something else elsewhere, like a customised menu.
r0lZ
23rd April 2013, 10:56
Just change the commands into (command 3 simply has to have the condition unchecked - double click the command and remove the check before the If)
1 deleted
2 deleted
3 LinkPGCN PGC 11
4 deleted
Actually, it suffices to have the condition unchecked (commands 1, 2 and 4 may stay as they are - command 4 must be removed, by hand or automatically, if you want to delete the warning completely, and this has to be done for each of the 5 instances), maybe the country code or GPRM 0 is used to do something else elsewhere, like a customised menu.
I agree that your method should work in this case, but I've tried to explain how to do it with a method compatible with all situations. Also, I did not know the content of PGC 9.
With my method, it is only necessary to change the first command:
1 Set gprm(0) =(mov) sprm(20:Player region code)
should be changed to:
1 Set gprm(0) =(mov) 1
And, of course, the condition in line 3 will always be true, and the link to PGC 11 will always be executed.
Your method is more clean as it removes the unnecessary commands and conditions, but it is more difficult to understand and apply.
r0lZ
23rd April 2013, 11:02
If you use the r0lZ approach you can't delete any warning stuff, as it's still referenced. You may want to blank it instead, to gain some space.
Right. Usually, I blank everything that is not necessary to regain the disc space, then I apply the Jump to PGC upon DVD insert anyway, just to speed up the startup of the disc, and go as fast as possible to the menu (or main movie).
Of course, when the original DVD is a single layer, or if you burn the modified DVD to a dual-layer anyway, you don't need to blank the useless clips, as disc space is not a problem.
Ghitulescu
23rd April 2013, 13:12
it is more difficult to understand and apply.
True, I clean up most DVDs up to the last bit. This way the navigation is simpler to watch and debug, and the DVD also poses less problems to the DVD player, whichever it may be (DVDplayers are also not bug-free). Probably a reminiscence of my "assembler code" times.
Anyway, a modern ripper should know how to handle this region code automatically.
r0lZ
23rd April 2013, 13:54
I agree. Most decrypters do it. BTW, I forgot to say that PgcEdit has also the option "DVD -> Region code" to remove the region code, with an option to search for SPRM 20 in the whole DVD (but it doesn't fix the commands automatically).
I miss also the good old Commodore-64 time, when it was necessary to store boolean flags in single bits to save memory! Now that GBs are available, programming is not so funny any more! ;-)
blake3
23rd April 2013, 23:10
i can almost understand what ghitulescu is saying, ill study it & maybe try it on a copy.
that said, after taking care of the sprm20 stuff per r0IZ's instructions, i was able to follow the guide to remove (bypass?) the warnings no problem.
burned & tested a couple dvd's in my player & they go right to the menu, tho they whirr around for 5 seconds or so after they load.
ill also try the jump to pgc method in the other guide r0IZ mentioned.
i dont know how i got these dvd's on my hard drive. im thinking dvd43 was the culprit. it was the 1st decryptor i tried. i noticed there is no empty audio sub dir which sez whatever i used to copy was not following dvd standards so maybe no surprise the region code stuff is in there. funny my toshiba dvd player ignores it.
good program r0IZ. bit of a learning curve tho.
r0lZ
24th April 2013, 08:22
In fact, what Ghitulescu has explained is easy to understand if you realize that PGC 9 does only one thing: it checks if the region code of the DVD matches the region code of the player (stored in SPRM(20)), and if it's the case, it continues normally, or otherwise it jumps to the dead end at PGC 10.
1 Set gprm(0) =(mov) sprm(20:Player region code)
2 Set gprm(0) &=(and) 255
3 if ( gprm(0) == 1 ) then { LinkPGCN PGC 11 }
4 (JumpSS) Jump to VMGM PGC 10
Line 1 copies the region code in GPRM(0). It's necessary, as you cannot compare a SPRM with a value. You can only compare a GPRM.
IMO, line 2 is not necessary, but it doesn't hurt. It ensures that only the region code is kept in GPRM(0). The other bits are forced to 0. (They should be 0 anyway, but perhaps some players store a bad value in SPRM(20).) Anyway, now, GPRM(0) contains for sure the region code of the player.
Line 3 compare GPRM 0 with the region code of the DVD (region 1 in this case) and if they are identical, the navigation continues normally (at PGC 11).
Otherwise, the navigation continues with the next line, that jumps to the dead end, at PGC 10.
So, to completely bypass that stuff, it is sufficient to replace everything with a direct link to PGC 11. The region code is not tested any more, and there is only one jump, to continue the nav normally.
In the other hand, my method consists in replacing the region code of the player, SPRM(20), with the region code of the DVD (in this case, the constant value 1). Since 1 equals 1, the condition in line 3 is always true, and the nav continues therefore always with PGC 11.
BTW, if you use the trace to test the DVD, you should configure it correctly (with Trace -> Virtual Player Setup). There is an option to configure the region code of the virtual player. If you set it to 1 (the RC of your DVD) and you play the unmodified DVD, you'll see that it will play the movie. But if you select any other zone, you'll see that it will go to the dead end. You'll note also that it is recommended to select region 8 (a special region code for airports, not often used in commercial DVDs) to test the DVD, as if the region code has not been removed, when PgcEdit will begin to trace, it will display a warning. And, of course, if it plays a PGC similar to PGC 9, it will jump to the dead end. With that configuration, you can be assured that the trace will show you what is supposed to happen if the DVD is played on a player that has not the right region code, and you can modify it to completely dezone it. In the other hand, if you configure it to, say, region 2, and the DVD you are processing is, per chance, also for zone 2, you will not detect that it is still region protected, because it will play just fine, and you will burn a DVD that will not play everywhere.
DVD43 is similar to AnyDVD (but iirc, it is free, but it is now discontinued). That means that it patches the DVD on the fly, like AnyDVD. For that reason, I do not recommend to use that kind of tools to decrypt a DVD. You should prefer a standalone decrypter. (My preferred one is still the good old DVD Decrypter, but it cannot handle the recent protections, and for that reason I can't recommend it. Currently, I think the best one is DVDFab HD Decrypter.)
Note that AUDIO_TS is empty, and most decrypters do NOT copy it on hard disc, as it is useless. It's the responsibility of the DVD burner application to create it. But note also that although it is required by the DVD-Video specs, most players ignore it, and even some commercial DVDs do not have that folder.
PgcEdit is not easy to master, that's right. I wrote it to offer as many possibilities as possible. There are enough stupid one-click DVD copy programs. I wanted something for programmers and power users. The drawback is that you have to learn the DVD video structure and VM commands to use it efficiently. It's life!
Ghitulescu
24th April 2013, 14:42
In fact, what Ghitulescu has explained is easy to understand if you realize that PGC 9 does only one thing: it checks if the region code of the DVD matches the region code of the player (stored in SPRM(20)), and if it's the case, it continues normally, or otherwise it jumps to the dead end at PGC 10.
1 Set gprm(0) =(mov) sprm(20:Player region code)
2 Set gprm(0) &=(and) 255
3 if ( gprm(0) == 1 ) then { LinkPGCN PGC 11 }
4 (JumpSS) Jump to VMGM PGC 10
Line 1 copies the region code in GPRM(0). It's necessary, as you cannot compare a SPRM with a value. You can only compare a GPRM.
IMO, line 2 is not necessary, but it doesn't hurt. It ensures that only the region code is kept in GPRM(0). The other bits are forced to 0. (They should be 0 anyway, but perhaps some players store a bad value in SPRM(20).) Anyway, now, GPRM(0) contains for sure the region code of the player.
Line 3 compare GPRM 0 with the region code of the DVD (region 1 in this case) and if they are identical, the navigation continues normally (at PGC 11).
Otherwise, the navigation continues with the next line, that jumps to the dead end, at PGC 10.
So, to completely bypass that stuff, it is sufficient to replace everything with a direct link to PGC 11. The region code is not tested any more, and there is only one jump, to continue the nav normally.A perfect explanation.
However, I do (for myself) a little bit differently. After I load the DVD I check all the PCGs to see what they contain. Maybe I do a trace, depends on its complexity. In the case of RCE, I simply find which calls go to it, and remove those altogether.
The warnings are a different beast, they can't be so easily unreferenced, as they usually contain code used afterwards (most times the DVD will loop if bypassed like above).
DVD43 is similar to AnyDVD (but iirc, it is free, but it is now discontinued). That means that it patches the DVD on the fly, like AnyDVD. For that reason, I do not recommend to use that kind of tools to decrypt a DVD. You should prefer a standalone decrypter. (My preferred one is still the good old DVD Decrypter, but it cannot handle the recent protections, and for that reason I can't recommend it. Currently, I think the best one is DVDFab HD Decrypter.)
Actually it is possible to use only free tools to decrypt any past and future DVD, regardless of its protections (because the DVD is a flawed concept). I did use my method on several Disney and Sony DVDs, but I'll wait a bit until I'll make it public, to see if I'll find a bitchy DVD. It doesn't involve DVDdecrypter.
r0lZ
24th April 2013, 15:23
Personally, I use DVD Decrypter for all DVDs, and when it fails, I do a PSL file myself. That requires some work, but at least, I understand what I get, I can control exactly what the decrypter does, and I'm sure it has not made mistakes or trashed the navigation. Then, I remove the remnants of the protection with PgcEdit.
I suppose that it should be possible to do it with a similar method, perhaps with a command-line decrypter. But I like and know DVD Decrypter well, so I'll continue to use it. However, as I said, I can't recommend it to newbies, as creating the PSL file manually is complex, and difficult to explain.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.