Matthew
6th February 2006, 08:07
I'm writing a cli app for personal use that will dump the palette for a PGC in an ifo in its native format, or overwrite the palette of an authored IFO with one supplied.
Here is the process I am using to get the start of the colour values for PGC N:
-Seek to byte 204
-Read the following 4 bytes to get the sector pointer to VTS_PGCITI
-Multiple above value by 2048 to get the start byte of VTS_PGCITI - say X
-Seek to byte X + 8 + ((N - 1) * 8) + 4
-Read the following 4 bytes to get the start byte of PGC N - say Y.
Then it's a case of dumping the 64 bytes from X+Y+164+1, or alternatively replacing those bytes with the values in an input file.
Does this sound right? I was wondering, for example, if it's possible for the PGC order at the top of VTS_PGCITI to be nonsequential, in which case I could get the colours for the wrong PGC.
Here is the process I am using to get the start of the colour values for PGC N:
-Seek to byte 204
-Read the following 4 bytes to get the sector pointer to VTS_PGCITI
-Multiple above value by 2048 to get the start byte of VTS_PGCITI - say X
-Seek to byte X + 8 + ((N - 1) * 8) + 4
-Read the following 4 bytes to get the start byte of PGC N - say Y.
Then it's a case of dumping the 64 bytes from X+Y+164+1, or alternatively replacing those bytes with the values in an input file.
Does this sound right? I was wondering, for example, if it's possible for the PGC order at the top of VTS_PGCITI to be nonsequential, in which case I could get the colours for the wrong PGC.