View Full Version : PgcEdit v0.1
r0lZ
13th June 2004, 15:26
[EDIT: PgcEdit v7.0 has been released. See this thread (http://forum.doom9.org/showthread.php?t=110310).]
I wrote PgcEdit for me, but I finally decided to release it as GPL free software. So it's here.
The main purpose of PgcEdit is to allow an easyer editing of the PGC commands than with IfoEdit... but I have added some functions that I find useful. Just try it to see.
There is a short documentation (in english or french) along with the program, and on my homepage.
Download PgcEdit here (http://home.tiscali.be/debie.roland/pgcedit/).
Have fun!
The current PgcEdit version is discussed here: PgcEdit 0.5 (http://forum.doom9.org/showthread.php?s=&threadid=90960)
Old PgcEdit discussion threads: PgcEdit 0.5.0 beta (http://forum.doom9.org/showthread.php?s=&threadid=89918).
PgcEdit 0.4 (http://forum.doom9.org/showthread.php?s=&threadid=85329).
PgcEdit 0.3 (http://forum.doom9.org/showthread.php?s=&threadid=79853).
PgcEdit 0.2 (http://forum.doom9.org/showthread.php?s=&threadid=78618).
PgcEdit 0.1 (http://forum.doom9.org/showthread.php?s=&threadid=77980).
jorel
13th June 2004, 17:37
hy r0lZ,thanks for PgcEdit, seems very cool! :) the Options/Install menu are great too.
r0lZ, this software is extremely cool, so many really useful features.. could have saved me hours of ifoediting. Big thanks for sharing it with us! I'm sure, this will become a classic soon.
$
r0lZ
14th June 2004, 08:37
Oops! Last minute bug fix: Cut/Paste PGC Color Table was broken. Fixed in v0.1.1, available on my homepage.
Thanks for the feedback, folks!
ac-chan123
14th June 2004, 10:13
@ r0lZ:
Please use filename with version data. Nobody know wich Version can be downloaded.
r0lZ
14th June 2004, 11:03
Originally posted by ac-chan123
@ r0lZ:
Please use filename with version data. Nobody know wich Version can be downloaded.
The version on my site is always the latest. You can see the version number in the version history text file, also on the site.
If I put the version number in the filename, I need to modify the links, and that could not be automated. But I will think about...
burnout
14th June 2004, 15:40
thanx for the app m8, seems very useful and i'm sure i will put it to good use ;)
r0lZ, in case you are interested in enhancement requests... I have one for you :)
How about including a feature to add a menu, i.e. adding a PGC but not replacing existing ones? It kind of works in IfoEdit as you can increase the number of menus within a language unit. However, the newly generated PGC will have some arbitrary attributes one would have to clean up first.
This feature would be useful especially within the VMG domain e.g. to add additional title jumps I can refer to from any titleset or menu PGC.
$
r0lZ
15th June 2004, 10:58
This is the right place (for now) to post enhancement requests, bug reports, feedback and kind words. Thanks in advance! I will probably continue developping PgcEdit, but don't expect a quick evolution of the software: I have a big garden, and, for now, the sun in shining here ;)
Originally posted by $$$
How about including a feature to add a menu, i.e. adding a PGC but not replacing existing ones?
Interesting idea, but not so easy to implement. Of course, it may be possible to create a new blank PGC, but the user will need to rely on IfoEdit to complete the editing.
Maybe in the next release...
dvdnew
15th June 2004, 15:20
I downloaded the windows version, but it doesn't display anything, the process uses 99% CPU.
A wild guess is that it needs a C: drive, my system doesn't have a C: drive, the system drive is H:, can this be the problem?
EDIT: Confirmed, I put a removable drive that Windows find as C: then I can run the program without problems
r0lZ
15th June 2004, 19:11
Strange problem, dvdnew! Difficult to debug because my system drive is C:! And the problem may be caused by Windows, or Tcl/Tk.
Have you already had such a problem with other softwares?
Which version of Windows are you running?
Does PgcEdit still freeze now? (The default paths are saved with the configuration, and this could solve the problem.)
[EDIT]
Don't botter. Bug found and fixed in v0.1.2. Will be soon available.
r0lZ
15th June 2004, 21:52
PgcEdit v0.1.2 is here.
Hi $$$!
New PGC utility: create a blank PGC.
Hi dvdnew!
The problem starting PgcEdit without a C: drive is fixed.
Thanks for your help.
Hi $$$!
New PGC utility: create a blank PGC.How kind of you, r0lZ, thanks so much for your immediate response! I often like to add new titles (like second disc bonus features) to my DVD backups and with this feature the navigational part can now easily be added without messing up the existing VMG logic, great!
Very interesting to see that you also allow to create a new PGC in the title domain. I am just wondering which adjustments in the IFOs would be required to combine this feature with jsoto's AddChapter allowing me to add a custom cell to the newly created PGC. Is there any expert here who would know?
$
[Toff]
16th June 2004, 14:31
I wanted to try PgcEdit but only thing I get is the Console window showing this message : Error sourcing /Tcl/work/PGCEDIT/PgcEdit.tcl: can not find channel named "unable to open key: Le fichier spécifié est introuvable."
I've placed pgcedit.exe in C:\Program Files\PgcEdit
My config : French W2K SP4, Athlon ThunderBird 1Ghz, free space available on HD, logged has administrator.
Any idea of what's going wrong? or anything I could try ?
r0lZ
16th June 2004, 19:28
@[Toff]
Maybe Win2K? I have XP Pro SP1.
One guess: It seems to be a problem with the standalone executable. Indeed, /Tcl/work/PGCEDIT/PgcEdit.tcl is a pseudo directory used internally by the wrapped PgcEdit. I suppose thus that you are using the standalone version (PgcEdit.exe).
It may be useful to test the problem with the source files. You will need to install the PgcEdit sources (just extract them in any directory, keeping the directory structure), and download FreeWrap 5.61 here: http://sourceforge.net/projects/freewrap/
Extract FreeWrap.exe and tclpip84.dll in a directory, and RENAME FreeWrap.exe to, for example, WishRun.exe. (The rename is really needed.) Then, launch PgcEdit.tcl and, when asked which app you want to use to open TCL files, select WishRun.exe.
Maybe this will fix the problem.
Please keep me informed.
[Toff]
16th June 2004, 20:40
I've tried FreeWrap 5.61 but without success.
When I open the tcl source file the console window just hide, but nothing show then, it hang, I need to kill the interpreter to end it.
Though I got it to run by installing the full ActiveTcl and by double-clicking pgcedit.tcl in my explorer.
Strangely it hang the same way if I start wish and load the tcl source file manually.
After putting some debug message, I've narrowed the guilty line :
# Full path is needed for FreeWrap
if {[info exists ::freewrap::progname]} {
set config(apppath) "/Tcl/work/PGCEDIT"
if {$::tcl_platform(platform) == "windows"} {
# !!! IT HANG HERE, ON NEXT LINE !!! <-----------X
source $config(apppath)/lib/winshellext.tcl
}
} else {
set config(apppath) "[file dirname $argv0]"
}
This is when started from wish manually.
EDIT : In fact this last problem is only when i use freewrap as a wish interpreter, using the interpreter from ActiveTcl it works if I make the pgcedit directory the current directory first.
smoof
16th June 2004, 23:00
This is slightly off topic...
Does anyone know of a tool that allows you to single step through the pre/post commands of a PGC? The idea is that you would see each command, press a button and then see what the result of that command is. Sort of like a single stepping through code with a SW debugger.
Using this tool it should then be easy to follow the navigation of DVD startup, menus, etc... I usually edit PGC commands to skip over things I don't want to see and it's usually pretty straight forward. A simple trick is to change all post commands to pre commands. However, I've run into a few DVD's that are much more complex than what I'm used to and have run into trouble trying to bypass stuff. A good example is trying to bypass the comming attractions on Disney DVD's.
I've tried DVDRemake but my older sony standalone player is not happy with whatever that program does when you hide a block (although it plays fine on the computer).
@smoof - Not a tool but a workaround for these annoying stuff you normally want to bypass in the beginning of a DVD. The idea is to capture the state of this kind of DVD at the point you actually want it to be started and then use First Play PGC to create exactly that state. In more detail,
Play your DVD in IfoEdit until you reach the main movie (assuming you want to autoplay it in the future). You can set your desired audio track and subtitle as well.
Expand the IfoEdit "DVD Play" window to display the GP register values and note all down which are not equal to zero.
Now open the DVD in PGCEdit and go to the First-Play PGC. In case you have any conditional commands here it will be more diffult but let's assume there are none.
Replace all precommands with the following,
- set all GP registers to match the values you have noted down
- set preferred audio track and subtitle (if required)
- add a Jump Title to the main movie (the title# displayed in IfoEdit "DVD Play")
Don't forget to save and replay it in IfoEdit to check whether it works. If not, PGCEdit already created a backup directory for you..
If it doesn't work there might be some conflicting pre commands assigned to your main movie title. This can normally be easily "corrected" there.
You can use the following PGCEdit scratchbook I created for that purpose.{* scratchbook}
{71 00 00 00 00 00 00 00} {71 00 00 01 00 00 00 00} {71 00 00 02 00 00 00 00}
{71 00 00 03 00 00 00 00} {71 00 00 04 00 00 00 00} {71 00 00 05 00 00 00 00}
{71 00 00 06 00 00 00 00} {71 00 00 07 00 00 00 00} {71 00 00 08 00 00 00 00}
{71 00 00 09 00 00 00 00} {71 00 00 0A 00 00 00 00} {71 00 00 0B 00 00 00 00}
{71 00 00 0C 00 00 00 00} {71 00 00 0D 00 00 00 00} {71 00 00 0E 00 00 00 00}
{71 00 00 0F 00 00 00 00} {51 00 00 80 80 00 00 00} {30 02 00 00 00 01 00 00}Just copy/paste the above into notepad and save it with .sbk extension, eg. FirstPlay.sbk. Open that scratchbook in PGCEdit, copy/paste these commands to First Play PGC and do the necessary adjustments.
$
smoof
17th June 2004, 05:51
Yeah, that's a good idea. Thanks for posting it.
I still like the single stepping idea because it would be a great tool for learning. I just saw there's a new version of DVDRemake, sounds like it's a possibility that tool may incorporate this kind of functionality in the future. Things have certainly progressed a lot since the "old days".
r0lZ
17th June 2004, 11:01
Originally posted by [Toff]
After putting some debug message, I've narrowed the guilty line :
# Full path is needed for FreeWrap
if {[info exists ::freewrap::progname]} {
set config(apppath) "/Tcl/work/PGCEDIT"
if {$::tcl_platform(platform) == "windows"} {
# !!! IT HANG HERE, ON NEXT LINE !!! <-----------X
source $config(apppath)/lib/winshellext.tcl
}
} else {
set config(apppath) "[file dirname $argv0]"
}
This is when started from wish manually.
I'm not sure to understand you. Do you mean that the "source ..." line is executed when you launch PgcEdit.tcl from wish? It's absolutely abnormal!
The winshellext.tcl file is needed only for the Install menu, which is present only in freeWrapped PgcEdit.exe, because it uses stuff provided by freeWrap but not by Wish.
The first IF line is my way to test if PgcEdit is run as a freeWrapped app or from Wish. Indeed, ::freewrap::progname is a variable automatically created by FreeWrap before it initialize the app. This variable may not exists if PgcEdit is run from Wish, and the IF test must therefore bypass the whole section. If it doesn't, it's really a strange behavior.
EDIT : In fact this last problem is only when i use freewrap as a wish interpreter, using the interpreter from ActiveTcl it works if I make the pgcedit directory the current directory first.
I was editing the PgcEdit code when I see your edit. You're rigth. I need to test if the program is launched interactively, and, in that case, use another way to find the source directory of PgcEdit. Unfortunately, I can't find a practical way to do that. I can however inform the user of the problem and return gracefully. Here is the code section that does just that:
# Full path is needed for FreeWrap
if {$tcl_interactive} {
set config(apppath) [pwd]
if {! [file exists $config(apppath)/lib/main.tcl]} {
puts "Please CD to the PgcEdit directory before launching it."
return 1
}
} else {
if {[info exists ::freewrap::progname]} {
set config(apppath) "/Tcl/work/PGCEDIT"
if {$::tcl_platform(platform) == "windows"} {
source $config(apppath)/lib/winshellext.tcl
}
} else {
set config(apppath) "[file dirname $argv0]"
}
}
But I'm affraid this patch will not fix the first problem you had when PgcEdit is used as a freeWrapped executable.
Last chance try:
Be sure to associate the .TCL files with WishRun.exe, then launch the original PgcEdit by clicking on PgcEdit.tcl. I will be interested in knowing what is happening in this precise case.
Then edit PgcEdit.tcl with the code above, and try again. This must work.
Hint: you may add a "console show" line to open the console.
It may be usefull also to check the original PgcEdit.exe on another computer running Win2K. Is it possible for you?
[Toff]
17th June 2004, 12:54
I'm not sure to understand you. Do you mean that the "source ..." line is executed when you launch PgcEdit.tcl from wish? It's absolutely abnormal!
Yes, using freewrap as a wish interpreter make "[info exists ::freewrap::progname]" to be true.
I think I've find where the real problem lie.
Here is what i've got in my registry for the .ifo association :
[HKEY_CLASSES_ROOT\.IFO]
@=""
An empty default key.
If I remove HKEY_CLASSES_ROOT\.IFO then it doesn't hang anymore wrapped or not.
With the empty default key it was crashing in ::winshellext::shell_is_associated
Maybe some more checking will be safer with those registry stuff.
Also a way to test if we really are in wrapped mode is to use the condition [info exists ::freewrap::progname] && [info script] == ""
$tcl_interactive doesn't seems to works.
I found this code works not to bad to set the config(apppath) and load the winshellext.tcl (it need to be loaded also in "FreeWrap as wish" mode)
# Full path is needed for FreeWrap
if {[info exists ::freewrap::progname]} {
# FreeWrap as wish or Wrapped script
if {[info script] == ""} {
# Wrapped script
set config(apppath) "/Tcl/work/PGCEDIT"
} else {
# FreeWrap as wish
set config(apppath) [pwd]
if {! [file exists $config(apppath)/lib/main.tcl]} {
puts "Please CD to the PgcEdit directory before launching it."
return 1
}
}
source $config(apppath)/lib/winshellext.tcl
} else {
set config(apppath) "[pwd]"
if {! [file exists $config(apppath)/lib/main.tcl]} {
puts "Please CD to the PgcEdit directory before launching it."
return 1
}
}
drmih
18th June 2004, 11:08
I thought that this may be a useful tool as I have a dvd-recorder (Pioneer) which although it creates menus automatically plays title 1 by default. If you open the ifo file in ifoedit and try and insert a new pre command, there isn't the space and it corrupts the later data. Therefore I tried this but when the Video_ts.ifo is opened I get a message about 'End of byte of VMGI_MAT' and it will be corrected when I save the file. However, if I save the files (without touching the structure at all), the file is no longer valid and neither ifoedit or pgcedit recognise it.
r0lZ
18th June 2004, 19:46
@[Toff] Sorry for replying so late. I had probs with my forum account. Bug fixed :)
Originally posted by [Toff]
I think I've find where the real problem lie.
Here is what i've got in my registry for the .ifo association :
[HKEY_CLASSES_ROOT\.IFO]
@=""
An empty default key.
If I remove HKEY_CLASSES_ROOT\.IFO then it doesn't hang anymore wrapped or not.
With the empty default key it was crashing in ::winshellext::shell_is_associated
Indeed, the bug is in the freeWrap's shell_getCmd_imp command. I've found a workaround.
The path bug is fixed too, thanks to your help!
r0lZ
18th June 2004, 20:01
@drmih
There is indeed a bug in IfoEdit that makes two tables overlap when you insert commands, if the table must expand to the next sector. Verry ennoying.
Try loading the original files in PgcEdit before editing it with IfoEdit. If PgcEdit is still reacting badly, send me the set of the original IFOs.
I will have a look at the 'End byte of VMGI_MAT' error, and see if I can do something. But don't expect too much. PgcEdit will never be able to restore a damaged IFO.
ookzDVD
19th June 2004, 02:18
It will be nice if someday someone willing to write guide how to use this program to solve some real problems :)
drmih
19th June 2004, 18:55
@R0lZ
I should have made mysef clearer - this is nothing to do with ifoedit. I took the original dvd created on pioneer standalone hdd/dvd-r recorder and moved the files to my pc HDD. I then opened them with pgcedit and it gave the warning. I then saved the files without making any changes and what I meant to say was that both pgcedit and then ifoedit informed me that the files were corrupt. I restored the originals and they were fine.
r0lZ
19th June 2004, 22:46
OK, I understand. Please send me a ZIP file with all the original IFOs, so that I can locate where the problem is coming from.
drmih
20th June 2004, 20:24
e-mailed you the relevant files. Thanks for taking a look.
r0lZ
21st June 2004, 10:23
There is indeed a verry strange problem in your VIDEO_TS.IFO file: there is no First-Play PGC at all. I wonder if it is legal!
Explanation:
In the VMGM_MAT table is a value called "First Play PGC start byte". This value should point to the beginning of the FP-PGC. In your IFO, this value is 0. This means that the FP-PGC doesn't exists. Unfortunately, both IfoEdit and PgcEdit (v0.1.2) are not checking this situation, because they are assuming that the FP-PGC is always present. So the FP-PGC is assumed to start at address 0, and wrong data are used.
If you try to edit the commands, you are actually overwriting the beginning of the file. The VMGM_MAT table is therefore trashed, and your DVD becomes unplayable.
I will add a check in PgcEdit that will discover this situation, and automatically rebuild a new, blank FP-PGC when you load the DVD. This will hopefully fix your problem.
You may also try this trick:
1. Open VIDEO_TS.IFO in IfoEdit and go to the VMGM_MAT table.
2. Double click on the First Play PGC start byte (at offset 84), and type 348.
4. Save and Quit, then reload the file in IfoEdit. This is needed to force IfoEdit to read the FP-PGC from the new location.
5. Open the VMGM_MAT/First Play PGC. Notice that all values are now 0.
6. The Playback Time (at offset 4) is illegal. Fix it by entering the value 64 (for PAL) or 192 (NTSC).
7. Save.
8. Load and Save the DVD in PgcEdit to rebuild the other pointers.
That's all. You should be able to edit your FP-PGC commands now.
WARNING: This is a trick! It may not work in every situation. If you want to be sure, wait for PgcEdit v0.1.3. It should be available in a couple of days.
burnout
23rd June 2004, 09:15
hi r0lZ, used PGCedit a few times now and i find it really simple. just thought i would put a quick request in to have the main window update what it is showing when u use the keyboard to browse up and down the titles and menu's (currently if u use the keyboard for this it will stay on the same PGC in the main view).
if u have a reason not to do this then it's not a big problem, i haven't found any bugs when using it so keep up the good work m8 ;)
r0lZ
23rd June 2004, 14:35
@burnout
I will see what I can do for your request.
Note: It is actually possible to activate the current PGC with the keyboard by pressing the space bar.
EDIT: I've found a solution. Will be available in the next release.
burnout
23rd June 2004, 17:02
thanx for that m8, and for the temp solution ;)
LioCraft
24th June 2004, 14:01
Hi there,
I'm impressed….what a great piece of software.
All I can say is THX for selecting and deleting multiple command lines.
r0lZ
24th June 2004, 14:48
PgcEdit v 0.2 is there. :)
Please use this tread (http://forum.doom9.org/showthread.php?s=&threadid=78618) for posts related to version 0.2. Thanks!
jose12358
4th September 2004, 12:21
Good morning,
I have a dvd but I cannot use the TITLE button with the remote control or with power dvd software .
I want to activate this button in order to go to the initial menu where we can choose the movie, the scene selections, the bonus.....
Can someone explain me how I can activate this fuction by using pdcedit?
Or is there another software which can activative this button?
Thanks.
r0lZ
4th September 2004, 13:51
You need to use the last PgcEdit version (v0.3.3)
[list=1] First, you have to know if there are already some VMGM menu PGCs in your DVD. Look in the left pane, in the first section (before the first blank line). You will see the First-Play PGC. Are there any menu PGCs also? Normally, there should be some.
- If no, then you have to create a new menu: right click on the First-Play PGC, and select the New Menu item. A new Title menu will be created.
- If yes, then right click on any menu PGC and select New PGC. A new dummy PGC will be created at the end of the current domain. Then, right-click on that new PGC and select Set Menu Type, and set the menu type to 'Title menu'.
Select the Title menu you have just created.
Select the first line in the left pane (the line with "**** pre commands:"), and use the 'macros/reset used GPRMs to 0' function. This will insert some pre-commands.
If you used the "New PGC" function in step one, then you need to double-click the last line in the pre-commands section (the NOP command) and change it to[30 06 00 00 00 00 00 00] 1 (JumpSS) Jump to First Play PGC[/list=1]This should work. When you will press the Title button on the remote, the DVD will be played back from the beginning, allowing to go back to the first menu.
There are other methods to jump directly to your menu, without restarting the DVD from the beginning, but it's difficult to know what to do exactly without seeing the DVD structure...
[note:] Please remove the two other posts on the same subject...
jose12358
5th September 2004, 12:41
I have seen the First-pLay and there are some VMGM menu PGCs below.
I have created a dummy PGC and set the menu type to 'Title menu'.
But after I don't understand what you mean so i don't go any further .
So can you help me please?
THANKS
r0lZ
5th September 2004, 14:15
In the left pane, click on the Title menu PGC you have created (the last PGC before the blank line). You will see a single NOP command in the right pane.
In the right pane, click on the verry first line (before the NOP) to select it.
Go to the Macros menu, and select the 'reset used GPRMs to 0' menu item.
Now, double-click on the NOP line (the last line before "*** post commands:") to launch the PGC Editor.
Go to the first menu in the PGC Editor, and select the command "JumpSS-FP". Click OK to accept the change. The old NOP command should now be '(JumpSS) Jump to First Play PGC'.
Save the DVD and test it with any player.
jose12358
5th September 2004, 16:12
I have tried whay you have said .
But when I launch the dvd , The TITLE button is not activated ,so I cannot used IT.
I don't know where my mistake is but I think that I have done what is written .
Can you help mem ore ?
thank
r0lZ
5th September 2004, 17:15
Maybe your Title button is disabled by a Prohibited User Operation.
Go to the Utilities menu, and select the "Filter Prohibited User Operations" menu item. Clear the "Menu Call: Title" checkbox on each popup dialogs that appear. (You may clear all checkboxes as well to enable all operations.)
Save and test.
Note that there may be some PUOs in the VOB files as well. PgcEdit is not able to clear them... If you used DVD Decrypter to rip the original DVD, you should have checked the "Remove VOB PUOs" option in the settings tabs for File Mode, IFO Mode and ISO Read Mode.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.