Log in

View Full Version : Interpreting (to change) pre and post commands


farmer dan
13th October 2003, 01:07
I'm trying to create a multiple titleset--almost from scratch. Rather than look around in various movies for the "right" pre- and post- commands, I'd like to be able to just read them and follow the command logic and, therefore, be able to write my own.

Consider the following command:

If GPreg<5>==(cmp-val<1>then (link PGCN) Link PGC 8
Here's the hex: 20 a4 00 05 01 00 08

Question 1: If I change this to 20 04 00 00 00 00 08, would the command then link directly to PGC-8 regardless of the value of any registers?

Question 2: If I change it to 21 04 00 05 01 00 08, would the command set the GPR value to 1 and then link to PGC-8?

Also, mpucoder's Virtual Machine Insruction Summary says that 6x xx and 7x xx commands set the values of GPRM's. What is the difference between using 6x xx and 7x xx formats?

One last question :rolleyes: Mpucoder, on his website, gives a really good diagram of what commands are allowed from what domains. Are domains defined by the IFO's? For example, is VIDEO_TS one domain, VTS_01_0 another and VTS_02_ 0 yet a third? AND are the menus another domain that are subsets of the VMG and the VTS's?

dnl479
14th October 2003, 07:18
Question 1: If I change this to 20 04 00 00 00 00 08, would the command then link directly to PGC-8 regardless of the value of any registers?

Answer: Yes, Link PGC 8 [20 04 00 00 00 00 00 08], note 8 bytes.

Question 2: If I change it to 21 04 00 05 01 00 08, would the command set the GPR value to 1 and then link to PGC-8?

Answer: You seem to lose one byte in the above command. Each VM command takes 8 bytes. Anyway the correct formats are as following:
1) Set GPRM immediate and link PGC [71 04 00 GG XX XX 00 PP]
where GG is the GPRM, XX XX is a 16-bit immediate, and PP is the PGC.
For example, Set GPRM5 to 256 and Link PGC 8 [71 04 00 05 01 00 00 08]

2) Set GPRM with other GPRM and link PGC [61 04 00 GG 00 GG 00 PP]
where the first GG is the destination GPRM.
For example, Set GPRM1 with GPRM5 and Link PGC 8 [61 04 00 01 00 05 00 08]

3) Set GPRM with other SPRM and link PGC [61 04 00 GG 00 SS 00 PP]
where SS is the system register (the 8th bit is set).
For example, Set GPRM1 with SPRM5 and Link PGC 8 [61 04 00 01 00 85 00 08]

7x is for immediate mode while 6x is for register mode.

The DVD specifications define four domains: First-Play (FP), Video Manager (VMG), Video Title Set (VTS), and Video Title Set Menu (VTSM).

The VMG domain is VIDEO_TS.IFO + VIDEO_TS.VOB + VIDEO_TS.BUP
FP domain is meaningful for the first-play PGC in VIDEO_TS.IFO/BUP.

The VTS domain is VTS_XX_0.IFO + VTS_XX_n.VOB + VTS_XX_0.BUP
where XX is 1-99 and n is 1-9.
The VTSM domain is VTS_XX_0.IFO/BUP

Commands within VTS/VTSM cannot link to other VTS/VTSM (domains). The only way is to route through the VMG or FP domain.

Hope this helps. I am working on my new web site at http://www.dvd-replica.com so visit often for authoring tips.

maa
14th October 2003, 09:34
Thanks thats very usefull.

Answer: Yes, Link PGC 8 [20 04 00 00 00 00 00 08], note 8 bytes.
I don't get the bytes stuff - how do I see 8 bytes there ?

Crazyjoe
14th October 2003, 18:09
Originally posted by maa
Thanks thats very usefull.

I don't get the bytes stuff - how do I see 8 bytes there ?

[20 04 00 00 00 00 00 08]

20 = Byte 1
04 = Byte 2
...
08 = Byte 8

This is hexadecimal notation. :)

Lord of the Discs
15th October 2003, 14:15
11111111=FF=255

maa
15th October 2003, 15:13
Ok, to add some clarity - 8 double digits means 8 bytes right ?

LOD - your post is a little thin, what are you trying to say ?

farmer dan
17th October 2003, 21:30
Thanks for all the info. I have just scanned it now. Been gone on business. Computer is "sick" also. Will read more thoroughly later. Just wanted everyone to know I appreciate responses.

farmer dan
18th October 2003, 19:20
maa wrote:
Ok, to add some clarity - 8 double digits means 8 bytes right ?I think that essentially your deduction is correct. ONE group of TWO digits is equivalent to ONE byte. However, and I'll need a more informed observation than my own, I think we have interchanged two words. Bits and bytes. My understanding was that the "hex command" addressed 8 bits--one byte. :confused: If this is not correct I would appreciate being straightened out.

dnl479, you are correct:
You seem to lose one byte in the above command. I missed a 00 when I transcribed. Hopefully this didn't create too much confusion. I still have a question for you, though. You said: 7x is for immediate mode while 6x is for register mode. I'm looking for a "real world" analogy. Would I use 7x when I want the GRPM changed and the command executed right now with no obvious delay while the DVD is playing and use 6x while the player is searching around for something to do?

Thanks for the help.

farmer dan
19th October 2003, 22:16
I was wrong. They're really bytes not bits. That's good since I don't have any kibbles to go with them.:rolleyes: :D :cool: