CXML Containers

From PS3 Developer wiki
Revision as of 06:20, 14 June 2014 by Sandungas (talk | contribs) (moved from QRC front page)
Jump to navigation Jump to search

Description

Container Structure

XML implicit structure Overview

Container Common Structure

Main Header

The header contains an identifyer of the container (magic), his version, and allows to store the "absolute start offset" and "size" of 7 tables (or areas)

When a "not used table" is placed before a "used table"... the start offset of the "not used table" and his size (as zero) are stored in the main header to preserve his position in the structure. The "used table" that comes later starts in the same offset than the previouslly "not used table" (an intuitive way to think in this is imagining are overlapped because starts in the same position but only the one at the top is used)

  • The container format is generic (used also by .RAF and .P3T with some variations) so the usage of this tables can vary, in this example there are 3 "not used tables":
    • two of the "not used tables" (both at offset 0x460 with a size of 0) are placed before an used table (also at offset 0x460 but with a size of 0x23A0)
    • the other "not used table" is placed at the end, so there is no need to store his offset
  • Example from fw 3.55 rhm.qrc:
Offset(h) 00 01 02 03  04 05 06 07  08 09 0A 0B  0C 0D 0E 0F
00000000  51 52 43 46  00 00 01 10  00 00 00 40  00 00 02 CC  QRCF.......@..%|
00000010  00 00 03 10  00 00 01 2B  00 00 04 40  00 00 00 1B  ..%À......9Ð....
00000020  00 00 04 60  00 00 00 00  00 00 04 60  00 00 00 00  ..9ð......9ð....
00000030  00 00 04 60  00 00 23 A0  00 00 00 00  00 00 00 00  ..9ð..@p........
Name Offset Size Example Remark
Magic 0x00 0x04 51 52 43 46 'QRCF'
Version 0x04 0x04 00 00 01 10
Tree Table Offset 0x08 0x04 00 00 00 40
Tree Table Size 0x0C 0x04 00 00 02 CC
ID Table Offset 0x10 0x04 00 00 03 10
ID Table Size 0x14 0x04 00 00 01 2B
String Table Offset 0x18 0x04 00 00 04 40
String Table Size 0x1C 0x04 00 00 00 1B
Integer Array Offset 0x20 0x04 00 00 04 60 Overlapped
Integer Array size 0x24 0x04 00 00 00 00 Not used
Float Array Offset 0x28 0x04 00 00 04 60 Overlapped
Float Array Size 0x2C 0x04 00 00 00 00 Not used
File Table Offset 0x30 0x04 00 00 04 60 Overlaps the previous 2 tables
File Table Size 0x34 0x04 00 00 23 A0
Unknown Table Offset 0x38 0x04 00 00 00 00 Not present
Unknown Table Size 0x3C 0x04 00 00 00 00 Not Used
  • Notes
    • The sizes doesnt includes the (posible) padding at the end of all tables

Tree Table

Offset (without the 0x40 header in all qrc files) http://666kb.com/i/cib5c7q4y7rpcx9x1.gif

Same on all QRC's till offset 0x70

Offset Size Example Remark
0x00 0x08 00 00 00 00 00 00 00 00 similar all qrc files
0x08 0x08 FF FF FF FF FF FF FF FF similar all qrc files
0x10 0x04 FF FF FF FF similar all qrc files
0x14 0x04 00 00 00 1C similar all qrc files
0x18 0x04 00 00 00 1C similar all qrc files
0x1C 0x04 00 00 00 04 similar all qrc files
0x20 0x08 00 00 00 00 00 00 00 00 similar all qrc files
0x28 0x08 FF FF FF FF FF FF FF FF similar all qrc files
0x30 0x04 00 00 00 38 similar all qrc files: start offset Tree Table
0x34 0x04 xx xx xx xx size body Tree Table
0x38 0x04 00 00 00 0F similar all qrc files
0x3C 0x04 00 00 00 02 00 00 00 03 on icontex.qrc
0x40 0x04 00 00 00 1C similar all qrc files
0x44 0x04 FF FF FF FF similar all qrc files
0x48 0x04 00 00 00 74 00 00 00 84 on icontex.qrc : start offset of the Filename pointer entry inside ID Table
0x4C 0x08 FF FF FF FF FF FF FF FF similar all qrc files
0x54 0x04 00 00 00 14 similar all qrc files
0x58 0x04 00 00 00 06 similar all qrc files
0x5C 0x04 00 00 00 00 offset of first File Data
0x60 0x04 00 00 01 50 size of first File Data
0x64 0x04 00 00 00 18 similar all qrc files
0x68 0x04 00 00 00 07 similar all qrc files
0x6C 0x04 00 00 00 00 offset of first filename within the ID Table
0x70 0x04 00 00 00 00 on icontex here are additional 16 bytes
0x74 0x04 00 00 00 0F similar all qrc files
0x78 0x04 00 00 00 02 similar all qrc files
0x7C 0x04 00 00 00 1C similar all qrc files
0x80 0x04 00 00 00 38 Filename pointer of the first file for the ID Table
0x84 0x04 00 00 00 B0 start offset of the next entry for the Filename pointer within the ID Table

On icontex.qrc there are additional 16 bytes added on offset 0x70 within the Tree Table

Offset Size Example Remark
0x70 0x04 00 00 00 00 on icontex.qrc
0x74 0x04 00 00 00 1B on icontex.qrc
0x78 0x04 00 00 00 01 on icontex.qrc
0x7C 0x04 00 01 55 D4 on icontex.qrc (size of .dds uncompressed)
0x80 0x04 00 00 00 00 similar all qrc files
0x84 0x04 00 00 00 0F similar all qrc files
0x88 0x04 00 00 00 02 similar all qrc files
0x8C 0x04 00 00 00 1C similar all qrc files
0x90 0x04 00 00 00 38 Filename pointer of the first file for the ID Table
0x94 0x04 00 00 00 B0 start offset of the next entry for the Filename pointer within the Tree Table

Filenames List

This area is composed by a consecutive list of string entries that defines the names of the <file>'s inside <file-table> from the .xml file used to create the container

Every <file> inside <file-table> has assigned 2 attributes in the xml used to create the container: "src" (includes full path + file name + file extension), and "id" (only file name), plus the attribute "size" in QRCF_2 that is added by the program that creates the container ("size" is not present in the original .xml but added automatically when the container is created, this only happens in QRCF_2 and themes and is related with the per-file compression)

  • For QRCF_1 containers only is stored the "src" (the file "id" is missing althougth can be deduced from the "src")
  • For QRCF_2 and P3T themes only is stored the "id" (the file "src" is missing so there is no way to read the original path or file extension from the container)
Code Sample


For QRCF_1 each entry is composed by:

Offset Length Example Name Notes
0x0 0x4 00000038 Filename Table pointer Same value than in the Tree Table
0x4 variable lib/rhm/Clear.fpo File name stored in the .xml as "src"
variable 0x1 00 NULL byte
  • Notes
    • For QRCF_2 and themes the structure of an entry is the same, but instead of storing: lib/rhm/Clear.fpo (the file "src"), it should store: Clear (the file "id")
    • The end of the table has a padding to align to 0x10 bytes
    • About the name of this area... for QRCF_1 what is stored is the "src" of the file so we can name it "File SRC table" or "File SRC List", but QRCF_2 and themes stores the "id" of the file so we could name it "File ID table" or "File ID List", but later will be needed to move all this explanations of the structure to a new page and include RAF that is a bit unknown by now if it uses some specific names for storage types inside specific tables. By now we can use a generic name for this area that includes all them like "Filenames List" and decide later if is needed to use specific names

String Table

This area is composed by a consecutive list of all the tags (elements or attributes) from the xml that was used to create the container. Are stored "from-top-to-bottom" in the exact same order that they was ordered in the xml (althougth it looks in some cases the theme compiler reorders them to his convenience). This list doesnt makes differences of the "directory hierarchy" of the tags neither is specifyed if the tag is an element or an attribute (this parent-child hierarchy is defined in other place of the container by making references to this area by using "byte counters" to locate a tag)

In all the .qrc files (QRCF_1) except icontex.qrc (QRCF_2). The only difference is QRCF_2 adds the "size" to all the <file> elements (added by the container creator, related with the "per-file" compression)

Offset(h) 00 01 02 03  04 05 06 07  08 09 0A 0B  0C 0D 0E 0F
00000440  71 72 63 00  66 69 6C 65  2D 74 61 62  6C 65 00 66  qrc file-table f
00000450  69 6C 65 00  73 72 63 00  69 64 00 00  00 00 00 00  ile src id......
In icontex.qrc only (QRCF_2). This is similar than themes with the difference that QRC uses a <file-table> containing 1 or more <file>, and themes uses a <icontable> containing 1 or more <icon>

Offset(h) 00 01 02 03  04 05 06 07  08 09 0A 0B  0C 0D 0E 0F
00000440  71 72 63 00  66 69 6C 65  2D 74 61 62  6C 65 00 66  qrc file-table f
00000450  69 6C 65 00  73 72 63 00  69 64 00 73  69 7A 65 00  ile src id size.
  • Notes:
    • yellow: used bytes
    • red: padding to align to 0x10 bytes
    • The integer values and text strings of some attributes tags from the xml (e.g: "themename=mytheme", or "fontcolor=2") are stored in this area too at the right of his tag, the presence of an integer value displaces the next tag (this only happens in themes and rafs, not in QRC files so is added here as a note but is very important for the structure of the other containers when using "byte counters" to locate the tags)

File Table

The files are concatenated in the same order than in the Tree Table & ID Table

Summary

Table Description

First Element (in root of xml) Points to a Offset within Tree Table which represents a string

Last Element (in root of xml) Points to a Offset within Tree Table which represents a string

Element Pointer Points to a Offset within String Table which represents a string

Previous Element Points to a Offset within Tree Table which represents a string

Next Element Points to a Offset within Tree Table which represents a string

First Element

Last Element

Element Pointer

Attribute Counter Integer value which describe the amount of Attributes for the current processing Element

Parent Points to a Offset within Tree Table which represents a string and describe the Parent Element

Previous Element (also used as a 4 byte long value which points to a Filename within ID Table)

Next Element (also used as a 4 byte long value which points to a Filename within ID Table)

First Entry Points to a Offsset within Tree Table which describe the first file of current processing Element

Last Entry Points to a Offsset within Tree Table which describe the last file of current processing Element

Element Pointer

Typ Descriptor A Integer value which describe the Typ of the Attribute

Offset of Filedata A Integer value, points to a Offset within File Table which describe the Start of a File to read from

Size of Filedata A Integer value which describe the Length of the File to read from File Table

Element Pointer

Typ Descriptor

ID Offset A Integer value which describe the Offset of a Filename within ID Table

                    Tree Table of rhm.qrc                                                                             ID Table of rhm.qrc

 Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F                                         Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
 00000000  00 00 00 00 00 00 00 00 FF FF FF FF FF FF FF FF  ........ÿÿÿÿÿÿÿÿ                       00000000  00 00 00 38 6C 69 62 2F 72 68 6D 2F 43 6C 65 61  ...8lib/rhm/Clea
 00000010  FF FF FF FF 00 00 00 1C 00 00 00 1C 00 00 00 04  ÿÿÿÿ............                       00000010  72 2E 66 70 6F 00 00 00 00 74 6C 69 62 2F 72 68  r.fpo....tlib/rh
 00000020  00 00 00 00 00 00 00 00 FF FF FF FF FF FF FF FF  ........ÿÿÿÿÿÿÿÿ                       00000020  6D 2F 43 6C 65 61 72 2E 76 70 6F 00 00 00 00 B0  m/Clear.vpo....°
 00000030  00 00 00 38 00 00 02 90 00 00 00 0F 00 00 00 02  ...8............                       00000030  6C 69 62 2F 72 68 6D 2F 43 6F 70 79 2E 66 70 6F  lib/rhm/Copy.fpo
 00000040  00 00 00 1C FF FF FF FF 00 00 00 74 FF FF FF FF  ....ÿÿÿÿ...tÿÿÿÿ                       00000040  00 00 00 00 EC 6C 69 62 2F 72 68 6D 2F 64 65 66  ....ìlib/rhm/def
 00000050  FF FF FF FF 00 00 00 14 00 00 00 06 00 00 00 00  ÿÿÿÿ............                       00000050  61 75 6C 74 2E 66 70 6F 00 00 00 01 28 6C 69 62  ault.fpo....(lib
 00000060  00 00 01 50 00 00 00 18 00 00 00 07 00 00 00 00  ...P............                       00000060  2F 72 68 6D 2F 64 65 66 61 75 6C 74 2E 76 70 6F  /rhm/default.vpo
 00000070  00 00 00 00 00 00 00 0F 00 00 00 02 00 00 00 1C  ................                       00000070  00 00 00 01 64 6C 69 62 2F 67 6C 75 74 69 6C 73  ....dlib/glutils
 00000080  00 00 00 38 00 00 00 B0 FF FF FF FF FF FF FF FF  ...8...°ÿÿÿÿÿÿÿÿ                       00000080  2F 43 6F 6E 65 46 69 6C 74 65 72 2E 66 70 6F 00  /ConeFilter.fpo.
 00000090  00 00 00 14 00 00 00 06 00 00 01 50 00 00 00 E0  ...........P...à                       00000090  00 00 01 A0 6C 69 62 2F 67 6C 75 74 69 6C 73 2F  ....lib/glutils/
 000000A0  00 00 00 18 00 00 00 07 00 00 00 16 00 00 00 00  ................                       000000A0  43 6F 6E 65 46 69 6C 74 65 72 2E 76 70 6F 00 00  ConeFilter.vpo..
 000000B0  00 00 00 0F 00 00 00 02 00 00 00 1C 00 00 00 74  ...............t                       000000B0  00 01 DC 6C 69 62 2F 67 6C 75 74 69 6C 73 2F 43  ..Ülib/glutils/C
 000000C0  00 00 00 EC FF FF FF FF FF FF FF FF 00 00 00 14  ...ìÿÿÿÿÿÿÿÿ....                       000000C0  6F 6E 65 46 69 6C 74 65 72 53 69 6D 70 6C 65 2E  oneFilterSimple.
 000000D0  00 00 00 06 00 00 02 30 00 00 01 20 00 00 00 18  .......0........                       000000D0  66 70 6F 00 00 00 02 18 6C 69 62 2F 67 6C 75 74  fpo.....lib/glut
 000000E0  00 00 00 07 00 00 00 2C 00 00 00 00 00 00 00 0F  .......,........                       000000E0  69 6C 73 2F 53 63 72 65 65 6E 43 6F 70 79 2E 66  ils/ScreenCopy.f
 000000F0  00 00 00 02 00 00 00 1C 00 00 00 B0 00 00 01 28  ...........°...(                       000000F0  70 6F 00 00 00 02 54 6C 69 62 2F 67 6C 75 74 69  po....Tlib/gluti
 00000100  FF FF FF FF FF FF FF FF 00 00 00 14 00 00 00 06  ÿÿÿÿÿÿÿÿ........                       00000100  6C 73 2F 42 6C 75 72 32 2E 66 70 6F 00 00 00 02  ls/Blur2.fpo....
 00000110  00 00 03 50 00 00 01 F0 00 00 00 18 00 00 00 07  ...P...ð........                       00000110  90 6C 69 62 2F 67 6C 75 74 69 6C 73 2F 42 6C 75  .lib/glutils/Blu
 00000120  00 00 00 41 00 00 00 00 00 00 00 0F 00 00 00 02  ...A............                       00000120  72 32 4D 61 73 6B 2E 66 70 6F                    r2Mask.fpo
 00000130  00 00 00 1C 00 00 00 EC 00 00 01 64 FF FF FF FF  .......ì...dÿÿÿÿ
 00000140  FF FF FF FF 00 00 00 14 00 00 00 06 00 00 05 40  ÿÿÿÿ...........@
 00000150  00 00 08 10 00 00 00 18 00 00 00 07 00 00 00 59  ...............Y
 00000160  00 00 00 00 00 00 00 0F 00 00 00 02 00 00 00 1C  ................
 00000170  00 00 01 28 00 00 01 A0 FF FF FF FF FF FF FF FF  ...(....ÿÿÿÿÿÿÿÿ                                          String Table of rhm.qrc
 00000180  00 00 00 14 00 00 00 06 00 00 0D 50 00 00 05 50  ...........P...P                       Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
 00000190  00 00 00 18 00 00 00 07 00 00 00 71 00 00 00 00  ...........q....                       00000000  71 72 63 00 66 69 6C 65 2D 74 61 62 6C 65 00 66  qrc file-table f
 000001A0  00 00 00 0F 00 00 00 02 00 00 00 1C 00 00 01 64  ...............d                       00000010  69 6C 65 00 73 72 63 00 69 64 00 73 69 7A 65 00  ile src id size.
 000001B0  00 00 01 DC FF FF FF FF FF FF FF FF 00 00 00 14  ...Üÿÿÿÿÿÿÿÿ....
 000001C0  00 00 00 06 00 00 12 A0 00 00 03 D0 00 00 00 18  ...........Ð....
 000001D0  00 00 00 07 00 00 00 90 00 00 00 00 00 00 00 0F  ................
 000001E0  00 00 00 02 00 00 00 1C 00 00 01 A0 00 00 02 18  ................
 000001F0  FF FF FF FF FF FF FF FF 00 00 00 14 00 00 00 06  ÿÿÿÿÿÿÿÿ........
 00000200  00 00 16 70 00 00 01 C0 00 00 00 18 00 00 00 07  ...p...À........
 00000210  00 00 00 AF 00 00 00 00 00 00 00 0F 00 00 00 02  ...¯............
 00000220  00 00 00 1C 00 00 01 DC 00 00 02 54 FF FF FF FF  .......Ü...Tÿÿÿÿ
 00000230  FF FF FF FF 00 00 00 14 00 00 00 06 00 00 18 30  ...............0
 00000240  00 00 03 10 00 00 00 18 00 00 00 07 00 00 00 D4  ...............Ô
 00000250  00 00 00 00 00 00 00 0F 00 00 00 02 00 00 00 1C  ................
 00000260  00 00 02 18 00 00 02 90 FF FF FF FF FF FF FF FF  ........ÿÿÿÿÿÿÿÿ
 00000270  00 00 00 14 00 00 00 06 00 00 1B 40 00 00 04 20  ...........@....
 00000280  00 00 00 18 00 00 00 07 00 00 00 F3 00 00 00 00  ...........ó....
 00000290  00 00 00 0F 00 00 00 02 00 00 00 1C 00 00 02 54  ...............T
 000002A0  FF FF FF FF FF FF FF FF FF FF FF FF 00 00 00 14  ÿÿÿÿÿÿÿÿÿÿÿÿ....
 000002B0  00 00 00 06 00 00 1F 60 00 00 04 40 00 00 00 18  .......`...@....
 000002C0  00 00 00 07 00 00 01 0D 00 00 00 00              ............

Typ Description

Value Typ Notes
0x00000006 File Composed of Offset and Size each 4 bytes long
0x00000007 ID Composed of Offset and Size each 4 bytes long

The Typ File is used to descripe two integer values, the Offset and Size for a File which will be readed from File Table. The Typ ID is used to descripe the Offset of a Filename within the ID Table. The Size value from ID' seems not to be used in Containers.

Container Structure variations

QRC

QRCC

QRCC (Qt Resources Container Compressed)

QRC file ZLIB Compressed level 9.

  • Example from 3.55 rhm.qrc:
Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
00000000  51 52 43 43 00 00 28 00 78 DA                       QRCC..(.xÚ
Name Offset Size Example Remark
Magic 0x00 0x04 51 52 43 43 'QRCC'
QRCF decompressed size 0x04 0x04 00 00 28 00 The size of the QRCF file generated when a QRCC is decompressed
compressed QRCF 0x08 varies, up to the end of the QRCC file 78 DA... QRCF file start offset, compressed with ZLIB
  • Notes
    • The first 2 bytes of the compressed QRCF is the ZLIB header, in this example: 0x78DA
    • default/max level 9

QRCF

QRCF (Qt Resources Container Flat?)

P3T

P3TF

P3TF (Playstation 3 Theme Flat?)

Main Header

The header contains an identifyer of the container (magic), his version, and allows to store the "absolute start offset" and "size" of 7 tables (or areas)

When a "not used table" is placed before a "used table"... the start offset of the "not used table" and his size (as zero) are stored in the main header to preserve his position in the structure. The "used table" that comes later starts in the same offset than the previouslly "not used table" (an intuitive way to think in this is imagining are overlapped because starts in the same position but only the one at the top is used)

  • The container format is generic (used also by .RAF and .QRC with some variations) so the usage of this tables can vary, in this example there are 3 "not used tables":
    • two of the "not used tables" (both at offset 0x460 with a size of 0) are placed before an used table (also at offset 0x460 but with a size of 0x23A0)
    • the other "not used table" is placed at the end, so there is no need to store his offset
Offset(h) 00 01 02 03  04 05 06 07  08 09 0A 0B  0C 0D 0E 0F
00000000  50 33 54 46  00 00 01 10  00 00 00 40  00 00 02 CC  P3TF.......@..%|
00000010  00 00 03 10  00 00 01 2B  00 00 04 40  00 00 00 1B  ..%À......9Ð....
00000020  00 00 04 60  00 00 00 00  00 00 04 60  00 00 00 00  ..9ð......9ð....
00000030  00 00 04 60  00 00 23 A0  00 00 00 00  00 00 00 00  ..9ð..@p........
Name Offset Size Example Remark
Magic 0x00 0x04 51 52 43 46 'P3TF'
Version 0x04 0x04 00 00 01 10
Tree Table Offset 0x08 0x04 00 00 00 40
Tree Table Size 0x0C 0x04 00 00 02 CC
ID Table Offset 0x10 0x04 00 00 03 10
ID Table Size 0x14 0x04 00 00 01 2B
String Table Offset 0x18 0x04 00 00 04 40
String Table Size 0x1C 0x04 00 00 00 1B
Integer Array Offset 0x20 0x04 00 00 04 60 Overlapped
Integer Array size 0x24 0x04 00 00 00 00 Not used
Float Array Offset 0x28 0x04 00 00 04 60 Overlapped
Float Array Size 0x2C 0x04 00 00 00 00 Not used
File Table Offset 0x30 0x04 00 00 04 60 Overlaps the previous 2 tables
File Table Size 0x34 0x04 00 00 23 A0
Unknown Table Offset 0x38 0x04 00 00 00 00 Not present
Unknown Table Size 0x3C 0x04 00 00 00 00 Not Used
  • Notes
    • The sizes doesnt includes the (posible) padding at the end of all tables


Tree Table

Offset Size Example Remark
0x00 0x08 00 00 00 00 00 00 00 00 similar all p3t files
0x08 0x08 FF FF FF FF FF FF FF FF similar all p3t files
0x10 0x04 FF FF FF FF similar all p3t files
0x14 0x04 00 00 00 1C First Element within the root Element (p3t)
0x18 0x04 00 00 18 B4 Last Element within the root Element (p3t)
0x1C 0x04 00 00 00 06 First Element (Offset within String Table, in this case it will be <infotable>)
0x20 0x08 00 00 00 00 00 00 00 00 similar all p3t files
0x28 0x04 FF FF FF FF Previous ELement
0x2C 0x04 00 00 01 AC Next Element
0x30 0x04 00 00 00 38 First Entry
0x34 0x04 00 00 01 60 Last Entry
0x38 0x04 00 00 00 10 Element Pointer (Offset within String Table, in this case it will be <info>)
0x3C 0x04 00 00 00 0D Attribute Counter (0x0D == 13, the 13 Attributes of <info> Element)
0x40 0x04 00 00 00 1C Parent Element (Offset withing Tree Table, in this case it will be <infotable>)
0x44 0x04 FF FF FF FF Previous Element
0x48 0x04 00 00 01 24 Next Element
0x4C 0x04 FF FF FF FF First Entry
0x50 0x04 FF FF FF FF Last Entry


String Table

This area is composed by a consecutive list of all the tags (elements or attributes) from the xml that was used to create the container. Are stored "from-top-to-bottom" in the exact same order that they was ordered in the xml (althougth it looks in some cases the theme compiler reorders them to his convenience). This list doesnt makes differences of the "directory hierarchy" of the tags neither is specifyed if the tag is an element or an attribute (this parent-child hierarchy is defined in other place of the container by making references to this area by using "byte counters" to locate a tag)

Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
00000000  74 68 65 6D 65 00 69 6E 66 6F 74 61 62 6C 65 00  theme.infotable.
00000010  69 6E 66 6F 00 63 6F 6D 6D 65 6E 74 00 45 6E 6A  info.comment.Enj
00000020  6F 79 2E 00 70 72 65 76 69 65 77 73 69 7A 65 00  oy..previewsize.
00000030  6E 61 6D 65 00 48 45 41 56 59 20 52 61 69 6E 20  name.HEAVY.Rain.
00000040  74 68 65 6D 65 00 61 75 74 68 6F 72 00 51 75 61  theme.author.Qua
00000050  6E 74 69 63 44 72 65 61 6D 00 75 72 6C 00 68 74  nticDream.url.ht
00000060  74 70 3A 2F 2F 77 77 77 2E 71 75 61 6E 74 69 63  tp://www.quantic
00000070  64 72 65 61 6D 2E 63 6F 6D 00 61 75 74 68 6F 72  dream.com.author
00000080  69 63 6F 6E 73 69 7A 65 00 61 75 74 68 6F 72 69  iconsize.authori
00000090  63 6F 6E 00 69 63 6F 6E 73 69 7A 65 00 76 65 72  con.iconsize.ver
000000A0  73 69 6F 6E 00 76 65 72 73 69 6F 6E 20 31 2E 30  sion.version.1.0
000000B0  00 6D 74 69 6D 65 00 32 30 30 39 31 30 33 30 31  .mtime.200910301
000000C0  36 31 33 34 33 00 67 65 6E 72 65 00 6F 74 68 65  61343.genre.othe
000000D0  72 73 00 70 72 65 76 69 65 77 00 69 63 6F 6E 00  re.preview.icon.
000000E0  6C 6F 63 61 6C 69 7A 65 64 69 6E 66 6F 00 6C 6F  localizedinfo.lo
000000F0  63 61 6C 65 00 E3 81 93 E3 82 8C E3 81 AF E3 82  cale.これはã‚
00000100  B5 E3 83 B3 E3 83 97 E3 83 AB E3 83 86 E3 83 BC  µãƒ³ãƒ—ルテー
00000110  E3 83 9E E3 83 95 E3 82 A1 E3 82 A4 E3 83 AB E3  マファイルã
00000120  81 A7 E3 81 99 E3 80 82 00 69 63 6F 6E 74 61 62  §ã™ã€‚.icontab
00000130  6C 65 00 73 72 63 00 69 64 00 73 69 7A 65 00 70  le.src.id.size.p
00000140  6F 69 6E 74 65 72 74 61 62 6C 65 00 70 6F 69 6E  ointertable.poin
00000150  74 65 72 00 62 61 73 65 5F 78 00 62 61 73 65 5F  ter.base_X.base_
00000160  79 00 6E 6F 74 69 66 69 63 61 74 69 6F 6E 00 62  y.notification.b
00000170  67 69 6D 61 67 65 74 61 62 6C 65 00 62 67 69 6D  gimagetable.bgim
00000180  61 67 65 00 61 6E 69 6D 00 66 6F 6E 74 00 73 65  age.anim.font.se
00000190  6C 65 63 74 69 6F 6E 00 63 6F 6C 6F 72 00 00 00  lection.color
  • Notes:
    • yellow: used bytes
    • red: padding to align to 0x10 bytes
    • The integer values and text strings of some attributes tags from the xml (e.g: "themename=mytheme", or "fontcolor=2") are stored in this area too at the right of his tag, the presence of an integer value displaces the next tag (this only happens in themes and rafs, not in QRC files so is added here as a note but is very important for the structure of the other containers when using "byte counters" to locate the tags)


ID Table

The ID Table of a P3T also can hold additional information for the <localizedinfo> Element.

Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
00000000  00 00 01 24 65 6E 00 00 00 01 60 6A 70 00 00 00  ...$en....`jp...
00000010  01 C8 69 63 6F 6E 5F 75 73 65 72 00 00 00 02 14  .Èicon_user.....
00000020  69 63 6F 6E 5F 73 65 74 74 69 6E 67 00 00 00 02  icon_setting....
00000030  60 69 63 6F 6E 5F 70 68 6F 74 6F 00 00 00 02 AC  `icon_photo....¬
00000040  69 63 6F 6E 5F 6D 75 73 69 63 00 00 00 02 F8 69  icon_music....øi
00000050  63 6F 6E 5F 76 69 64 65 6F 00 00 00 03 44 69 63  con_video....Dic
00000060  6F 6E 5F 67 61 6D 65 00                          on_game


File Table

The files are not concatenated in the same order than in the Tree Table & ID Table. There are even some file within the File Table which are not contained in ID Table(anim.raf, authoricon, ect.,...).

RAF

Examples

QRC

P3T

RAF

Tools

. .. ...