Log in

View Full Version : PgcEdit v0.3.


Pages : 1 2 3 4 [5] 6 7 8 9 10

jeanl
20th October 2004, 23:42
Originally posted by 2COOL
Since vStrip has CLI commands, I think you can incorporate it into PgcEdit for stripping out Audio and Subpictures. I hope you can understand this guide (http://www.doom9.org/vstrip.htm). This would take PgcEdit closer to matching IfoEdit. What do you think?
what about the fact that pgcedit is multi-platform :(?
No, but seriously, I'm not familiar with vstrip. What would having vstrip functionality in pgcedit enable?
Jeanl

jsoto
21st October 2004, 00:11
I think vStrip is not able to do audio/subs stripping..., am I wrong?

I believe it is a ripper+demuxer. Stripping is a feature close to muxing, because you need to readjust all the internal VOB pointers.

jsoto

r0lZ
21st October 2004, 09:57
I don't know vstrip too well. Of course, it is possible to add a Windows-only GUI frontend to vstrip in PgcEdit, but I need to study it to know if it is possible to integrate it in a more useful way.

What would having vstrip functionality in pgcedit enable?
Good question.

Kilyan
21st October 2004, 10:08
Hi!

Is there a way to edit the menu(s), so that the subpic turns off let's say 4 sec before the end of the menu (the subpicture doesn't starts with the menu, but 5 sec after. DVD compiled with Maestro), I mean making it invisible and inoperable with pgcedit?

Thanks

Cela
21st October 2004, 10:54
Originally posted by r0lZ
Thanks to jsoto, The VOB/Cell ID remapper (in the PGC Editor window, VOB/Cell ID buttons) has now the ability to append a new blank cell to the VOB. Handy to blank out a specific cell. Thank you for that great program!

Allow me to report a small problem. When I tried to append a new blank cell to the last chapter, like I normally do with jsoto's AddChapter, it did not append but it replaced the last chapter.

Example: let the last cell originally be 1/31
'Create a new blank VOB Cell' tells me: 'A new blank cell will be appended ...and Cell ID will be assigned to Cell 32 of current PGC'.
I do not get the expected result like from AddChapter
...
1/30
1/31
2/1

but I get
...
1/30
2/1
and that means 1/31 is not appended to but is replaced?

What am I doing wrong? Please help.

Regards,
Cela

r0lZ
21st October 2004, 10:57
Originally posted by Kilyan
Hi!

Is there a way to edit the menu(s), so that the subpic turns off let's say 4 sec before the end of the menu (the subpicture doesn't starts with the menu, but 5 sec after. DVD compiled with Maestro), I mean making it invisible and inoperable with pgcedit?

Thanks
I'm not sure to understand what you want to do.


If you want to remove the button highlights, you may try this:
- Double click on the menu PGC in the PGC selector pane to open the PGC Editor window.
- In the Sub-picture Streams section, click on the subpic 1 button.
- Select Disable
- You may have to change the Cell's Still Time duration to 0 in the Cells list, too.
- Accept and Save DVD.
Note: Not sure if it works! You will probably not be able to select any button in the menu.


If you want to change the starting or ending time of the highlight, you have to use VobEdit. Not easy with an animated menu!

1. Get LBA number with PgcEdit.
- Load the DVD in PgcEdit.
- In the PGC selector pane, right click on the PGC with the menu, and select Show Menu Buttons.
- Hold your mouse over the topmost button of the window (the button showing the PGC label and VOB/Cell IDs). A tooltip will appear, with the LBA number of the cell in the VOB.
- Note this number
- Also, note the number of the button you want to be automatically selected when the menu will be played.
- Quit PgcEdit.

2. Change values with VobEdit.
- Open your menu VOB in VobEdit.
- Enable the Button checkbox.
- Scroll to the LBA number noted in part 1, and select it in the left pane.
- In the right pane, copy the Highlight start time value to the Highlight end time (at offsets 008f and 0093). Or maybe you can set both to -1 (not tested)
- Then, change the force action button number (at offset 00a2) to the number of the button you want to be automatically selected (noted in part 1)
- You may need to repeat the edits for all NAV Packs of the cell, but sometimes changing only the first NAV pack is sufficient.


Check carefully all situations before burning (for example, press FF when in your menu). There may be side effects around...

r0lZ
21st October 2004, 11:09
Originally posted by Cela
When I tried to append a new blank cell to the last chapter, like I normally do with jsoto's AddChapter, it did not append but it replaced the last chapter. Normal. The function you are using is a Cell Remapper, not another AddChapter. With this function, you can assign another VOB/Cell ID to any cell of the PGC. In the last version, I added the ability to create a new blank cell, and remap the currently selected cell to this blank one.
The main purpose of this addition is to blank out a specific cell.

Currently, PgcEdit is not able to add a new cell in the cell list. This is what you want. Sorry :(

Note: If you want a blank chapter only to be able to skip to the end of the title with the next chapter button, you should try the "Enable Navigation Buttons" utility.

maksa
21st October 2004, 15:18
Roiz, once again excellent work. New PgcEdit PM Removal macro works as described. Tried last night and it did what is promised. But disk wouldn't work with PowerDVD at G level. I had to go and fin sprm(13) and replace it with (mov)15. After thet everything OK. Anywas, great automation.
Thanks again,
Maksa

Kilyan
21st October 2004, 15:24
Thanks r0lZ!

I' ll try that.
" If you want to change the starting or ending time of the highlight, you have to use VobEdit. Not easy with an animated menu!"
That's not totally my problem, I mean the buttons totally disappears from the animated menu before it ends.
The starting time is can be easely done in maestro but no way to define an ending time (the button can be seen till the end of the animated menu). My original dvd has only animated menus, which work as follow:
1. animated menu starts, no buttons shown and nothing selectable.
2. after 5 sec all buttons appear and selectable and can be activated.
3. 5 sec before the end of the animated menu, all the buttons disappear and so nothing is selectable.
This menus has 2 cell, 2. cell defining the beginning of the apparition of the buttons.
I want to reproduce number 3. the way they did it on the original.

So I hope with your second guess and walkthrough about my problem will be solved.
If you think it's not the right way, please reply.
Thanks.

Mega-Splat
21st October 2004, 15:57
OK, I've got PGCEdit v0.3.4 and it was properly installed into WinXP Home (SP1). Now I'm trying to uninstall it via PGCEdit's own uninstall option and I'm getting this error window
"Error: can't read "env(HOME)": no such variable"
and here's the info straight out of the error's text box:

can't read "env(HOME)": no such variable
can't read "env(HOME)": no such variable
while executing
"file join $env(HOME) "Application Data/PgcEdit""
(procedure "::winshellext::uninstallPgcEdit" line 30)
invoked from within
"::winshellext::uninstallPgcEdit"
(menu invoke)



So, how do I uninstall this puppy?

r0lZ
21st October 2004, 17:13
@Mega-Splat
This is a bug.

You will need to delete the files manually.
- Delete the PgcEdit's install directory (with PgcEdit.exe and a bin subdirectory).
- Delete the shortcuts pointing to PgcEdit if you created some (in the startup menu, the QuickLaunch menu, the desktop...)
- Delete the configuration directory C:\Documents and settings\<YOUR_USER_NAME>\Application Data\PgcEdit
That's all.

Or wait for the next version. The bug will be fixed.

Mega-Splat
21st October 2004, 21:28
Thanks, bro. It's done and the latest version is now installed. Cheers!

Kilyan
22nd October 2004, 02:25
Originally posted by r0lZ

If you want to change the starting or ending time of the highlight, you have to use VobEdit. Not easy with an animated menu!

1. Get LBA number with PgcEdit.
- Load the DVD in PgcEdit.
- In the PGC selector pane, right click on the PGC with the menu, and select Show Menu Buttons.
- Hold your mouse over the topmost button of the window (the button showing the PGC label and VOB/Cell IDs). A tooltip will appear, with the LBA number of the cell in the VOB.
- Note this number
- Also, note the number of the button you want to be automatically selected when the menu will be played.
- Quit PgcEdit.

2. Change values with VobEdit.
- Open your menu VOB in VobEdit.
- Enable the Button checkbox.
- Scroll to the LBA number noted in part 1, and select it in the left pane.
- In the right pane, copy the Highlight start time value to the Highlight end time (at offsets 008f and 0093). Or maybe you can set both to -1 (not tested)
- Then, change the force action button number (at offset 00a2) to the number of the button you want to be automatically selected (noted in part 1)
- You may need to repeat the edits for all NAV Packs of the cell, but sometimes changing only the first NAV pack is sufficient.


Check carefully all situations before burning (for example, press FF when in your menu). There may be side effects around...


I tried out. Doesn't seem to work.
I edited the menu vobpacks and changed the original "-1" value of highlight end time to the same as highlight start time.
Also tried other values but nothing seenes to work, the buttons are still there 5 sec before the end of the animated menu.
Tried button selection end time too, with no luck.

I want to disable the buttons before the end of the menu, so that they can't be seen and activated.
The menu is 30 sec long. The highlight start is set to 5:00 sec, and I would like them off at 26:00 sec.
Any ideas?

Thanks

2COOL
22nd October 2004, 04:56
Originally posted by r0lZ
@Mega-Splat
This is a bug.

You will need to delete the files manually.
- Delete the PgcEdit's install directory (with PgcEdit.exe and a bin subdirectory).
- Delete the shortcuts pointing to PgcEdit if you created some (in the startup menu, the QuickLaunch menu, the desktop...)
- Delete the configuration directory C:\Documents and settings\<YOUR_USER_NAME>\Application Data\PgcEdit
That's all.

Or wait for the next version. The bug will be fixed. I was going to post this bug earlier but Mega-Splat beat me to it. Anyways, there are also instances of "PgcEdit" in the registry if you do a search for it. If you're daring and want to wipe out PgcEdit off your HD like it never existed, then you'll have to search and delete. As a pre-caution, all I have to say is to save your registry files before doing any editing.

r0lZ
22nd October 2004, 09:05
PgcEdit don't change directly the registry, except if you used Options -> Install -> Associate PgcEdit...
But thoses modifs are deleted when you uninstall PgcEdit. (The bug comes after this part).
However, Windows adds also some infos about every executable in the registry, but this is not under PgcEdit's control, so the uninstall will not remove them. This is harmless, however.

Cela
22nd October 2004, 10:29
Originally posted by r0lZ
Normal. The function you are using is a Cell Remapper, not another AddChapter...Now I understand.
Please consider to revise the texts. IMHO the wording is somehow misleading. English is not my native language but when I read 'append' it sounds to me like 'add'. But at the end I get a 'replace'?

I guess it is _how_ you do it: You add/append a new cell after the existing cell and change the pointers so that the new cell is used instead of the old cell, thus functionally replacing it.
(Is the old, unused cell still there or deleted?)

Why not include jsoto's AddChapter in PgcEdit? Would be another jewel in the crown.

Regards,
Cela

r0lZ
22nd October 2004, 10:59
Originally posted by Cela
when I read 'append' it sounds to me like 'add'. But at the end I get a 'replace'?

I guess it is _how_ you do it: You add/append a new cell after the existing cell and change the pointers so that the new cell is used instead of the old cell, thus functionally replacing it.
(Is the old, unused cell still there or deleted?)
That's right. And no, the old cell is not deleted, and will probably be 'unreferenced' so you may strip it safely (or compress it at the highest level with DVDShrink.)

Why not include jsoto's AddChapter in PgcEdit? Would be another jewel in the crown.
You may already add any tool you want in the Tool menu.
But AddChapter has no CLI support, so it is not possible to use it 'transparently' from within PgcEdit. I may however use jsoto's BlankCell (a modified, CLI-only version of BlankVob) to add an 'Add Chapter' feature in PgcEdit. But for now, I prefer to concentrate on new, unique features. AddChapter exists: use it!

2COOL
23rd October 2004, 04:19
Request:

Instead of blanking cells at a cell level, how about at a PGC level? Here's my visualization.

http://img54.exs.cx/img54/2931/BlankCells.png

The Blank Cell(s) button would be disabled until a check is made on the right. No action will be made until button is pressed and you'll have a dialog, not corrected though, with info as below. You know what I'm getting at.

http://img55.exs.cx/img55/9049/dialog.png

This would be useful on blanking specific cells in one process. All cells selected in this PGC would be referenced to just one new blank cell. What do you think?

BTW, thanks for the new Info dumps! :D

blutach
23rd October 2004, 04:33
@2COOL

Oh yeah!

blutach
23rd October 2004, 05:32
Thanks for the guide 2COOL. Another beauty.

One thing I did a bit differently, however, which I found worked, was not to post the button command in as a cell command but as the last pre command (item 12 page 2 of the guide (http://home.tiscali.be/debie.roland/pgcedit/third_party/2cool/remove_language_aspect_ratio_menus/remove_language_and_aspect_ratio_menus_2.htm#Top)). This way, the cell doesn't play at all - it just takes you to the PGCN that you want the default button to go to.

There is also no real need to blank the cell afterwards (page 3), but I did a strip of the VobID with IfoEdit afterwards anyway - call me a purist :).

Anyway, this worked for me.

What do you think?

Regards

2COOL
23rd October 2004, 06:17
@blutach

I replied to your post in its appropriate thread (http://forum.doom9.org/showthread.php?s=&postid=560863#post560863). ;)

r0lZ
23rd October 2004, 08:36
Originally posted by 2COOL
Request:

Instead of blanking cells at a cell level, how about at a PGC level? Here's my visualization.

The Blank Cell(s) button would be disabled until a check is made on the right. No action will be made until button is pressed and you'll have a dialog, not corrected though, with info as below. You know what I'm getting at.

This would be useful on blanking specific cells in one process. All cells selected in this PGC would be referenced to just one new blank cell. What do you think? That's feasible, but you can already do that with a few mouse clicks.

I have planned to revamp totally this part of the interface. IMHO, it will be better to have two completely different GUIs: one for the PGC header, streams lists and color lookup table. The other one with the Cell table. With this new interface, you will be able to multi-select any number of cells, and process them as a whole, to add, remove or move up/down the program and chapter entries, or to remap or blank the cells.

However, I will have a look at the code. If your suggestion is easy to program, I will implement it.

Or I may add an external function, working at the PGC level, to blank (or remap) ALL cells of the PGC in one operation.

Cela
23rd October 2004, 13:50
Commands or macro for VTS-chain needed - Call for help:

Given three VTST from DVD-lab Pro with 'File > Attach External VTS' attached to a dummy VTS1 (blank VOB):
VTS2 with 40 chapters
VTS3 with 33 chapters
VTS4 with 41 chapters

Wanted to step forward and backward from chapter to chapter with the 'next chapter' and with the 'previous chapter' button of the remote control as if the logical chain of the concatination of all chapters of the three VTS belonged to a virtual single VTS. An innocent wish but complicated to express in english and impossible for me to accomplish.

Forward Chain:
Using the 'next chapter button' jump from the current chapter to the next chapter until the last chapter of the current VTS is reached and then jump to the first chapter of the next VTS...
Menu VMGM PGC2 ->
-> VTS2, PGC1, Chapter1 ! -> 'next chapter button'
-> VTS2, PGC1, Chapter2
...
-> VTS2, PGC1, Chapter39
-> VTS2, PGC1, Chapter40 ! last chapter of VTS2

-> VTS3, PGC1, Chapter1 ! first chapter of VTS3
-> VTS3, PGC1, Chapter2
...
-> VTS3, PGC1, Chapter32
-> VTS3, PGC1, Chapter33 ! last chapter of VTS3

-> VTS4, PGC1, Chapter1 ! first chapter of VTS4
-> VTS4, PGC1, Chapter2
...
-> VTS4, PGC1, Chapter40
-> VTS4, PGC1, Chapter41 ! last chapter of VTS4

-> back to Menu VMGM PGC2
Backward Chain:
Using the 'previous chapter button' jump from the current chapter to the previous chapter until the first chapter of the current VTS is reached and then jump to the last chapter of the previous VTS...

<- back to Menu VMGM PGC2
<- VTS2, PGC1, Chapter1 ! first chapter of VTS2
<- VTS2, PGC1, Chapter2
...
<- VTS2, PGC1, Chapter39
<- VTS2, PGC1, Chapter40 ! last chapter of VTS2

<- VTS3, PGC1, Chapter1 ! first chapter of VTS3
<- VTS3, PGC1, Chapter2
...
<- VTS3, PGC1, Chapter32
<- VTS3, PGC1, Chapter33 ! last chapter of VTS3

<- VTS4, PGC1, Chapter1 ! first chapter of VTS4
<- VTS4, PGC1, Chapter2
...
<- VTS4, PGC1, Chapter40
<- VTS4, PGC1, Chapter41 ! <- 'previous chapter button'
I managed to do the forward chain, but I am unable to do the backward chain. Help needed. Thanks.

2COOL
24th October 2004, 02:08
@Cela

Originally posted by Cela

Backward Chain:
Using the 'previous chapter button' jump from the current chapter to the previous chapter until the first chapter of the current VTS is reached and then jump to the last chapter of the previous VTS...

I managed to do the forward chain, but I am unable to do the backward chain. Help needed. Thanks. [/B]To the best of my knowledge, this is not possible.

@r0lZ

A DVD can have more than one PGC holding the same title (Non_sequential_PGC Titles). In PgcEdit, you only have one VTST defined while another with the same title, showing nothing (undefined). It is possible to get the PGC's title number from VTs_PGCITI.

r0lZ
24th October 2004, 07:34
@2COOL
A DVD can have more than one PGC holding the same title (Non_sequential_PGC Titles). In PgcEdit, you only have one VTST defined while another with the same title, showing nothing (undefined). It is possible to get the PGC's title number from VTs_PGCITI.I know. I made it this way deliberately. The Title label identifies the entry point of the title. I use this info for the highlight/jump to target features.

Note that you can find the other PGCs belonging to the same title by looking at the TTN number: all PGCs with the same TTN number are different parts of the same non-sequential title.

BTW, I can't imagine a good reason to spread a title over several PGCs. Do you?

Cela
25th October 2004, 11:17
To the best of my knowledge, this is not possible....and when the BEST says it is not possible, then its hopeless.

But as you say: "Without vision, we are blind to opportunity."

Can we find a workaround?

DVBlab's 'bridge element' is a first approximation to a solution. Here you jump from 'first chapter of current VTS' to 'FIRST chapter of previous VTS'!
Which is not yet the natural, logical sequence in the film.

So, if its possible to jump to the 'FIRST chapter of previous VTS', isn't it possible to put there a precommand that tells to jump on to the LAST chapter. (The number of the LAST chapter could be edited manually with PgcEdit). Probably a free GPRM is needed which could trigger the jump to the LAST chapter. It should be ON when the pending user action is a 'previous chapter button' click. Unfortunately, I am a simple user and my knowledge is too limited to activly seek a solution.

Now a reason for such an example. Why do I bother you with this example? I simply want to be able to browse through a film in the natural, logical order - even when the film has to be segmented.

Imagine there is a film which would need 114 chapters (major scene changes), too many for a single VTS.
Since it consists of three major parts, I would like to segment it into three segments (if that is not possible, I will have to be content with two segments):
segment 1: let original chapters 001 - 040 become VTS2 with ch. 1-40 (call it A1 - A40)
segment 2: let original chapters 041 - 073 become VTS3 with ch. B1 - B33
segment 3: let original chapters 074 - 114 become VTS4 with ch. C1 - C41

a schematic graphic could be like this:

!01____....______40_41____...______73_74____..._____114! original Film
-------------------------------------------------------------------
!A1_A2_..._A39_A40!B1_B2_..._B32_B33!C1_C2_..._C40_C41! segmented into three parts
-------------------------------------------------------------------
!_____VTS2_______!_____VTS3_______!_____VTS4_______!


In the original film there is no problem to browse forwards and backwards with the appropriate chapter buttons.

But how to browse ...
from original 'chapter 41' -> 'chapter 40'
that is from 'VTS3 chapter 1' -> 'VTS2 chapter 40'
or generally from 'FIRST chapter of VTS3' -> 'LAST chapter of VTS2'
more generally from 'first chapter of current VTS' -> 'last chapter of previous VTS' with the 'previous chapter button'?
... that is the question.

With my limited knowledge I cannot find a solution!
But I'm sure, you can.

Cela

2COOL
27th October 2004, 00:39
@r0lZ

You have lots of discrepancies in PgcEdit! :eek:

I don't think you can set the highlighted button with a SPRM value. This is in regards to http://www.dvd-replica.com/DVD/sethlbtn.php You can only used a GPRM or 6-bit button value.

From http://www.dvd-replica.com/DVD/cmpgprmops.php

A compare operation compares the contents of a specified GPRM to another GPRM, SPRM or a constant value.I don't think you can use a SPRM to compare with another GPRM, SPRM, or a constant value. The first value must always be a GPRM. Show me a DVD that has a If-SPRM command as I have check through 5 DVDs so far and none have them. With this said, you have to redo alot of dialogs with these If-SPRM commands. :(

In SetCLnk, I don't think you can assign a SPRM value to a GPRM. I can't confirm for CSetLnk though.

In SetAMXMD dialog, I don't think you can set SPRM 11 the way it's set up. In fact, I think your command editing dialog for this command is wrong. here (http://www.dvd-replica.com/DVD/setamxmd.php?p=34). It should be setting channel mixing flags.

In SetGPRMMD, I don't think you can assign a SPRM value to a GPRM.

When using RND with GPRM, you can't use zero as the seed value. In fact, when I inputted this command I got an error when doing a PGC dump after.
[78 00 00 00 00 00 00 00] # Set gprm(0) ?=(rnd) 0
can't read "::menus(0,1,2,numcells)": no such element in array

Hmmm....using a in-place NOP command, I selected Numerically > 40-D0: Set > A_____CSetCLnk. Keep doing this with the others in the same list and look at the hex command. It doesn't update correctly. Is it just me?

Why is that when I set a GPRM and then do a LinkPGCN, I don't have the option to highlight a button? All the other link commands do.:confused: It should be in the specs. [Edit] Hmmm...maybe we can't really do it and dvd-replica.com is wrong. It's not the first time that site's wrong.

Also you got Number of PGCs at 65535? Seems kind of high. Hmmm....here's mpucoder input on number of PGCs per IFO, http://forum.doom9.org/showthread.php?s=&postid=371189#post371189.

And another thing, if inputting a 0 or blank into PGCN results in an illegal command, why even let it be inputted. You have filtered out other character besides 0 to 65535. Same goes for LinkPGN, LinkPTT, and LinkCN.

Not a discrepancy, but in the NOP command dialog, why even bother enabling the "IF" checkbox is you state that using it is useless.

Try these commands in PGC command editor.

{68 00 00 00 00 00 00 00} // RND
{69 01 00 00 00 00 00 00} // AND
{6A 01 00 00 00 00 00 00} // OR
{6B 01 00 00 00 00 00 00} // XOR

If you toggle the R And, the LinkNoLink command still remains in the code even if you don't have it checked.

Can you prove me wrong with justifications? I have been reading my book, DVD Authoring and Production by Ralph LaBarge, and it also backs up what I report. There may be more if I do more research.


UPDATE:More errors found!

There might be case that it is possible that an error occurs through the executioin of a navigation command. The DVD Specs requires the player to perform the following actions when an error condition occurs.

If a GPRM is divided or mod by zero, PgcEdit reports an error.

[77 00 00 00 00 00 00 00] # Set gprm(0) %=(mod) 0
[76 00 00 00 00 00 00 00] # Set gprm(0) /=(div) 0
Error:divide by zero
According to my book, if this is command is used, the target GPRM will be set to 65,535.

divide by zero
divide by zero
while executing
"expr $op1 / $val"
("6" arm line 2)
invoked from within
"switch $operand {
1 { ;# = SET
return $val
}
2 { ;# <-> SWAP !!! NOT SWAPPED: actually, this function allow only to return ONE value!
retu..."
(procedure "operation_result" line 2)
invoked from within
"operation_result $op1 $operand $val"
("7" arm line 25)
invoked from within
"switch $cmdtype {
0 {
# flow control commands
switch [::disasm::get_nibble $hex 1 1] {
0 {
# NOP
}
1 {
# Goto
set n..."
(procedure "trace_disasm" line 16)
invoked from within
"trace_disasm"
("default" arm line 14)
invoked from within
"switch $cmdtype {
"* pre" {
incr idx
::main::set_listbox_selection $idx
}
"* post" {
incr idx
::main::set_listbox_selection $idx
}..."
(procedure "exec_current_line" line 11)
invoked from within
"exec_current_line"
invoked from within
"if {$idx == "-"} {
::main::set_listbox_selection end
set idx [lindex [::main::get_selection_indexes] 0]
bell
} elseif $::tr::now_playin..."
(procedure "step" line 5)
invoked from within
"step "
(procedure "::tr::dvd_trace" line 280)
invoked from within
"::tr::dvd_trace"
(menu invoke)

Also if the navigation command results in an overflow, then the target GPRM will be set to 65,535. If the overflow occurred while a GPRM was in counter mode, then the target GPRM will be set to zero.

If a navigation command results in an underflow, then the target GPRM will be set to zero.

2COOL
27th October 2004, 01:58
Suggestion:

When using Set commands with

ADD
SUB
MUL
DIV
MOD
RND
SWP
AND
OR
XOR

.., a disclaimer to state that these commands cannot be used if the target GPRM is in counter mode.

r0lZ
27th October 2004, 08:28
Originally posted by 2COOL
@r0lZ

You have lots of discrepancies in PgcEdit! :eek:
[list=1]
I don't think you can set the highlighted button with a SPRM value. This is in regards to http://www.dvd-replica.com/DVD/sethlbtn.php You can only used a GPRM or 6-bit button value.[/list=1] From MPUCoder's site:
The SetHL_BTNN command sets the selected (highlighted) button number (SPRM 8).
The indirect form sets SPRM 8 to the value in register (GPRM or SPRM) "SS" (byte 5).
The direct form sets SPRM 8 to "SSSS" (bytes 4&5).
I will try to do some tests to confirm...

[EDIT] Tested with IfoEdit, WinDVD, Sony and Kiss: it works perfectly! :)

r0lZ
27th October 2004, 08:49
Originally posted by 2COOL
2. From http://www.dvd-replica.com/DVD/cmpgprmops.php

I don't think you can use a SPRM to compare with another GPRM, SPRM, or a constant value. The first value must always be a GPRM. Show me a DVD that has a If-SPRM command as I have check through 5 DVDs so far and none have them. With this said, you have to redo alot of dialogs with these If-SPRM commands. :(
Again, this is not what is explained on the MPUCoder's site. But it's not verry clear...

Tested with IfoEdit, WinDVD, Sony and Kiss: it works perfectly! :)

EDIT: I was wrong! Fixed in PgcEdit 0.4.7.

r0lZ
27th October 2004, 09:54
3. In SetCLnk, I don't think you can assign a SPRM value to a GPRM. I can't confirm for CSetLnk though.

MPUCoder's site:
The SetCLnk command sets the destination register "R" (byte 1 lower nibble) to the result of the operation "J", listed below. A compare is then performed, and the link executed if the result of the compare is true.
The indirect form uses GPRM or SPRM denoted by "SS" (byte 3) as the source, as allowed by the operation.
The direct form uses the constant "SSSS" (bytes 2&3) as the source value, if allowed by the operation.
Tested with IfoEdit, WinDVD, Sony and Kiss: it works perfectly! :)

r0lZ
27th October 2004, 10:19
4. In SetAMXMD dialog, I don't think you can set SPRM 11 the way it's set up. In fact, I think your command editing dialog for this command is wrong. here. It should be setting channel mixing flags.
That's almost true. For this command, the PgcEdit's interface is somewhat limitted.

You can use a GPRM or SPRM as the source for the operation. The GUI is correct on this point.

You can use a constant value as well, but only some values are legal. Only bits 2-4 and 10-12 are meaningful. Bits 0, 1, 5-9 and 13-15 must be set to 0. This is why the maximum value allowed in the GUI is 7196 (ie 0x1C1C, meaning all legal bits set.) However, it is possible to enter an illegal value here (for example: 1, meaning bit 0 set, is illegal, but can be entered).

Ideally, I should replace the source value field by 6 checkboxes. It's on my TODO list for a while. But it's not easy to do (I use the same GUI for all sources allowing to input a value, a GPRM or a SPRM.) For now, you have to calculate yourself the correct value to use.

Since this command is rarely used, changing the GUI is not a high priority TODO item for me. Sorry. :(

r0lZ
27th October 2004, 10:53
5. In SetGPRMMD, I don't think you can assign a SPRM value to a GPRM. Again, from MPUCoder's site:The indirect form uses the value in the register (GPRM or SPRM) indicated by "SS" (byte 3).However, you are right! Using [43 00 00 88 00 8F 00 00] 3 (SetGPRMMD) Set gprm(15) in counter mode =(mov) sprm(8:Highlighted button number) will set the value of gprm(8) in gprm(15). (Tested on my Sony player and IfoEdit.)

I must fix this bug... :(

r0lZ
27th October 2004, 11:30
6. When using RND with GPRM, you can't use zero as the seed value. In fact, when I inputted this command I got an error when doing a PGC dump after.
[78 00 00 00 00 00 00 00] # Set gprm(0) ?=(rnd) 0can't read "::menus(0,1,2,numcells)": no such element in arrayThe source value is not used as the random generator's seed. MPUCoder:set destination GPRM to a random value between 1 and the source value
Obviously, it is meaningless to use a value of 0 or 1 here. But using 0 is not illegal. :)

Again, tested on all my players: surprise: the command[78 00 00 00 00 00 00 00] 1 Set gprm(0) ?=(rnd) 0gives 1 on all software players I have tested, including the Kiss standalone (which is in fact a Linux PC in a settop box).
But my Sony gives 0! :confused:

I may change the minimum to 1 in the GUI, but I'm not sure since it is apparently allowed to use 0 (with unpredictable results, but it is what you want when using a random generator, no? :p)

BTW, the error message you got is not related to this. Can you reproduce the problem?

r0lZ
27th October 2004, 12:22
7. Hmmm....using a in-place NOP command, I selected Numerically > 40-D0: Set > A_____CSetCLnk. Keep doing this with the others in the same list and look at the hex command. It doesn't update correctly. Is it just me?Well. It's a little strange, but you must understand how it works.
The commands in this group (all *Set* commands) are duplicated in the 'Numerically' menu because there are actually two codes for each command: one code for the indirect Set (where the source is a GPRM or a SPRM), the other for the direct set (source is a constant value).
But both menu entries are calling the same command in the GUI. I don't change automatically the source type (GPRM/SPRM <-> value), because you can do that yourself, with the radio buttons in the GUI, and changing that without an explicit user action may be disturbing.

However, this behavior can be modified. Let me know if you want the source mode automatically updated...

2COOL
27th October 2004, 12:29
Originally posted by 2COOL
I don't think you can set the highlighted button with a SPRM value. This is in regards to http://www.dvd-replica.com/DVD/sethlbtn.php You can only used a GPRM or 6-bit button value.
Tested with IfoEdit, WinDVD, Sony and Kiss: it works perfectly!What about the other 23 SPRMs besides SPRM (8)?

r0lZ
27th October 2004, 12:50
8. Why is that when I set a GPRM and then do a LinkPGCN, I don't have the option to highlight a button? All the other link commands do.:confused: It should be in the specs. [Edit] Hmmm...maybe we can't really do it and dvd-replica.com is wrong. It's not the first time that site's wrong.It is not possible to have both a PGC value and a button number: the value is stored in bytes 6 and 7, and the button number in byte 6. Since the PGC number may be higher than 1023, it will overwrite the button number.
This is why the highlight button parameter is not supported by the standard.


Also you got Number of PGCs at 65535? Seems kind of high. Hmmm....here's mpucoder input on number of PGCs per IFO, http://forum.doom9.org/showthread.php?s=&postid=371189#post371189.Right. I will change the max to 32767.


And another thing, if inputting a 0 or blank into PGCN results in an illegal command, why even let it be inputted. You have filtered out other character besides 0 to 65535. Same goes for LinkPGN, LinkPTT, and LinkCN.You must remove the last character in the field to be able to type a different value.
Also, you must type 0 alone in the field to input an hexadecimal or octal number (ie 0x10 or 012).
So, there are 4 cases where the input field may be filled with illegal characters: "0" (when the minimum is 1), "", "0x" and "0X". In these situations, the field's value is assumed to be 0. This is why the generated command is illegal. The pink background is there to invite the user to continue to type... I can't do more.

r0lZ
27th October 2004, 12:58
Originally posted by 2COOL
What about the other 23 SPRMs besides SPRM (8)?
It works. But I must admit that it is not verry useful! And it is illegal to set the highlighted button to a number which is not a multiple of 1024. So, using a SPRM as the source will probably have unpredictable results, and is probably never used. But it works, and therefore PgcEdit must support it (or you will have surprises when entering the command editor with such a command.)

r0lZ
27th October 2004, 13:02
9. Not a discrepancy, but in the NOP command dialog, why even bother enabling the "IF" checkbox is you state that using it is useless.For the same reason: it works! If you have a command like this one[00 A0 00 00 00 00 00 00] 1 if ( gprm(0) == 0 ) then { NOP }I must show the IF condition in the GUI, or the command will not be translated correctly.

r0lZ
27th October 2004, 13:13
10. Try these commands in PGC command editor.

{68 00 00 00 00 00 00 00} // RND
{69 01 00 00 00 00 00 00} // AND
{6A 01 00 00 00 00 00 00} // OR
{6B 01 00 00 00 00 00 00} // XOR

If you toggle the R And, the LinkNoLink command still remains in the code even if you don't have it checked.Right. Strange problem! I don't understand how it may be related to the operator! I'll try to fix that.

r0lZ
27th October 2004, 13:20
More errors found!

There might be case that it is possible that an error occurs through the executioin of a navigation command. The DVD Specs requires the player to perform the following actions when an error condition occurs.

If a GPRM is divided or mod by zero, PgcEdit reports an error.

[77 00 00 00 00 00 00 00] # Set gprm(0) %=(mod) 0
[76 00 00 00 00 00 00 00] # Set gprm(0) /=(div) 0

According to my book, if this is command is used, the target GPRM will be set to 65,535.

Also if the navigation command results in an overflow, then the target GPRM will be set to 65,535. If the overflow occurred while a GPRM was in counter mode, then the target GPRM will be set to zero.

If a navigation command results in an underflow, then the target GPRM will be set to zero.
Interesting. However, the last sentence contradict the previous one. Could you be more precise?

Of course, I will fix the divide by 0 bug...

r0lZ
27th October 2004, 13:25
Originally posted by 2COOL
Suggestion:

When using Set commands with

ADD
SUB
MUL
DIV
MOD
RND
SWP
AND
OR
XOR

.., a disclaimer to state that these commands cannot be used if the target GPRM is in counter mode. How do you set a GPRM in counter mode AND with any of the operator above? SetGPRMMD don't allow to use them. And any other Set* command will reset the GPRM to register mode, no? [ETIT:] Wrong! see my next post below (http://forum.doom9.org/showthread.php?s=&postid=562697#post562997)...


Thanks for your inquiries, 2COOL! I really need serious beta testers like you! ;)

mpucoder
27th October 2004, 14:49
Looks like a lot has happened in the last 2 hours to clear things up.

I just confirmed a couple things with Scenarist.
1) goto, break, and SetTmpPML are restricted to pre/post commands (but not NOP, which is, technically, in the goto group)
2) SetGPRMMD source can be either a GPRM or a constant, but not an SPRM

So i'll be changing the descriptions of those, and adding a note that once a register is in counter mode only the MOV operator is allowed.

I just read Ralph's description of overflow several times. I think the difficulty with his explanation is that the 2 sentences are unrelated, but appear in the same paragraph. Overflow as the result of an arithmetic operation results in the register being set to its maximum value (65535). BUT registers in counter mode when incrementing from 65535 will wrap around to 0.

Obviously if you want to perform an arithmetic operation on a register in counter mode you must first take it out of counter mode. That could result in 3 commands. If you need to perform an operation on the initial value of the counter then do it before setting counter mode. Then set the register to counter mode using itself as the source value.

Pressing a button signals the end of the program, so if the button command does not transfer control the post commands will execute.

2COOL
27th October 2004, 21:05
@r0lZ

Another bug (http://forum.doom9.org/showthread.php?s=&postid=562887#post562887)! ;)

2COOL
27th October 2004, 22:20
In reference to Question 1 (http://forum.doom9.org/showthread.php?s=&postid=562497#post562497).

Originally posted by r0lZ
It works. But I must admit that it is not verry useful! And it is illegal to set the highlighted button to a number which is not a multiple of 1024. So, using a SPRM as the source will probably have unpredictable results, and is probably never used. But it works, and therefore PgcEdit must support it (or you will have surprises when entering the command editor with such a command.)
Yes, it does work according to the DVD specs. :( Just another "legal" setup for failure in my opinion. :devil:

2COOL
27th October 2004, 22:32
Originally posted by 2COOL
2. From http://www.dvd-replica.com/DVD/cmpgprmops.php

I don't think you can use a SPRM to compare with another GPRM, SPRM, or a constant value. The first value must always be a GPRM. Show me a DVD that has a If-SPRM command as I have check through 5 DVDs so far and none have them. With this said, you have to redo alot of dialogs with these If-SPRM commands.
Originally posted by r0lZ
Again, this is not what is explained on the MPUCoder's site. But it's not verry clear...

Tested with IfoEdit, WinDVD, Sony and Kiss: it works perfectly! :) Well I've found some If-SPRM commands that are legal.

[00 A1 00 80 65 6E 00 0A] 1 if ( sprm(0:Preferred menu language) == 25966 ("en") ) then { Goto line 10 }
[00 A1 00 81 65 6E 00 0C] 2 if ( sprm(1:Audio stream number) == 25966 ("en") ) then { Goto line 14 }
[00 A1 00 82 65 6E 00 0B] 3 if ( sprm(2:Sub-picture stream number) == 25966 ("en") ) then { Goto line 18 }

It's just that it goes against Ralph LaBarge's book! :angry:

Maybe mpucoder can have a final say on this.

mpucoder
27th October 2004, 22:48
Both right.
Here's the problem - the "compare group" that Ralph refers to is what is known as the class 3 commands, those from 80 to DF. The "GoTo" group can indeed compare a GPRM or SPRM to a GPRM, SPRM, or constant.

2COOL
27th October 2004, 22:55
Originally posted by mpucoder
the "compare group" that Ralph refers to is what is known as the class 3 commands, those from 80 to DF.So if I do have a class 3 command, I "CAN'T" compare a SPRM to a GPRM, SPRM, or constant? Just asking a yes/no question.

mpucoder
27th October 2004, 23:07
As the book states, one operand must be a GPRM (look at byte 1 of a class 3, the upper nibble is the compare operation code, the lower nibble the register number - there's only room for 0-15). The other operand may be GPRM, SPRM, or constant.

So, your statement is almost correct. You can compare an SPRM to a GPRM, it's just that you must reverse the comparison to place the GPRM on the left.

2COOL
27th October 2004, 23:12
So these are legal?

[20 24 00 81 00 00 00 05] if ( sprm(1:Audio stream number) == gprm(0) ) then { LinkPGCN PGC 5 }

[D9 26 03 FF 81 00 10 00] if ( sprm(1:Audio stream number) == gprm(0) ) then { (CSetLnk) Set gprm(6) &=(and) 1023 } ; LinkNoLink, button 4 (4096)