Editing CXML Containers

Jump to navigation Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
=Description=
=Description=
[[Qt Resource Container (QRC)|.QRC]], [[PlayStation 3 Theme (P3T)|.P3T]], and [[Rich Appearance Format (RAF)|.RAF]] (in order of complexity from easier to harder) and '''.CXML''' file extensions uses the same container, and are able to use zlib compression, but the zlib compression method and the structure of the container has several variations:
[[Qt Resource Container (QRC)|.QRC]], [[PlayStation 3 Theme (P3T)|.P3T]], and [[Rich Appearance Format (RAF)|.RAF]] (in order of complexity from easyer to harder) and '''.CXML''' file extensions uses the same container, and are able to use zlib compression, but the zlib compression method and the structure of the container has several variations:


The only way to identify accurate the exact container type is by reading the texts in the "strings table" (are tags and some of his values from the .xml file that was used to build the container) that are related with the building process and defines his internal structure, but their names are too long to use when talking about them
The only way to identity accuratelly the exact container type is by reading the texts in the "strings table" (are tags and some of his values from the .xml file that was used to build the container) that are related with the building process and defines his internal structure, but his names are too long to use when talking about them


*'''For QRC there are 2 basic variations:''' (both of them uses zlib compression, and only contains a "file-table" with "files")
*'''For QRC there are 2 basic variations:''' (both of them uses zlib compression, and only contains a "file-table" with "files")
**'''QRCC''' - (used by all .qrc files except icontex.qrc) - zlib compression is applied over the whole .qrc file (except his first 8 bytes that are info for the decompression), after decompression the file generated is a QRCF and the internal container structure can be readed (QRCC always contains a QRCF that is the real container)
**'''QRCC''' - (used by all .qrc files except icontex.qrc) - zlib compression is applyed over the whole .qrc file (except his first 8 bytes that are info for the decompression), after decompression the file generated is a QRCF and the internal container structure can be readed (QRCC always contains a QRCF that is the real container)
**'''QRCF''' - (used only by icontex.qrc) - zlib compression is applied per-file over each contained file (the container structure can be read directly and every one of the files inside the container structure is compressed individually)
**'''QRCF''' - (used only by icontex.qrc) - zlib compression is applyed per-file over each contained file (the container structure can be readed directlly and every one of the files inside the container structure is compressed individually)


*For this reason is not possible to identify the 2 variations of QRC by reading his magic (both are QRCF) but his structure is different, so is needed to use unofficial names to identify them and to be able to explain his variations here in wiki, the proposed names used in this page are:
*For this reason is not posible to identify the 2 variations of QRC by reading his magic (both are QRCF) but his structure is different, so is needed to use unnofficial names to identify them and to be able to explain his variations here in wiki, the proposed names used in this page are:
**'''QRCF_1''' (the most common and older... used by all .qrc's except icontext.qrc)
**'''QRCF_1''' (the most common and older... used by all .qrc's except icontext.qrc)
**'''QRCF_2''' (the less common and newer... used only by icontex.qrc)
**'''QRCF_2''' (the less common and newer... used only by icontex.qrc)
Line 14: Line 14:
*'''For P3T there are lot of posible variations:'''
*'''For P3T there are lot of posible variations:'''
**The internal structure is dependant of the items included in the theme... some of them can be icons (to be stored inside an icontable) and others can be a wallpaper, the mouse pointers (stored in a pointertable), navigation sounds (stored in a se table), etc...
**The internal structure is dependant of the items included in the theme... some of them can be icons (to be stored inside an icontable) and others can be a wallpaper, the mouse pointers (stored in a pointertable), navigation sounds (stored in a se table), etc...
**Is possible to create themes with the official theme compiler tool with all this items, or only a few of them (e.g: a theme containing only 1 icon... or a theme containing only the name of the theme), this frankenstein themes are really useful for understanding the structure as you can see in this examples ---> https://www.sendspace.com/file/5suokd
**Is posible to create themes with the official theme compiler tool with all this items, or only a few of them (e.g: a theme containing only 1 icon... or a theme containing only the name of the theme), this frankenstein themes are really usefull for understanding the structure as you can see in this examples ---> https://www.sendspace.com/file/5suokd


*'''For RAF seems is posible a lot of variations too'''
*'''For RAF seems is posible a lot of variations too'''
**RAF's are used for the animation scene inside dynamic themes, when using them this way it seems the contents is restricted to a list of contained files, but raf is also used in the animation when PS3 boots (coldboot.raf) and although his format is pretty similar than the background of a theme is possible to include multiple files of different types inside the container
**RAF's are used for the animation scene inside dynamic themes, when using them this way it seems the contents is restricted to a list of contained files, but raf is also used in the animation when PS3 boots (coldboot.raf) and althought his format is pretty similar than the background of a theme is posible to include multiple files of different types inside the container


All this variations are confusing and hard to explain in the page, but is needed to find a way to represent them as the basic layouts that the firmware expects to find inside the container
All this variations are confusing and hard to explain in the page, but is needed to find a way to represent them as the basic layouts that the firmware expects to find inside the container
Line 45: Line 45:
};
};


struct ChildElementBin
struct ElementBin
{
{
int name;
int name;
Line 55: Line 55:
int last_child;
int last_child;
};
};
       
 
        struct BrotherElementBin
{
int name;
int attr_num;
int parent;
int prev;
int next;
};
       
struct AttributeBin
struct AttributeBin
{
{
                int INTEGER = 1;
                int FLOAT = 2;
                int STRING = 3;
                int INTEGER_ARRAY = 4;
                int FLOAT_ARRAY = 5;
                int DATA = 6;
                int ID_REF = 7;
                int ID_NO_REF = 8;
int name;
int name;
int type;
int type;
Line 186: Line 169:


===Element===
===Element===
{| class="wikitable" style="text-align:center;"
|+ CXML Child Element definition
! Offset !! Length !! usage
|-
| 0x00 || 0x04 || Element name relative offset in '''TAGS Table'''
|-
| 0x04 || 0x04 || Number of attributes in '''TOC'''
|-
| 0x08 || 0x04 || Parent relative offset in '''TOC'''
|-
| 0x0C || 0x04 || Previous Brother relative offset in '''TOC'''
|-
| 0x10 || 0x04 || Next Brother relative offset in '''TOC'''
|-
| 0x14 || 0x04 || First Child relative offset in '''TOC'''
|-
| 0x18 || 0x04 || Last Child relative offset in '''TOC'''
|}


{| class="wikitable" style="text-align:center;"
===Attribute===
|+ CXML Brother Element definition
 
! Offset !! Length !! usage
{| class="wikitable"
|+ Attribute types structure
! rowspan=2 | Offset !! rowspan=2 | Length !! rowspan=2 | Name !! colspan=8 | Attribute type
|-
|-
| 0x00 || 0x04 || Element name relative offset in '''TAGS Table'''
! Integer !! Float !! String !! Not Found Yet !! Not Identified Yet !! File !! ID with ref !! ID without ref
|-
|-
| 0x04 || 0x04 || Number of attributes in '''TOC'''
| 0x0 || 0x4 || Attribute name offset || colspan=8 {{cellcolors|lightgrey}}  '''________________________________________________ xml tag string from the "strings table" ____________________________________________'''
|-___
| 0x4 || 0x4 || Attribute type || 1 || 2 || 3 || 4 || 5 || 6 || 7 || 8
|-
|-
| 0x08 || 0x04 || Parent relative offset in '''TOC'''
| 0x8 || 0x4 || variable 1 || Integer value || Float value || String Offset ||  || varies (small numbers) || File offset || Filename offset || Filename offset
|-
|-
| 0x1C || 0x04 || Previous Brother relative offset in '''TOC'''
| 0xC || 0x4 || variable 2 || unknown (usually 0) || unknown (usually 0) || String Length ||  || varies (small numbers) || File size || unknown (usually 0) || unknown (usually 0)
|-
| 0x10 || 0x04 || Next Brother relative offset in '''TOC'''
|}
|}
*NOTE: The '''Child Element''' defination describe the Child Element and his Attributes where the '''Brother Element''' describe the Brother Element and his Attributes.
So the full order to read will be '''Child Element''' >>> '''Attributes''', '''Brother Element''' >>> '''Attributes'''. The Root (so offset 0x00) of any SonyPlaystation Resource file always start's with a '''Child Element''' to read.


===Attribute===
==Container Common Structure==
{| class="wikitable" style="text-align:center;"
|+ CXML Attribute definitions
! Attribute name<BR />(offset 0x0, length 0x4)
| colspan=8 | Attribute name relative offset in '''TAGS Table'''
|-
! Attribute type<BR />(offset 0x4, length 0x4)
! 1<BR />(Single Integer) !! 2<BR />(Single Float) !! 3<BR />(String) !! 4<BR />(Integer Array) !! 5<BR />(Float Array) !! 6<BR />(File) !! 7<BR />(ID with loopback ref) !! 8<BR />(ID with crossed loopback ref)
|-
! variable 1<BR />(offset 0x8, length 0x4)
| Integer value || Float value || '''TAGS Table''' offset || '''Integer Arrays Table''' offset || '''Float Arrays Table''' offset || '''Files Table''' offset || '''Strings Table''' offset || '''Strings Table''' offset
|-
! variable 2<BR />(offset 0xC, length 0x4)
| {{cellcolors|#ffaaaa}} Not used <abbr title="(always 0 in the samples found)">(always 0)</abbr> || {{cellcolors|#ffaaaa}} Not used <abbr title="(always 0 in the samples found)">(always 0)</abbr> || String length || Number of integer's to read || Number of float's to read || File size || {{cellcolors|#ffaaaa}} Not used <abbr title="(always 0 in the samples found)">(always 0)</abbr> || {{cellcolors|#ffaaaa}} Not used <abbr title="(always 0 in the samples found)">(always 0)</abbr>
|}


*Attribute types 1 and 2 are the only ones that stores the value inside the attribute definition itself (from the point of view of code are defined and given a value at the same time, from the point of view of the structure can be said the value is "embedded" in the cxml TOC). Attributes 1 and 2 doesnt accesses any of the other tables of the cxml structure
===Main Header===
*Attribute types 4 and 5 stores an array of values inside an "arrays table". This tables stores multiples arrays in a special format intended to reduce the final size of the table by avoiding duplicated arrays inside it. To recover a single array from a "arrays table" attributes types 4 and 5 specifyes a position in the table by the "offset" (where the array we are trying to recover begins) and the "number" (of consecutive items that composes the array we are trying to recover) <!-- this arrays table access needs a better explain anyway, because is important to know how works the build process that removes duplicated values -->
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)
*Attribute type 7 stores a string in the "strings table", in this table next to the string we are trying to recover is defined an offset that "loops back" to the element that owns the attribute.
**Example: in [http://www.psdevwiki.com/ps3/CXML_Containers#QRC_2 rhm.qrc v1.00] the first "file" element of the TOC (at offset 0x78) has 2 attributes: "src" (at offset 0x94) is a type 6 attribute, and "id" (at offset 0xA4) is a type 7 attribute, "src" points to the "file table" and defines the file by his offset and size (this way you know where is the file, no mistery with attribute type 6). And "id" points to the string table at offset 0x1B0. If you look in the string table, the first string has an offset that points back to the "file" element in the TOC at offset 0x78 (in the runtime we have readed the definition of the element "file" in the TOC----> then the attribute id with the string---> then back to the TOC to the same "file" element so we can read all his attributes again).
**The purpose of this pointer that returns back from the strings table ---> to the TOC is a bit unknown, seems to be related with the other attributes owned by the same element and the way how the structure is accessed in the runtime (maybe the system does a loop to access every one of the attributes that belongs to an element). This special feature is what has been named in the wiki page before as "ID with ref" (and "ID without ref" for att type 8 <strike>because doesnt have it</strike>), now we are using too the concept of loops, loopback, and crossed loopbacks, but in my oppinion the names of attibute types 7 and 8 cant be decided yet because we dont know exactly what is the purpose of it (is hard to give it a name before knowing exactly how it works)


==Container Common Structure==
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)
===QRC===
ZLIB Compressed level 9 (only container)


==== QRCC ====
*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":
QRCC ('''Q'''t '''R'''esources '''C'''ontainer '''C'''ompressed)
**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


In the practise and from the point of view of the system, the QRCC has no interest and is needed to decompress the whole QRCC to be able to read the internal structure of the container and to acess individual files, when a QRCC is decompressed it generates an QRCF file (the real container) but this QRCF has a different internal structure than the QRCF used by icontex.qrc (are 2 variations of the same container with some small differences... although both uses the same identifier QRCF)
*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'''
*Example from 3.55 rhm.qrc:
  '''00000000'''  <span style="background:#666666;">51 52 43 46</span>  <span style="background:#888888;">00 00 01 10</span>  <span style="background:#dddd66;">00 00 00 40</span>  <span style="background:#ffff88;">00 00 02 CC</span>  QRCF.......@..%|
  '''Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F'''
'''00000010'''  <span style="background:#dd6666;">00 00 03 10</span>  <span style="background:#ff8888;">00 00 01 2B</span>  <span style="background:#66dddd;">00 00 04 40</span>  <span style="background:#88ffff;">00 00 00 1B</span>  ..%À......9Ð....
  '''00000000'''  <span style="background:#ff6666;">51 52 43 43</span> <span style="background:#8888ff;">00 00 28 00</span> <span style="background:#00ff00;">78 DA</span>                       QRCC..(.
'''00000020'''  <span style="background:#66dd66;">00 00 04 60</span>  <span style="background:#88ff88;">00 00 00 00</span>  <span style="background:#dd66dd;">00 00 04 60</span>  <span style="background:#ff88ff;">00 00 00 00</span>  ..9ð......9ð....
'''00000030'''  <span style="background:#6666dd;">00 00 04 60</span> <span style="background:#8888ff;">00 00 23 A0</span>  <span style="background:#aee2ae;">00 00 00 00</span> <span style="background:#cef2ce;">00 00 00 00</span> ..9ð..@p........


{| class="wikitable"
{| class="wikitable"
Line 261: Line 209:
! Name !! Offset !! Size !! Example !! Remark
! Name !! Offset !! Size !! Example !! Remark
|-
|-
| Magic || 0x00 || 0x04 || {{cellcolors|#ff6666}} 51 52 43 43 || 'QRCC'
| Magic || 0x00 || 0x04 || {{cellcolors|#666666|#ffffff}} 51 52 43 46 || 'QRCF'
|-
|-
| QRCF decompressed size || 0x04 || 0x04 || {{cellcolors|#8888ff}} 00 00 28 00 || The size of the QRCF file generated when a QRCC is decompressed
| Version || 0x04 || 0x04 || {{cellcolors|#888888|#ffffff}} 00 00 01 10 ||
|-
|-
| compressed QRCF || 0x08 || ''varies, up to the end of the QRCC file'' || {{cellcolors|#00FF00}} 78 DA... || QRCF file start offset, compressed with ZLIB
| Tree Table Offset || 0x08 || 0x04 || {{cellcolors|#dddd66}} 00 00 00 40 ||
|-
| Tree Table Size || 0x0C || 0x04 || {{cellcolors|#ffff88}} 00 00 02 CC ||
|-
| ID Table Offset || 0x10 || 0x04 || {{cellcolors|#dd6666}} 00 00 03 10 ||
|-
| ID Table Size || 0x14 || 0x04 || {{cellcolors|#ff8888}} 00 00 01 2B ||
|-
| String Table Offset || 0x18 || 0x04 || {{cellcolors|#66dddd}} 00 00 04 40 ||
|-
| String Table Size || 0x1C || 0x04 || {{cellcolors|#88ffff}} 00 00 00 1B ||
|-
| Integer Array Offset || 0x20 || 0x04 || {{cellcolors|#66dd66}} 00 00 04 60 || Overlapped
|-
| Integer Array size || 0x24 || 0x04 || {{cellcolors|#88ff88}} 00 00 00 00 || Not used
|-
| Float Array Offset || 0x28 || 0x04 || {{cellcolors|#dd66dd}} 00 00 04 60 || Overlapped
|-
| Float Array Size || 0x2C || 0x04 || {{cellcolors|#ff88ff}} 00 00 00 00 || Not used
|-
| File Table Offset || 0x30 || 0x04 || {{cellcolors|#6666dd}} 00 00 04 60 || Overlaps the previous 2 tables
|-
| File Table Size || 0x34 || 0x04 || {{cellcolors|#8888ff}} 00 00 23 A0 ||
|-
| ''Unknown Table Offset'' || 0x38 || 0x04 || {{cellcolors|#aee2ae}} 00 00 00 00 || Not present
|-
| ''Unknown Table Size'' || 0x3C || 0x04 || {{cellcolors|#cef2ce}} 00 00 00 00 || Not Used
|-
|-
|}
|}


*Notes
*Notes
**The first 2 bytes of the compressed QRCF is the ZLIB header, being the default/max level 9.
**The sizes doesnt includes the (posible) padding at the end of all tables


<small>
===Tree Table===
{{Zlib Header}}
Offset (without the 0x40 header in all qrc files)
</small>
http://666kb.com/i/cib5c7q4y7rpcx9x1.gif
 
==== QRCF ====
QRCF ('''Q'''t '''R'''esources '''C'''ontainer '''F'''lat?)
 
===Main Header===
The header contains an identifier 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 previously "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'''  <span style="background:#666666;">51 52 43 46</span>  <span style="background:#888888;">00 00 01 10</span>  <span style="background:#dddd66;">00 00 00 40</span>  <span style="background:#ffff88;">00 00 02 CC</span>  QRCF.......@..%|
'''00000010'''  <span style="background:#dd6666;">00 00 03 10</span>  <span style="background:#ff8888;">00 00 01 2B</span>  <span style="background:#66dddd;">00 00 04 40</span>  <span style="background:#88ffff;">00 00 00 1B</span>  ..%À......9Ð....
'''00000020'''  <span style="background:#66dd66;">00 00 04 60</span>  <span style="background:#88ff88;">00 00 00 00</span>  <span style="background:#dd66dd;">00 00 04 60</span>  <span style="background:#ff88ff;">00 00 00 00</span>  ..9ð......9ð....
'''00000030'''  <span style="background:#6666dd;">00 00 04 60</span>  <span style="background:#8888ff;">00 00 23 A0</span>  <span style="background:#aee2ae;">00 00 00 00</span>  <span style="background:#cef2ce;">00 00 00 00</span>  ..9ð..@p........


Same on all QRC's till offset 0x70
{| class="wikitable"
{| class="wikitable"
! Offset !! Size !! Example !! Remark
|-
|-
! Name !! Offset !! Size !! Example !! Remark
| 0x00 || 0x04 || 00 00 00 00 || Root Element (Offset within '''String Table''', in this case it will be <qrc>)
|-
|-
| Magic || 0x00 || 0x04 || {{cellcolors|#666666|#ffffff}} 51 52 43 46 || 'QRCF'
| 0x04 || 0x04 || 00 00 00 00 || Attribute Counter
|-
|-
| Version || 0x04 || 0x04 || {{cellcolors|#888888|#ffffff}} 00 00 01 10 || CXML version '1.10'
| 0x08 || 0x04 || FF FF FF FF  || Parent
|-
|-
| Tree Table Offset || 0x08 || 0x04 || {{cellcolors|#dddd66}} 00 00 00 40 ||  
| 0x0C || 0x04 || FF FF FF FF || Previous Element
|-
|-
| Tree Table Size || 0x0C || 0x04 || {{cellcolors|#ffff88}} 00 00 02 CC ||  
| 0x10 || 0x04 || FF FF FF FF || Next Element
|-
|-
| ID Table Offset || 0x10 || 0x04 || {{cellcolors|#dd6666}} 00 00 03 10 ||
| 0x14 || 0x04 || 00 00 00 1C || First Entry within the root Element (qrc)
|-
|-
| ID Table Size || 0x14 || 0x04 || {{cellcolors|#ff8888}} 00 00 01 2B ||  
| 0x18 || 0x04 || 00 00 00 1C || Last Entry within the root Element (qrc)
|-
|-
| String Table Offset || 0x18 || 0x04 || {{cellcolors|#66dddd}} 00 00 04 40 ||
| 0x1C || 0x04 || 00 00 00 04 || String Pointer (Offset within '''String Table''', in this case it will be <file-table>)
|-
|-
| String Table Size || 0x1C || 0x04 || {{cellcolors|#88ffff}} 00 00 00 1B ||  
| 0x20 || 0x04 || 00 00 00 00 || Attribute Counter
|-
|-
| Integer Array Offset || 0x20 || 0x04 || {{cellcolors|#66dd66}} 00 00 04 60 || Overlapped
| 0x24 || 0x04 || 00 00 00 00 || Parent
|-
|-
| Integer Array size || 0x24 || 0x04 || {{cellcolors|#88ff88}} 00 00 00 00 || Not used
| 0x28 || 0x04 || FF FF FF FF || Previous Element
|-
|-
| Float Array Offset || 0x28 || 0x04 || {{cellcolors|#dd66dd}} 00 00 04 60 || Overlapped
| 0x2C || 0x04 || FF FF FF FF || Next Element
|-
|-
| Float Array Size || 0x2C || 0x04 || {{cellcolors|#ff88ff}} 00 00 00 00 || Not used
| 0x30 || 0x04 || 00 00 00 38 || First Entry
|-
|-
| File Table Offset || 0x30 || 0x04 || {{cellcolors|#6666dd}} 00 00 04 60 || Overlaps the previous 2 tables
| 0x34 || 0x04 || xx xx xx xx || Last Entry
|-
|-
| File Table Size || 0x34 || 0x04 || {{cellcolors|#8888ff}} 00 00 23 A0 ||
| 0x38 || 0x04 || 00 00 00 0F || String Pointer (Offset within '''String Table''', in this case it will be a Element <file>)
|-
|-
| ''Unknown Table Offset'' || 0x38 || 0x04 || {{cellcolors|#aee2ae}} 00 00 00 00 || Not present
| 0x3C || 0x04 || 00 00 00 02 || Attribute Counter (0x02 == 2, the 2 Attributes of <file> Element)
|-
|-
| ''Unknown Table Size'' || 0x3C || 0x04 || {{cellcolors|#cef2ce}} 00 00 00 00 || Not Used
| 0x40 || 0x04 || 00 00 00 1C || Parent Element (Offset within '''Tree Table''', in this case it will be <file-table>)
|-
|-
|}
| 0x44 || 0x04 || FF FF FF FF || Previous Element
 
*Notes
**The sizes doesn't includes the (possible) 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
{| class="wikitable"
! Offset !! Size !! Example !! Remark
|-
|-
| 0x00 || 0x04 || 00 00 00 00 || Root Element (Offset within '''String Table''', in this case it will be <qrc>)
| 0x48 || 0x04 || 00 00 00 74 || Next Element
|-
|-
| 0x04 || 0x04 || 00 00 00 00 || Attribute Counter
| 0x4C || 0x04 || FF FF FF FF || First Entry
|-
|-
| 0x08 || 0x04 || FF FF FF FF || Parent
| 0x50 || 0x04 || FF FF FF FF || Last Entry
|-
|-
| 0x0C || 0x04 || FF FF FF FF || Previous Element
| 0x54 || 0x04 || 00 00 00 14 || String Pointer (Offset within '''String Table''', in this case it will be a Attribute <src>)
|-
|-
| 0x10 || 0x04 || FF FF FF FF || Next Element
| 0x58 || 0x04 || 00 00 00 06 || Type Descriptor (6 == File)
|-
|-
| 0x14 || 0x04 || 00 00 00 1C || First Entry within the root Element (qrc)
| 0x5C || 0x04 || 00 00 00 00 || Offset of data within '''File Table'''
|-
|-
| 0x18 || 0x04 || 00 00 00 1C || Last Entry within the root Element (qrc)
| 0x60 || 0x04 || 00 00 01 50 || Size of data within '''File Table'''
|-
|-
| 0x1C || 0x04 || 00 00 00 04 || String Pointer (Offset within '''String Table''', in this case it will be <file-table>)  
| 0x64 || 0x04 || 00 00 00 18 || String Pointer (Offset within '''String Table''', in this case it will be a Attribute <id>)
|-
|-
| 0x20 || 0x04 || 00 00 00 00 || Attribute Counter
| 0x68 || 0x04 || 00 00 00 07 || Type Descriptor (7 == ID)
|-
|-
| 0x24 || 0x04 || 00 00 00 00 || Parent
| 0x6C || 0x04 || 00 00 00 00 || Offset of filename within the ID Table
|-
|-
| 0x28 || 0x04 || FF FF FF FF || Previous Element
| 0x70 || 0x04 || 00 00 00 00 || on icontex here are additional 16 bytes
|-
|-
| 0x2C || 0x04 || FF FF FF FF || Next Element
| 0x74 || 0x04 || 00 00 00 0F || String Pointer
|-
|-
| 0x30 || 0x04 || 00 00 00 38 || First Entry
| 0x78 || 0x04 || 00 00 00 02 || Attribute Counter
|-
|-
| 0x34 || 0x04 || 00 00 01 28 || Last Entry
| 0x7C || 0x04 || 00 00 00 1C || Parent Element
|-
|-
| 0x38 || 0x04 || 00 00 00 0F || String Pointer (Offset within '''String Table''', in this case it will be a Element <file>)
| 0x80 || 0x04 || 00 00 00 38 || Previous Element
|-
|-
| 0x3C || 0x04 || 00 00 00 02 || Attribute Counter (0x02 == 2, the 2 Attributes of <file> Element)
| 0x84 || 0x04 || 00 00 00 B0 || Next Element
|-
|-
| 0x40 || 0x04 || 00 00 00 1C || Parent Element (Offset within '''Tree Table''', in this case it will be <file-table>)
|}
 
On icontex.qrc there are additional 16 bytes added on offset 0x70 within the '''Tree Table'''
{| class="wikitable"
! Offset !! Size !! Example !! Remark
|-
|-
| 0x44 || 0x04 || FF FF FF FF || Previous Element
| 0x70 || 0x04 || 00 00 00 00 || on icontex.qrc
|-
|-
| 0x48 || 0x04 || 00 00 00 74 || Next Element
| 0x74 || 0x04 || 00 00 00 1B || String Pointer (Offset within '''String Table''', in this case it will be a Attribute <size>)
|-
|-
| 0x4C || 0x04 || FF FF FF FF || First Entry
| 0x78 || 0x04 || 00 00 00 01 || Type Descriptor (1 == Integer)
|-
|-
| 0x50 || 0x04 || FF FF FF FF || Last Entry
| 0x7C || 0x04 || 00 01 55 D4 || on icontex.qrc (size of .dds uncompressed [Dec = 87508])
|-
|-
| 0x54 || 0x04 || 00 00 00 14 || String Pointer (Offset within '''String Table''', in this case it will be a Attribute <src>)
| 0x80 || 0x04 || 00 00 00 00 || similar all qrc files
|-
| 0x58 || 0x04 || 00 00 00 06 || Type Descriptor (6 == File)
|-
| 0x5C || 0x04 || 00 00 00 00 || Offset of data within '''File Table'''
|-
| 0x60 || 0x04 || 00 00 01 50 || Size of data within '''File Table'''
|-
| 0x64 || 0x04 || 00 00 00 18 || String Pointer (Offset within '''String Table''', in this case it will be a Attribute <id>)
|-
| 0x68 || 0x04 || 00 00 00 07 || Type Descriptor (7 == ID)
|-
| 0x6C || 0x04 || 00 00 00 00 || Offset of filename within the ID Table
|-
|-
| 0x70 || 0x04 || 00 00 00 00 || not used
| 0x84 || 0x04 || 00 00 00 0F || String Pointer
|-
|-
|}
| 0x88 || 0x04 || 00 00 00 02 || Attribute Count
 
On icontex.qrc there are additional 16 bytes added on offset 0x70 within the '''Tree Table''' because it has an additional attribute '''size'''
{| class="wikitable"
! Offset !! Size !! Example !! Remark
|-
|-
| 0x74 || 0x04 || 00 00 00 1B || String Pointer (Offset within '''String Table''', in this case it will be a Attribute <size>)
| 0x8C || 0x04 || 00 00 00 1C || Parent Element
|-
|-
| 0x78 || 0x04 || 00 00 00 01 || Type Descriptor (1 == Integer)
| 0x90 || 0x04 || 00 00 00 38 || Previous Element
|-
|-
| 0x7C || 0x04 || 00 01 55 D4 || on icontex.qrc (size of .dds uncompressed [Dec = 87508])
| 0x94 || 0x04 || 00 00 00 D0 || Next Element
|-
| 0x80 || 0x04 || 00 00 00 00 || not used
|-
|-
|}
|}
Line 422: Line 354:


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)
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 although can be deduced from the "src")
*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)
*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)


{{Boxcode|code=<syntaxhighlight lang="xml">
{{Boxcode|content=<syntaxhighlight lang="xml">
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<qrc>
<qrc>
Line 454: Line 386:


===String Table===
===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 (although it looks in some cases the theme compiler reorders them to his convenience). This list doesn't makes differences of the "directory hierarchy" of the tags neither is specified 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)
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)
  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)
Line 534: Line 466:
| 0x00000006  || '''File'''  || Composed of '''Offset''' and '''Size''' each 4 bytes long
| 0x00000006  || '''File'''  || Composed of '''Offset''' and '''Size''' each 4 bytes long
|-
|-
| 0x00000007  || '''ID with ref'''  || Composed of '''Offset''' 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 with ref''' is used to descripe the Offset of a Filename within the '''ID Table''' with the use of a 4 byte long reference, starting from the Offset given. The Size value from '''ID''' seems not to be used in Containers.
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.
*'''ID with ref''' (0x00000007) is using the entry Offset from the Element (to which the Attribute belongs) as reference byte to compare if it is using the correct Filename for the processing File.  




Line 585: Line 516:


==Container Structure variations==
==Container Structure variations==
===P3T===
=== P3TF ===
P3TF ('''P'''laystation '''3''' '''T'''heme '''F'''lat?)


====Main Header====
===QRC===
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)
ZLIB Compressed level 9 (in both cases and in all files?)


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)
==== QRCC ====
QRCC ('''Q'''t '''R'''esources '''C'''ontainer '''C'''ompressed)


*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":
In the practise and from the point of view of the system, the QRCC has no interest and is needed to decompress the whole QRCC to be able to read the internal structure of the container and to acess individual files, when a QRCC is decompressed it generates an QRCF file (the real container) but this QRCF has a different internal structure than the QRCF used by icontex.qrc (are 2 variations of the same container with some small differences... althougth both uses the same identifyer QRCF)
**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'''
*Example from 3.55 rhm.qrc:
  '''00000000'''  <span style="background:#666666;">50 33 54 46</span>  <span style="background:#888888;">00 00 01 10</span>  <span style="background:#dddd66;">00 00 00 40</span>  <span style="background:#ffff88;">00 00 02 CC</span> P3TF.......@..%|
  '''Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F'''
'''00000010'''  <span style="background:#dd6666;">00 00 03 10</span>  <span style="background:#ff8888;">00 00 01 2B</span>  <span style="background:#66dddd;">00 00 04 40</span>  <span style="background:#88ffff;">00 00 00 1B</span>  ..%À......9Ð....
  '''00000000'''  <span style="background:#ff6666;">51 52 43 43</span> <span style="background:#8888ff;">00 00 28 00</span> <span style="background:#00ff00;">78 DA</span>                       QRCC..(.
'''00000020'''  <span style="background:#66dd66;">00 00 04 60</span>  <span style="background:#88ff88;">00 00 00 00</span>  <span style="background:#dd66dd;">00 00 04 60</span>  <span style="background:#ff88ff;">00 00 00 00</span>  ..9ð......9ð....
'''00000030'''  <span style="background:#6666dd;">00 00 04 60</span>  <span style="background:#8888ff;">00 00 23 A0</span>  <span style="background:#aee2ae;">00 00 00 00</span> <span style="background:#cef2ce;">00 00 00 00</span> ..9ð..@p........


{| class="wikitable"
{| class="wikitable"
Line 608: Line 533:
! Name !! Offset !! Size !! Example !! Remark
! Name !! Offset !! Size !! Example !! Remark
|-
|-
| Magic || 0x00 || 0x04 || {{cellcolors|#666666|#ffffff}} 51 52 43 46 || 'P3TF'
| Magic || 0x00 || 0x04 || {{cellcolors|#ff6666}} 51 52 43 43 || 'QRCC'
|-
|-
| Version || 0x04 || 0x04 || {{cellcolors|#888888|#ffffff}} 00 00 01 10 ||
| QRCF decompressed size || 0x04 || 0x04 || {{cellcolors|#8888ff}} 00 00 28 00 || The size of the QRCF file generated when a QRCC is decompressed
|-
|-
| Tree Table Offset || 0x08 || 0x04 || {{cellcolors|#dddd66}} 00 00 00 40 ||  
| compressed QRCF || 0x08 || ''varies, up to the end of the QRCC file'' || {{cellcolors|#00FF00}} 78 DA... || QRCF file start offset, compressed with ZLIB
|-
|-
| Tree Table Size || 0x0C || 0x04 || {{cellcolors|#ffff88}} 00 00 02 CC ||
|}
|-
 
| ID Table Offset || 0x10 || 0x04 || {{cellcolors|#dd6666}} 00 00 03 10 ||
*Notes
|-
**The first 2 bytes of the compressed QRCF is the ZLIB header, in this example: 0x78DA
| ID Table Size || 0x14 || 0x04 || {{cellcolors|#ff8888}} 00 00 01 2B ||
**default/max level 9
|-
| String Table Offset || 0x18 || 0x04 || {{cellcolors|#66dddd}} 00 00 04 40 ||
|-
| String Table Size || 0x1C || 0x04 || {{cellcolors|#88ffff}} 00 00 00 1B ||
|-
| Integer Array Offset || 0x20 || 0x04 || {{cellcolors|#66dd66}} 00 00 04 60 || Overlapped
|-
| Integer Array size || 0x24 || 0x04 || {{cellcolors|#88ff88}} 00 00 00 00 || Not used
|-
| Float Array Offset || 0x28 || 0x04 || {{cellcolors|#dd66dd}} 00 00 04 60 || Overlapped
|-
| Float Array Size || 0x2C || 0x04 || {{cellcolors|#ff88ff}} 00 00 00 00 || Not used
|-
| File Table Offset || 0x30 || 0x04 || {{cellcolors|#6666dd}} 00 00 04 60 || Overlaps the previous 2 tables
|-
| File Table Size || 0x34 || 0x04 || {{cellcolors|#8888ff}} 00 00 23 A0 ||
|-
| ''Unknown Table Offset'' || 0x38 || 0x04 || {{cellcolors|#aee2ae}} 00 00 00 00 || Not present
|-
| ''Unknown Table Size'' || 0x3C || 0x04 || {{cellcolors|#cef2ce}} 00 00 00 00 || Not Used
|-
|}


*Notes
==== QRCF ====
**The sizes doesnt includes the (posible) padding at the end of all tables
QRCF ('''Q'''t '''R'''esources '''C'''ontainer '''F'''lat?)
 
===P3T===
 
=== P3TF ===
P3TF ('''P'''laystation '''3''' '''T'''heme '''F'''lat?)
 
====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'''  <span style="background:#666666;">50 33 54 46</span>  <span style="background:#888888;">00 00 01 10</span>  <span style="background:#dddd66;">00 00 00 40</span>  <span style="background:#ffff88;">00 00 02 CC</span>  P3TF.......@..%|
'''00000010'''  <span style="background:#dd6666;">00 00 03 10</span>  <span style="background:#ff8888;">00 00 01 2B</span>  <span style="background:#66dddd;">00 00 04 40</span>  <span style="background:#88ffff;">00 00 00 1B</span>  ..%À......9Ð....
'''00000020'''  <span style="background:#66dd66;">00 00 04 60</span>  <span style="background:#88ff88;">00 00 00 00</span>  <span style="background:#dd66dd;">00 00 04 60</span>  <span style="background:#ff88ff;">00 00 00 00</span>  ..9ð......9ð....
'''00000030'''  <span style="background:#6666dd;">00 00 04 60</span>  <span style="background:#8888ff;">00 00 23 A0</span>  <span style="background:#aee2ae;">00 00 00 00</span>  <span style="background:#cef2ce;">00 00 00 00</span>  ..9ð..@p........


====Tree Table====
{| class="wikitable"
{| class="wikitable"
! Offset !! Size !! Example !! Remark
|-
|-
| 0x00 || 0x04 || 00 00 00 00 || Root Element (Offset within '''String Table''', in this case it will be <p3t>)
! Name !! Offset !! Size !! Example !! Remark
|-
|-
| 0x04 || 0x04 || 00 00 00 00 || Attribute Counter
| Magic || 0x00 || 0x04 || {{cellcolors|#666666|#ffffff}} 51 52 43 46 || 'P3TF'
|-
|-
| 0x08 || 0x04 || FF FF FF FF || Parent
| Version || 0x04 || 0x04 || {{cellcolors|#888888|#ffffff}} 00 00 01 10 ||
|-
|-
| 0x0C || 0x04 || FF FF FF FF || Previous Element
| Tree Table Offset || 0x08 || 0x04 || {{cellcolors|#dddd66}} 00 00 00 40 ||  
|-
|-
| 0x10 || 0x04 || FF FF FF FF || Next Element
| Tree Table Size || 0x0C || 0x04 || {{cellcolors|#ffff88}} 00 00 02 CC ||  
|-
|-
| 0x14 || 0x04 || 00 00 00 1C || First Element within the root Element (p3t)
| ID Table Offset || 0x10 || 0x04 || {{cellcolors|#dd6666}} 00 00 03 10 ||
|-
|-
| 0x18 || 0x04 || 00 00 18 B4 || Last Element within the root Element (p3t)
| ID Table Size || 0x14 || 0x04 || {{cellcolors|#ff8888}} 00 00 01 2B ||  
|-
|-
| 0x1C || 0x04 || 00 00 00 06 || String Pointer (Offset within '''String Table''', in this case it will be <infotable>)
| String Table Offset || 0x18 || 0x04 || {{cellcolors|#66dddd}} 00 00 04 40 ||
|-
|-
| 0x20 || 0x04 || 00 00 00 00 || Attribute Counter
| String Table Size || 0x1C || 0x04 || {{cellcolors|#88ffff}} 00 00 00 1B ||  
|-
|-
| 0x24 || 0x04 || 00 00 00 00 || Parent
| Integer Array Offset || 0x20 || 0x04 || {{cellcolors|#66dd66}} 00 00 04 60 || Overlapped
|-
|-
| 0x28 || 0x04 || FF FF FF FF || Previous ELement
| Integer Array size || 0x24 || 0x04 || {{cellcolors|#88ff88}} 00 00 00 00 || Not used
|-
|-
| 0x2C || 0x04 || 00 00 01 AC || Next Element
| Float Array Offset || 0x28 || 0x04 || {{cellcolors|#dd66dd}} 00 00 04 60 || Overlapped
|-
|-
| 0x30 || 0x04 || 00 00 00 38 || First Entry
| Float Array Size || 0x2C || 0x04 || {{cellcolors|#ff88ff}} 00 00 00 00 || Not used
|-
|-
| 0x34 || 0x04 || 00 00 01 60 || Last Entry
| File Table Offset || 0x30 || 0x04 || {{cellcolors|#6666dd}} 00 00 04 60 || Overlaps the previous 2 tables
|-
| File Table Size || 0x34 || 0x04 || {{cellcolors|#8888ff}} 00 00 23 A0 ||
|-
|-
| 0x38 || 0x04 || 00 00 00 10 || String Pointer (Offset within '''String Table''', in this case it will be <info>)
| ''Unknown Table Offset'' || 0x38 || 0x04 || {{cellcolors|#aee2ae}} 00 00 00 00 || Not present
|-
|-
| 0x3C || 0x04 || 00 00 00 0D || Attribute Counter (0x0D == 13, the 13 Attributes of <info> Element)
| ''Unknown Table Size'' || 0x3C || 0x04 || {{cellcolors|#cef2ce}} 00 00 00 00 || Not Used
|-
|-
| 0x40 || 0x04 || 00 00 00 1C || Parent Element (Offset withing '''Tree Table''', in this case it will be <infotable>)
|}
 
*Notes
**The sizes doesnt includes the (posible) padding at the end of all tables
 
 
====Tree Table====
{| class="wikitable"
! Offset !! Size !! Example !! Remark
|-
|-
| 0x44 || 0x04 || FF FF FF FF || Previous Element
| 0x00 || 0x04 || 00 00 00 00 || Root Element (Offset within '''String Table''', in this case it will be <p3t>)
|-
|-
| 0x48 || 0x04 || 00 00 01 24 || Next Element
| 0x04 || 0x04 || 00 00 00 00 || Attribute Counter
|-
|-
| 0x4C || 0x04 || FF FF FF FF || First Entry
| 0x08 || 0x04 || FF FF FF FF || Parent
|-
|-
| 0x50 || 0x04 ||FF FF FF FF || Last Entry
| 0x0C || 0x04 || FF FF FF FF || Previous Element
|-
|-
|}
| 0x10 || 0x04 || FF FF FF FF || Next Element
 
|-
====String Table====
| 0x14 || 0x04 || 00 00 00 1C || First Element within the root Element (p3t)
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 doesn't makes differences of the "directory hierarchy" of the tags neither is specified 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)
|-
| 0x18 || 0x04 || 00 00 18 B4 || Last Element within the root Element (p3t)
'''Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F'''
|-
'''00000000'''  <span style="background:#ffff66;">74 68 65 6D 65 00 69 6E 66 6F 74 61 62 6C 65 00</span>  theme.infotable.
| 0x1C || 0x04 || 00 00 00 06 || String Pointer (Offset within '''String Table''', in this case it will be <infotable>)
'''00000010'''  <span style="background:#ffff66;">69 6E 66 6F 00 63 6F 6D 6D 65 6E 74 00 45 6E 6A</span>  info.comment.Enj
|-
'''00000020'''  <span style="background:#ffff66;">6F 79 2E 00 70 72 65 76 69 65 77 73 69 7A 65 00</span>  oy..previewsize.
| 0x20 || 0x04 || 00 00 00 00 || Attribute Counter
'''00000030'''  <span style="background:#ffff66;">6E 61 6D 65 00 48 45 41 56 59 20 52 61 69 6E 20</span>  name.HEAVY.Rain.
|-
'''00000040'''  <span style="background:#ffff66;">74 68 65 6D 65 00 61 75 74 68 6F 72 00 51 75 61</span>  theme.author.Qua
| 0x24 || 0x04 || 00 00 00 00 || Parent
'''00000050'''  <span style="background:#ffff66;">6E 74 69 63 44 72 65 61 6D 00 75 72 6C 00 68 74</span>  nticDream.url.ht
|-
'''00000060'''  <span style="background:#ffff66;">74 70 3A 2F 2F 77 77 77 2E 71 75 61 6E 74 69 63</span>  tp://www.quantic
| 0x28 || 0x04 || FF FF FF FF || Previous ELement
'''00000070'''  <span style="background:#ffff66;">64 72 65 61 6D 2E 63 6F 6D 00 61 75 74 68 6F 72</span>  dream.com.author
|-
'''00000080'''  <span style="background:#ffff66;">69 63 6F 6E 73 69 7A 65 00 61 75 74 68 6F 72 69</span>  iconsize.authori
| 0x2C || 0x04 || 00 00 01 AC || Next Element
'''00000090'''  <span style="background:#ffff66;">63 6F 6E 00 69 63 6F 6E 73 69 7A 65 00 76 65 72</span>  con.iconsize.ver
|-
'''000000A0'''  <span style="background:#ffff66;">73 69 6F 6E 00 76 65 72 73 69 6F 6E 20 31 2E 30</span>  sion.version.1.0
| 0x30 || 0x04 || 00 00 00 38 || First Entry
'''000000B0'''  <span style="background:#ffff66;">00 6D 74 69 6D 65 00 32 30 30 39 31 30 33 30 31</span>  .mtime.200910301
|-
'''000000C0'''  <span style="background:#ffff66;">36 31 33 34 33 00 67 65 6E 72 65 00 6F 74 68 65</span>  61343.genre.othe
| 0x34 || 0x04 || 00 00 01 60 || Last Entry
'''000000D0'''  <span style="background:#ffff66;">72 73 00 70 72 65 76 69 65 77 00 69 63 6F 6E 00</span>  re.preview.icon.
|-
'''000000E0''' <span style="background:#ffff66;">6C 6F 63 61 6C 69 7A 65 64 69 6E 66 6F 00 6C 6F</span>  localizedinfo.lo
| 0x38 || 0x04 || 00 00 00 10 || String Pointer (Offset within '''String Table''', in this case it will be <info>)
'''000000F0'''  <span style="background:#ffff66;">63 61 6C 65 00 E3 81 93 E3 82 8C E3 81 AF E3 82</span>  cale.これはã‚
|-
'''00000100'''  <span style="background:#ffff66;">B5 E3 83 B3 E3 83 97 E3 83 AB E3 83 86 E3 83 BC</span>  µãƒ³ãƒ—ルテー
| 0x3C || 0x04 || 00 00 00 0D || Attribute Counter (0x0D == 13, the 13 Attributes of <info> Element)
'''00000110'''  <span style="background:#ffff66;">E3 83 9E E3 83 95 E3 82 A1 E3 82 A4 E3 83 AB E3</span> マファイルã
|-
'''00000120'''  <span style="background:#ffff66;">81 A7 E3 81 99 E3 80 82 00 69 63 6F 6E 74 61 62</span>  §ã™ã€‚.icontab
| 0x40 || 0x04 || 00 00 00 1C || Parent Element (Offset withing '''Tree Table''', in this case it will be <infotable>)
'''00000130'''  <span style="background:#ffff66;">6C 65 00 73 72 63 00 69 64 00 73 69 7A 65 00 70</span>  le.src.id.size.p
|-
'''00000140''' <span style="background:#ffff66;">6F 69 6E 74 65 72 74 61 62 6C 65 00 70 6F 69 6E</span>  ointertable.poin
| 0x44 || 0x04 || FF FF FF FF || Previous Element
'''00000150'''  <span style="background:#ffff66;">74 65 72 00 62 61 73 65 5F 78 00 62 61 73 65 5F</span>  ter.base_X.base_
|-
'''00000160'''  <span style="background:#ffff66;">79 00 6E 6F 74 69 66 69 63 61 74 69 6F 6E 00 62</span>  y.notification.b
| 0x48 || 0x04 || 00 00 01 24 || Next Element
'''00000170'''  <span style="background:#ffff66;">67 69 6D 61 67 65 74 61 62 6C 65 00 62 67 69 6D</span>  gimagetable.bgim
|-
'''00000180'''  <span style="background:#ffff66;">61 67 65 00 61 6E 69 6D 00 66 6F 6E 74 00 73 65</span>  age.anim.font.se
| 0x4C || 0x04 || FF FF FF FF || First Entry
'''00000190'''  <span style="background:#ffff66;">6C 65 63 74 69 6F 6E 00 63 6F 6C 6F 72</span> <span style="background:#ff6666;">00 00 00</span>  lection.color
|-
 
| 0x50 || 0x04 ||FF FF FF FF || Last Entry
*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.


====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'''
  '''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 ...$<span style="background:#ffff66;">en</span>....`<span style="background:#ffff66;">jp</span>...
  '''00000000'''  <span style="background:#ffff66;">74 68 65 6D 65 00 69 6E 66 6F 74 61 62 6C 65 00</span>  theme.infotable.
  '''00000010'''  01 C8 69 63 6F 6E 5F 75 73 65 72 00 00 00 02 14 .Èicon_user.....
'''00000010'''  <span style="background:#ffff66;">69 6E 66 6F 00 63 6F 6D 6D 65 6E 74 00 45 6E 6A</span>  info.comment.Enj
  '''00000020'''  69 63 6F 6E 5F 73 65 74 74 69 6E 67 00 00 00 02 icon_setting....
'''00000020'''  <span style="background:#ffff66;">6F 79 2E 00 70 72 65 76 69 65 77 73 69 7A 65 00</span> oy..previewsize.
  '''00000030'''  60 69 63 6F 6E 5F 70 68 6F 74 6F 00 00 00 02 AC `icon_photo....¬
'''00000030'''  <span style="background:#ffff66;">6E 61 6D 65 00 48 45 41 56 59 20 52 61 69 6E 20</span> name.HEAVY.Rain.
  '''00000040'''  69 63 6F 6E 5F 6D 75 73 69 63 00 00 00 02 F8 69 icon_music....øi
'''00000040'''  <span style="background:#ffff66;">74 68 65 6D 65 00 61 75 74 68 6F 72 00 51 75 61</span> theme.author.Qua
  '''00000050'''  63 6F 6E 5F 76 69 64 65 6F 00 00 00 03 44 69 63 con_video....Dic
  '''00000050'''  <span style="background:#ffff66;">6E 74 69 63 44 72 65 61 6D 00 75 72 6C 00 68 74</span> nticDream.url.ht
  '''00000060'''  6F 6E 5F 67 61 6D 65 00       [...]            on_game
'''00000060'''  <span style="background:#ffff66;">74 70 3A 2F 2F 77 77 77 2E 71 75 61 6E 74 69 63</span>  tp://www.quantic
 
'''00000070'''  <span style="background:#ffff66;">64 72 65 61 6D 2E 63 6F 6D 00 61 75 74 68 6F 72</span>  dream.com.author
====File Table====
  '''00000080'''  <span style="background:#ffff66;">69 63 6F 6E 73 69 7A 65 00 61 75 74 68 6F 72 69</span>  iconsize.authori
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.,...).
'''00000090'''  <span style="background:#ffff66;">63 6F 6E 00 69 63 6F 6E 73 69 7A 65 00 76 65 72</span> con.iconsize.ver
 
  '''000000A0'''  <span style="background:#ffff66;">73 69 6F 6E 00 76 65 72 73 69 6F 6E 20 31 2E 30</span>  sion.version.1.0
==Summary==
'''000000B0'''  <span style="background:#ffff66;">00 6D 74 69 6D 65 00 32 30 30 39 31 30 33 30 31</span>  .mtime.200910301
===Table Description===
'''000000C0'''  <span style="background:#ffff66;">36 31 33 34 33 00 67 65 6E 72 65 00 6F 74 68 65</span> 61343.genre.othe
For P3T i will use the Info Array to describe (place where all the infos from the <info> Element will be stored). The other File's follow the same handling like for QRC. (Well the Info Array does also follow the same handling but we have here 13 Attributes and it will also read some values not present in a QRC Container.) Also you can see here again that if a ID is readed then the entry Offset of a Element is also used as a 4 byte long pointer within '''ID Table'''. You start from the Offset the '''Tree Table''' is given you and the next readed 4 bytes should match the entry offset of the Element in '''Tree Table'''.
  '''000000D0'''  <span style="background:#ffff66;">72 73 00 70 72 65 76 69 65 77 00 69 63 6F 6E 00</span> re.preview.icon.
'''000000E0'''  <span style="background:#ffff66;">6C 6F 63 61 6C 69 7A 65 64 69 6E 66 6F 00 6C 6F</span>  localizedinfo.lo
  '''000000F0'''  <span style="background:#ffff66;">63 61 6C 65 00 E3 81 93 E3 82 8C E3 81 AF E3 82</span>  cale.これはã‚
'''00000100'''  <span style="background:#ffff66;">B5 E3 83 B3 E3 83 97 E3 83 AB E3 83 86 E3 83 BC</span>  µãƒ³ãƒ—ルテー
'''00000110'''  <span style="background:#ffff66;">E3 83 9E E3 83 95 E3 82 A1 E3 82 A4 E3 83 AB E3</span>  マファイルã
'''00000120'''  <span style="background:#ffff66;">81 A7 E3 81 99 E3 80 82 00 69 63 6F 6E 74 61 62</span>  §ã™ã€‚.icontab
'''00000130'''  <span style="background:#ffff66;">6C 65 00 73 72 63 00 69 64 00 73 69 7A 65 00 70</span> le.src.id.size.p
  '''00000140'''  <span style="background:#ffff66;">6F 69 6E 74 65 72 74 61 62 6C 65 00 70 6F 69 6E</span>  ointertable.poin
'''00000150''' <span style="background:#ffff66;">74 65 72 00 62 61 73 65 5F 78 00 62 61 73 65 5F</span>  ter.base_X.base_
'''00000160''' <span style="background:#ffff66;">79 00 6E 6F 74 69 66 69 63 61 74 69 6F 6E 00 62</span>  y.notification.b
'''00000170''' <span style="background:#ffff66;">67 69 6D 61 67 65 74 61 62 6C 65 00 62 67 69 6D</span>  gimagetable.bgim
'''00000180''' <span style="background:#ffff66;">61 67 65 00 61 6E 69 6D 00 66 6F 6E 74 00 73 65</span>  age.anim.font.se
'''00000190'''  <span style="background:#ffff66;">6C 65 63 74 69 6F 6E 00 63 6F 6C 6F 72</span> <span style="background:#ff6666;">00 00 00</span>  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)


  '''                    ''Tree Table of HeavyRain.p3t''                                                                    ''ID Table of HeavyRain.p3t'''''
 
   
====ID Table====
  '''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'''
The '''ID Table''' of a P3T also can hold additional information for the <localizedinfo> Element.
  '''00000050'''      [...]  <span style="background:#ccd815;">00 00 00 15</span> <span style="background:#FCDFFF;">00 00 00 03</span> <span style="background:#00FFFF;">00 00 00 1D</span>      ............                    '''00000000'''  <span style="background:#00FFFF;">00</span> <span style="background:#ffff66;">00 01 24</span> 65 6E 00 <span style="background:#00FFFF;">00</span> <span style="background:#ffff66;">00 01 60</span> 6A 70 00 00 00  <span style="background:#00FFFF;">.</span><span style="background:#ffff66;">..$</span>en.<span style="background:#00FFFF;">.</span><span style="background:#ffff66;">..`</span>jp...                     
 
  '''00000060'''  <span style="background:#2bffb3;">00 00 00 06</span> <span style="background:#ccd815;">00 00 00 24</span> <span style="background:#FCDFFF;">00 00 00 01</span> <span style="background:#9CB071;">00 07 E9 80</span>  .......$......造                   '''00000010'''  01 C8 69 63 6F 6E 5F 75 73 65 72 00 00 00 02 14  .Èicon_user.....
'''Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F'''
  '''00000070'''  00 00 00 00 <span style="background:#ccd815;">00 00 00 30</span> <span style="background:#FCDFFF;">00 00 00 03</span> <span style="background:#00FFFF;">00 00 00 35</span>  .......0.......5                    '''00000020'''  69 63 6F 6E 5F 73 65 74 74 69 6E 67 00 00 00 02  icon_setting....
'''00000000'''  00 00 01 24 65 6E 00 00 00 01 60 6A 70 00 00 00  ...$<span style="background:#ffff66;">en</span>....`<span style="background:#ffff66;">jp</span>...
  '''00000080'''  <span style="background:#2bffb3;">00 00 00 10</span> <span style="background:#ccd815;">00 00 00 46</span> <span style="background:#FCDFFF;">00 00 00 03</span> <span style="background:#00FFFF;">00 00 00 4D</span>  .......F.......M                    '''00000030'''  60 69 63 6F 6E 5F 70 68 6F 74 6F 00 00 00 02 AC  `icon_photo....¬
'''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.,...).
 
==Summary==
===Table Description===
For P3T i will use the Info Array to describe (place where all the infos from the <info> Element will be stored). The other File's follow the same handling like for QRC. (Well the Info Array does also follow the same handling but we have here 13 Attributes and it will also read some values not present in a QRC Container.) Also you can see here again that if a ID is readed then the entry Offset of a Element is also used as a 4 byte long pointer within '''ID Table'''. You start from the Offset the '''Tree Table''' is given you and the next readed 4 bytes should match the entry offset of the Element in '''Tree Table'''.
 
  '''                    ''Tree Table of HeavyRain.p3t''                                                                    ''ID Table of HeavyRain.p3t'''''
   
  '''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'''
  '''00000050'''      [...]  <span style="background:#ccd815;">00 00 00 15</span> <span style="background:#FCDFFF;">00 00 00 03</span> <span style="background:#00FFFF;">00 00 00 1D</span>      ............                    '''00000000'''  <span style="background:#00FFFF;">00</span> <span style="background:#ffff66;">00 01 24</span> 65 6E 00 <span style="background:#00FFFF;">00</span> <span style="background:#ffff66;">00 01 60</span> 6A 70 00 00 00  <span style="background:#00FFFF;">.</span><span style="background:#ffff66;">..$</span>en.<span style="background:#00FFFF;">.</span><span style="background:#ffff66;">..`</span>jp...                     
  '''00000060'''  <span style="background:#2bffb3;">00 00 00 06</span> <span style="background:#ccd815;">00 00 00 24</span> <span style="background:#FCDFFF;">00 00 00 01</span> <span style="background:#9CB071;">00 07 E9 80</span>  .......$......造                   '''00000010'''  01 C8 69 63 6F 6E 5F 75 73 65 72 00 00 00 02 14  .Èicon_user.....
  '''00000070'''  00 00 00 00 <span style="background:#ccd815;">00 00 00 30</span> <span style="background:#FCDFFF;">00 00 00 03</span> <span style="background:#00FFFF;">00 00 00 35</span>  .......0.......5                    '''00000020'''  69 63 6F 6E 5F 73 65 74 74 69 6E 67 00 00 00 02  icon_setting....
  '''00000080'''  <span style="background:#2bffb3;">00 00 00 10</span> <span style="background:#ccd815;">00 00 00 46</span> <span style="background:#FCDFFF;">00 00 00 03</span> <span style="background:#00FFFF;">00 00 00 4D</span>  .......F.......M                    '''00000030'''  60 69 63 6F 6E 5F 70 68 6F 74 6F 00 00 00 02 AC  `icon_photo....¬
  '''00000090'''  <span style="background:#2bffb3;">00 00 00 0C</span> <span style="background:#ccd815;">00 00 00 5A</span> <span style="background:#FCDFFF;">00 00 00 03</span> <span style="background:#00FFFF;">00 00 00 5E</span>  .......Z.......^                    '''00000040'''  69 63 6F 6E 5F 6D 75 73 69 63 00 00 00 02 F8 69  icon_music....øi
  '''00000090'''  <span style="background:#2bffb3;">00 00 00 0C</span> <span style="background:#ccd815;">00 00 00 5A</span> <span style="background:#FCDFFF;">00 00 00 03</span> <span style="background:#00FFFF;">00 00 00 5E</span>  .......Z.......^                    '''00000040'''  69 63 6F 6E 5F 6D 75 73 69 63 00 00 00 02 F8 69  icon_music....øi
  '''000000A0'''  <span style="background:#2bffb3;">00 00 00 1B</span> <span style="background:#ccd815;">00 00 00 7A</span> <span style="background:#FCDFFF;">00 00 00 01</span> <span style="background:#9CB071;">00 00 40 80</span>  .......z......@€                    '''00000050'''  63 6F 6E 5F 76 69 64 65 6F 00 00 00 03 44 69 63  con_video....Dic
  '''000000A0'''  <span style="background:#2bffb3;">00 00 00 1B</span> <span style="background:#ccd815;">00 00 00 7A</span> <span style="background:#FCDFFF;">00 00 00 01</span> <span style="background:#9CB071;">00 00 40 80</span>  .......z......@€                    '''00000050'''  63 6F 6E 5F 76 69 64 65 6F 00 00 00 03 44 69 63  con_video....Dic
Line 792: Line 756:
! Value !! Typ !!  Notes
! Value !! Typ !!  Notes
|-
|-
| 0x00000001  || '''Integer'''  || Composed of '''Value''' 4 bytes long
| 0x00000001  || '''Integer'''  || Composed of '''Offset''' and '''Length''' each 4 bytes long
|-
|-
| 0x00000003  || '''String'''  || Composed of '''Offset''' and '''Length''' each 4 bytes long
| 0x00000003  || '''String'''  || Composed of '''Offset''' and '''Length'''' each 4 bytes long
|-
|-
| 0x00000006  || '''File'''  || Composed of '''Offset''' and '''Size''' each 4 bytes long
| 0x00000006  || '''File'''  || Composed of '''Offset''' and '''Size''' each 4 bytes long
|-
|-
| 0x00000007  || '''ID with ref'''  || Composed of '''Offset''' 4 bytes long  
| 0x00000007  || '''ID'''  || Composed of '''Offset''' and '''Length''' 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 with ref''' is used to descripe the Offset of a Filename within the '''ID Table''' with the use of a 4 byte long reference, starting from the Offset given. The Second value from '''ID''' seems not to be used in Containers. Similar to '''ID''', the '''Integer''' Typ only use one value the second one seems not to be used. '''String''' describe the Offset and Length of a string to read from '''String Table'''.
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. This is similar to '''Integer''' Typ but here the offset value is used to store the size of a file. '''String''' describe the Offset and Length of a string to read from '''String Table'''.
* '''ID with ref''' (0x00000007) is using the entry Offset from the Element (to which the Attribute belongs) as reference byte to compare if it is using the correct Filename for the processing File.
 


  '''<span style="background:#ccd815;">String Pointer</span>  Points to a Offset within '''String Table''' which represents a string (in this case a Attribute <comment>)                    <span style="background:#ffff66;">Previous Element</span>'''
  '''<span style="background:#ccd815;">String Pointer</span>  Points to a Offset within '''String Table''' which represents a string (in this case a Attribute <comment>)                    <span style="background:#ffff66;">Previous Element</span>'''
Line 866: Line 828:
  '''<span style="background:#9AFEFF;">Parent</span>                                                                                                                                  <span style="background:#2bffb3;">Length of String</span>'''
  '''<span style="background:#9AFEFF;">Parent</span>                                                                                                                                  <span style="background:#2bffb3;">Length of String</span>'''


==Container Structure variations 2==
===RAF===
===RAF===
ZLIB Compressed level 9 (only container)


==== _RAF ====
===CXML===
_RAF ('''_'''? '''R'''ich '''A'''ppearance '''F'''ormat)


In practise and from the point of view of the system, the _RAF has no interest and is needed to decompress the whole _RAF to be able to read the internal structure of the container and to acess individual files, when a _RAF is decompressed it generates an RAFO file (the real container).
====HKNW====
Magic of the container is '''HKNW''' (acronym of hakoniwa)


*Example from anim.raf of HeavyRain.p3t:
Hakoniwa is the "Photo Gallery" official app (NPIA00006) that comes partially preinstalled in the firmwares (there is a mandatory icon in XMB photo column and is dependant of hknw_plugin.sprx, but the program itself is not installed with the firmware). To use the program is needed to install the .PKG that installs the rest of the files in dev_hdd0/game/NPIA00006/USRDIR/EBOOT.PBP
'''Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F'''
'''00000000'''  <span style="background:#ff6666;">51 52 43 43</span> <span style="background:#8888ff;">00 00 28 00</span> <span style="background:#00ff00;">78 DA</span>                      _RAF..(.


{| class="wikitable"
In path: '''dev_flash/vsh/resource/hknw_plugin/jacket/''' index.cxml, frame_01.cxml, and frame_05.cxml
|-
! Name !! Offset !! Size !! Example !! Remark
|-
| Magic || 0x00 || 0x04 || {{cellcolors|#ff6666}} 5F 52 41 46 || '_RAF'
|-
| _RAF decompressed size || 0x04 || 0x04 || {{cellcolors|#8888ff}} 00 00 28 00 || The size of the _RAF file generated when a RAFO is decompressed
|-
| compressed RAFO || 0x08 || ''varies, up to the end of the _RAF file'' || {{cellcolors|#00FF00}} 78 DA... || RAFO file start offset, compressed with ZLIB
|-
|}


*Notes
*Example of the string table from frame_01.cxml
**The first 2 bytes of the compressed _RAF is the ZLIB header, in this example: 0x78DA
root.version.1.00.jacket.id.normal.base.position.rotation.scale.name.frame_01.filetable.num.file.src.frame_01_lo.gim.lod.frame_01_parallax_512.gtf.shadow_square_1.gtf.shadow_square_2.gtf.shadow_3.gtf.frame_01_mi.gim.frame_01_hi.gim.vptable.vp.vp_jacket_ezprim.vpo.optional.vp_jacket_normalmap.vpo.vp_jacket_ezshadow.vpo.fptable.fp.fp_jacket_ezprim_rgb.fpo.fp_jacket_normalmap_specL.fpo.fp_jacket_ezshadow.fpo.modeltable.model.color.uv.vertex.tangent.binormal.layertable.layer.priority.type.image-frame-static.order.duration.image-thumbnail-auto
**default/max level 9


==== RAFO ====
*Notes:
RAFO ('''R'''ich '''A'''ppearance '''F'''ormat '''O'''?)
**The main tag is <root> like in a standard .xml
**Contains some attribute types (e.g: the second tag <version> has an "attribute type 3" that points to the value "1.00" stored inside the string table) not present in the examples in this wiki page (usefull for completion of the lists of data types numbers)


===Main Header===
=Examples=
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).
==QRC==
Addition: Unlike an QRC Container a RAF can hold much more CXML Elements. The QRC only have <file-table> or <icontable> if it is the icontex.qrc.
QRCF_1 entry size is 60 bytes (0x3C), QRCF_2 and P3TF entry size is 76 bytes (0x4C), and there is a padding at the end of the tables


*The container format is generic (used also by .QRC and .P3T with some variations) so the usage of this tables can vary, in this example there is 1 "not used tables":
*Offset (without the 0x40 header in all qrc files) ---> http://666kb.com/i/cib5c7q4y7rpcx9x1.gif
**one of the "not used tables" (at offset 0x6F0 with a size of 0) is placed before an used table (also at offset 0x6F0 but with a size of 0x7C)
*rhm.qrc v1.00 datatable ---> http://i.imgur.com/P9K2rYj.jpg
**the other "not used table" is placed at the end, so there is no need to store his offset
**The hexeditor view is resized to a width of 0x3C, the marked lines are the 5 entries
**At the start of the first line at top (the line not marked) has been added 4 bytes to be able to align the others to the correct width, this first line at top of the table is the header of the data table


*Example from anim.raf of HeavyRain.p3t:
This .XML is used to build the rhm.qrc container from firmware version 1.00, the tags from the XML are included in the "strings table" inside the container and defines his contents and structure. The example is speculative and based in the XML used by themes
'''Offset(h) 00 01 02 03  04 05 06 07  08 09 0A 0B  0C 0D 0E 0F'''
'''00000000'''  <span style="background:#666666;">52 41 46 4F</span>  <span style="background:#888888;">00 00 01 10</span>  <span style="background:#dddd66;">00 00 00 40</span>  <span style="background:#ffff88;">00 00 63 E0</span>  RAFO.......@..cà
'''00000010'''  <span style="background:#dd6666;">00 00 64 20</span>  <span style="background:#ff8888;">00 00 08 C2</span>  <span style="background:#66dddd;">00 00 6C F0</span>  <span style="background:#88ffff;">00 00 01 FC</span>  ..d...Â...lð...ü
'''00000020'''  <span style="background:#66dd66;">00 00 6E F0</span>  <span style="background:#88ff88;">00 00 00 00</span>  <span style="background:#dd66dd;">00 00 6E F0</span>  <span style="background:#ff88ff;">00 00 00 7C</span>  ..nð......nð...|
'''00000030'''  <span style="background:#6666dd;">00 00 6F 70</span>  <span style="background:#8888ff;">00 3B 2A 70</span>  <span style="background:#aee2ae;">00 00 00 00</span>  <span style="background:#cef2ce;">00 00 00 00</span>  ..op.;*p........


{| class="wikitable"
{{Boxcode|content=<syntaxhighlight lang="xml">
<?xml version="1.0" encoding="UTF-8"?>
<qrc>
<file-table>
<file src="lib/rhm/Clear.fpo" id="lib/rhm/Clear.fpo"/>
<file src="lib/rhm/Clear.vpo" id="lib/rhm/Clear.vpo"/>
<file src="lib/rhm/Copy.fpo" id="lib/rhm/Copy.fpo"/>
<file src="lib/rhm/default.fpo" id="lib/rhm/default.fpo"/>
<file src="lib/rhm/default.vpo" id="lib/rhm/default.vpo"/>
</file-table>
</qrc>
</syntaxhighlight>}}
 
*Notes:
**For QRCF_2 the "size" is added by the compiler, the xml used to build the container doesnt needs it (like in themes)
 
{| class="wikitable" style="font-size:x-small;"
|+[[rhm.qrc]] (v1.00)
! Offset !! Size !! Example !! Name !! Notes !! icontex.qrc (v2.00) !! theme.p3t
|-
|-
! Name !! Offset !! Size !! Example !! Remark
! colspan="5" | CXML Header
|-
|- {{cellcolors|#666666|#ffffff}}
| Magic || 0x00 || 0x04 || {{cellcolors|#666666|#ffffff}} 51 41 46 4F || 'RAFO'
| 0x00 || 0x04 || QRCF || Magic || QRCF (unnofficially: QRCF_1) || QRCF (unnofficially: QRCF_2) || P3TF
|-
|- {{cellcolors|#666666|#ffffff}}
| Version || 0x04 || 0x04 || {{cellcolors|#888888|#ffffff}} 00 00 01 10 ||
| 0x04 || 0x04 || 00000110 || Version || 110 || 110 || 110
|-
|- bgcolor="#ff8888"
| Tree Table Offset || 0x08 || 0x04 || {{cellcolors|#dddd66}} 00 00 00 40 ||  
| 0x08 || 0x04 || 00000040 || Data table absolute start offset || 40 || 40 || 40
|-
|- bgcolor="#ff8888"
| Tree Table Size || 0x0C || 0x04 || {{cellcolors|#ffff88}} 00 00 63 E0 ||  
| 0x0C || 0x04 || 00000164 || Data table size || 164 (without the padding at the end) || 1ECC || 19E8
|- bgcolor="#88ff88"
| 0x10 || 0x04 || 000001B0 || Filename table absolute start offset || 1B0 || 1F10 || 1A30
|- bgcolor="#88ff88"
| 0x14 || 0x04 || 00000071 || Filename table size || 71 (without the padding at the end) || 326 || 599
|- bgcolor="#8888ff"
| 0x18 || 0x04 || 00000230 || Strings table absolute start offset || 230 || 2240 || 1FD0
|- bgcolor="#8888ff"
| 0x1C || 0x04 || 0000001B || Strings table size || 1B without the padding at the end || 20 || 1CE
|- bgcolor="#ffeedd"
| 0x20 || 0x04 || 00000250 || Integer array absolute start offset || ''Overlapped'' || 2260 (overlapped) || 21A0 (overlapped)
|- bgcolor="#ffeedd"
| 0x24 || 0x04 || 00000000 || Integer array size || ''Empty'' || 0 || 0
|- bgcolor="#ffeebb"
| 0x28 || 0x04 || 00000250 || Float array absolute start offset || ''Overlapped'' || 2260 (overlapped) || 21A0 (overlapped)
|- bgcolor="#ffeebb"
| 0x2C || 0x04 || 00000000 || Float array size || ''Empty'' || 0 || 0
|- bgcolor="#ffee99"
| 0x30 || 0x04 || 00000250 || File table absolute start offset || ''Overlaps the previous 2 tables'' || 2260 || 21A0
|- bgcolor="#ffee99"
| 0x34 || 0x04 || 00000DD0 || File table size || ''Overlaps the previous 2 tables'' || AA7F0 || 149890
|- bgcolor="#ffee77"
| 0x38 || 0x04 || 00000000 || Unknown area absolute start offset || ''Not used'' || 0 || 0
|- bgcolor="#ffee77"
| 0x3C || 0x04 || 00000000 || Unknown area size || ''Empty'' || 0 || 0
|-
|-
| ID Table Offset || 0x10 || 0x04 || {{cellcolors|#dd6666}} 00 00 64 20 ||
! colspan="5" | Data Table (first colored area is the header of the data table)
|-
|- {{cellcolors|#ff7777}}
| ID Table Size || 0x14 || 0x04 || {{cellcolors|#ff8888}} 00 00 08 C2 ||  
| 0x40 || 0x04 || 00000000 || xml element TAG name relative offset || 0 = '''qrc''' || 0 = '''qrc''' || 0 = '''theme'''
|-
|- {{cellcolors|#ff7777}}
| String Table Offset || 0x18 || 0x04 || {{cellcolors|#66dddd}} 00 00 6C F0 ||
| 0x44 || 0x04 || 00000000 || xml element number of attributes || 0 = '''no attributes''' || 0 || 0
|-
|- {{cellcolors|#ff7777}}
| String Table Size || 0x1C || 0x04 || {{cellcolors|#88ffff}} 00 00 01 FC ||  
| 0x48 || 0x04 || FFFFFFFF || parent element relative start offset || FFFFFFFF = '''parent doesnt exists''' || FFFFFFFF || FFFFFFFF
|-
|- {{cellcolors|#ff7777}}
| Integer Array Offset || 0x20 || 0x04 || {{cellcolors|#66dd66}} 00 00 06 F0 || Overlapped
| 0x4C || 0x04 || FFFFFFFF || previous brother element relative start offset || FFFFFFFF = '''previous brother doesnt exists''' || FFFFFFFF || FFFFFFFF
|-
|- {{cellcolors|#ff7777}}
| Integer Array size || 0x24 || 0x04 || {{cellcolors|#88ff88}} 00 00 00 00 || Not used
| 0x50 || 0x04 || FFFFFFFF || next brother element relative start offset || FFFFFFFF = '''next brother doesnt exists''' || FFFFFFFF || FFFFFFFF
|-
|- {{cellcolors|#ff7777}}
| Float Array Offset || 0x28 || 0x04 || {{cellcolors|#dd66dd}} 00 00 06 F0 ||
| 0x54 || 0x04 || 0000001C || first children element relative start offset || 0x40 + 0x1C = '''first children at 0x5C absolute''' || 0x40 + 0x1C = 5C absolute || 0x40 + 0x1C = 5C absolute
|-
|- {{cellcolors|#ff7777}}
| Float Array Size || 0x2C || 0x04 || {{cellcolors|#ff88ff}} 00 00 00 7C ||
| 0x58 || 0x04 || 0000001C || last children element relative start offset || 0x40 + 0x1C = '''last children at 0x5C absolute''' || 0x40 + 0x1C = 5C absolute || 0x40 + 0x19CC = 0x1A0C absolute
|- {{cellcolors|#ff8888}}
| 0x5C || 0x04 || 00000004 || xml element TAG name relative offset || 4 = '''file-table''' || 4 = '''file-table''' || 6 = '''icontable'''
|- {{cellcolors|#ff8888}}
| 0x60 || 0x04 || 00000000 || xml element number of attributes || 0 = '''no attributes''' || 0 || 0
|- {{cellcolors|#ff8888}}
| 0x64 || 0x04 || 00000000 || parent element relative start offset || 0x40 + 0x0 = 0x40 absolute = parent is '''qrc''' || 0 = '''qrc''' || 0 = '''theme'''
|- {{cellcolors|#ff8888}}
| 0x68 || 0x04 || FFFFFFFF || previous brother element relative start offset || FFFFFFFF = '''previous brother doesnt exists''' || FFFFFFFF || FFFFFFFF
|- {{cellcolors|#ff8888}}
| 0x6C || 0x04 || FFFFFFFF || next brother element relative start offset || FFFFFFFF = '''next brother doesnt exists''' || FFFFFFFF || 141C (related with value at 0x58, allways same or smaller)
|- {{cellcolors|#ff8888}}
| 0x70 || 0x04 || 00000038 || first children element relative start offset || 0x40 + 0x38 = '''first children at 0x78 absolute''' || 38 || 38
|- {{cellcolors|#ff8888}}
| 0x74 || 0x04 || 00000128 || last children element relative start offset || 0x40 + 0x128 = '''last children at 0x168 absolute''' || 1E80 || 13D0
|- bgcolor="#cccccc"
| colspan="5" | 1st entry start || colspan="2" | 1st entry start
|- {{cellcolors|#ff9999}}
| 0x78 || 0x04 || 0000000F || xml element TAG name relative offset || F = '''file''' || F = '''file''' || 10 = '''icon'''
|- {{cellcolors|#ff9999}}
| 0x7C || 0x04 || 00000002 || xml element number of attributes || 2 attributes = '''src''' and '''id''' || 3 attributes = '''src''', '''id''', and '''size''' || 3 attributes = '''src''', '''id''', and '''size'''
|- {{cellcolors|#ff9999}}
| 0x80 || 0x04 || 0000001C || parent element relative start offset || 0x40 + 0x1C = 0x5C absolute = parent is '''file-table''' || 1C || 1C
|- {{cellcolors|#ff9999}}
| 0x84 || 0x04 || FFFFFFFF || previous brother element relative start offset || FFFFFFFF = '''previous brother doesnt exists''' || FFFFFFFF || FFFFFFFF
|- {{cellcolors|#ff9999}}
| 0x88 || 0x04 || 00000074 || next brother element relative start offset || 0x40 + 0x74 = '''next brother at 0xB4''' || 84 || 84
|- {{cellcolors|#ff9999}}
| 0x8C || 0x04 || FFFFFFFF || first children element relative start offset || FFFFFFFF = '''first children doesnt exists''' || FFFFFFFF || FFFFFFFF
|- {{cellcolors|#ff9999}}
| 0x90 || 0x04 || FFFFFFFF || last children element relative start offset || FFFFFFFF = '''last children doesnt exists''' || FFFFFFFF || FFFFFFFF
|- {{cellcolors|#ffaaaa}}
| 0x94 || 0x04 || 00000014 || xml attribute TAG name relative offset || 14 = '''src''' || 14 = '''src''' || 15 = '''src'''
|- {{cellcolors|#ffaaaa}}
| 0x98 || 0x04 || 00000006 ||  || 6 || 6 || 6
|- {{cellcolors|#ffaaaa}}
| 0x9C || 0x04 || 00000000 || 1st file relative start offset || 0x250 + 0x0 = '''file starts at 0x250''' absolute  || 0 --1st file start-- || 0 --1st file start--
|- {{cellcolors|#ffaaaa}}
| 0xA0 || 0x04 || 00000150 || 1st file size || '''file size is 150''' || 15FF --1st file size-- || 29BB --1st file size--
|- {{cellcolors|#ffbbbb}}
| 0xA4 || 0x04 || 00000018 || xml attribute TAG name relative offset || 18 = '''id''' || 18 = '''id''' || 19 = '''id'''
|- {{cellcolors|#ffbbbb}}
| 0xA8 || 0x04 || 00000007 ||  || 7 || 7 || 7
|- {{cellcolors|#ffbbbb}}
| 0xAC || 0x04 || 00000000 || 1st filename relative start offset || 0x1B0 + 0x0 = '''filename starts at 0x1B0''' absolute || 0 --1st filename start-- || 0 --1st filename start--
|- {{cellcolors|#ffbbbb}}
| 0xB0 || 0x04 || 00000000 || 1st filename size related ? || '''filename size is... 0''' wtf ? || 0 || 0
|- bgcolor="#cccccc"
| colspan="5" | 2nd entry start
|-
| 0xB4 || 0x04 || 0000000F || xml element TAG name relative offset || || {{cellcolors|#ffcccc}} 1B = '''size''' || {{cellcolors|#ffcccc}} 1C = '''size'''
|-
|-
| File Table Offset || 0x30 || 0x04 || {{cellcolors|#6666dd}} 00 00 6F 70 ||
| 0xB8 || 0x04 || 00000002 || xml element number of attributes || 2 || {{cellcolors|#ffcccc}} 1 || {{cellcolors|#ffcccc}} 1
|-
|-
| File Table Size || 0x34 || 0x04 || {{cellcolors|#8888ff}} 00 3B 2A 70 ||
| 0xBC || 0x04 || 0000001C || parent element relative start offset || || {{cellcolors|#ffcccc}} 55D5 --1st file size uncompressed ?-- || {{cellcolors|#ffcccc}} 10080 --1st file size uncompressed ?--
|-
|-
| ''Unknown Table Offset'' || 0x38 || 0x04 || {{cellcolors|#aee2ae}} 00 00 00 00 || Not present
| 0xC0 || 0x04 || 00000038 || previous brother element relative start offset || 0x40 + 0x38 = 0x78 || {{cellcolors|#ffcccc}} 0 || {{cellcolors|#ffcccc}} 0
|-
|-
| ''Unknown Table Size'' || 0x3C || 0x04 || {{cellcolors|#cef2ce}} 00 00 00 00 || Not Used
| 0xC4 || 0x04 || 000000B0 || next brother element relative start offset || 0x40 + 0xB0 = 0xF0 || {{cellcolors|#cccccc}} F --2nd entry start-- || {{cellcolors|#cccccc}} 10 --2nd entry start--
|-
|-
|}
| 0xC8 || 0x04 || FFFFFFFF || first children element relative start offset || || 3 = compressed ? || 3 = compressed ?
 
|-
*Notes
| 0xCC || 0x04 || FFFFFFFF || last children element relative start offset || || 1C || 1C
**The sizes doesn't includes the (posible) padding at the end of all tables
|-
 
| 0xD0 || 0x04 || 00000014 || xml attribute TAG name relative offset || || 38 --previous entry-- || 38 --previous entry--
===Tree Table===
|-
{| class="wikitable"
| 0xD4 || 0x04 || 00000006 || || || D0 --next entry-- || D0 --next entry--
! Offset !! Size !! Example !! Remark
|-
| 0xD8 || 0x04 || 00000150 || 2th file relative start offset || 0x250 + 0x150 = 0x3A0 || FFFFFFFF || FFFFFFFF
|-
| 0xDC || 0X04 || 000000E0 || 2th file size || || FFFFFFFF || FFFFFFFF
|-
| 0xE0 || 0x04 || 00000018 || xml attribute TAG name relative offset || || 14 || 15
|-
| 0xE4 || 0x04 || 00000007 || || || 6 || 6
|-
|-
| 0x00 || 0x04 || 00 00 00 00 || Root Element (Offset within '''String Table''', in this case it will be <raf>)
| 0xE8 || 0x04 || 00000016 || 2th filename relative start offset || 0x1B0 + 0x16 = 0x1C6 || 1600 ---2nd file start--- || 29C0 ---2nd file start---
|-
|-
| 0x04 || 0x04 || 00 00 00 01 || Attribute Counter
| 0xEC || 0x04 || 00000000 || || || 1B51 ---2nd file size--- || 2500 ---2nd file size---
|- bgcolor="#cccccc"
| colspan="5" | 3rd entry start
|-
|-
| 0x08 || 0x04 || FF FF FF FF  || Parent
| 0xF0 || 0x04 || 0000000F || xml element TAG name relative offset || || 18 || 19
|-
|-
| 0x0C || 0x04 || FF FF FF FF || Previous Element
| 0xF4 || 0x04 || 00000002 || xml element number of attributes || 2 || 7 || 7
|-
|-
| 0x10 || 0x04 || FF FF FF FF || Next Element
| 0xF8 || 0x04 || 0000001C || parent element relative start offset || || 7 ---2nd filename start--- || E ---2nd filename start---
|-
|-
| 0x14 || 0x04 || 00 00 00 2C || First Entry within the root Element (raf)
| 0xFC || 0x04 || 00000074 || previous brother element relative start offset || 0x40 + 0x74 = 0xB4 || 0 || 0
|-
|-
| 0x18 || 0x04 || 00 00 57 3C || Last Entry within the root Element (raf)
| 0x100 || 0x04 || 000000EC || next brother element relative start offset  || 0x40 + 0xEC = 0x12C || 1B || 1C
|-
|-
| 0x1C || 0x04 || 00 00 00 04 || String Pointer (Offset within '''String Table''', in this case it will be <version>)
| 0x104 || 0x04 || FFFFFFFF || first children element relative start offset || || 1 || 1
|-
|-
| 0x20 || 0x04 || 00 00 00 02 || Type descriptor (2 == Float)
| 0x108 || 0x04 || FFFFFFFF || last children element relative start offset || || 155D4 --2nd file size uncompressed-- || 10080 --2nd file size uncompressed--
|-
|-
| 0x24 || 0x04 || 3F 80 00 00 || Float value (1.1E0)
| 0x10C || 0x04 || 00000014 || xml attribute TAG name relative offset || || 0 || 0
|-
|-
| 0x28 || 0x04 || 00 00 00 00 || empty value
| 0x110 || 0x04 || 00000006 || || || {{cellcolors|#cccccc}} F --3rd entry start-- || {{cellcolors|#cccccc}} 10 --3ed entry start--
|-
|-
| 0x2C || 0x04 || 00 00 00 0C || String Pointer (in this case <scene>)
| 0x114 || 0x04 || 00000230 || 3th file relative start offset || 0x250 + 0x230 = 0x480 || 3 = compressed ? || 3 = compressed ?
|-
|-
| 0x30 || 0x04 || 00 00 00 04 || Attribute Counter
| 0x118 || 0x04 || 00000120 || 3th file size ||  || 1C || 1C
|-
|-
| 0x34 || 0x04 || 00 00 00 00 || Parent
| 0x11C || 0x04 || 00000018 || xml attribute TAG name relative offset ||  
|-
|-
| 0x38 || 0x04 || FF FF FF FF || Previous Element
| 0x120 || 0x04 || 00000007 ||  ||  
|-
|-
| 0x3C || 0x04 || 00 00 3F AC || Next Element
| 0x124 || 0x04 || 0000002C || 3th filename relative start offset || 0x1B0 + 0x2C = 0x1DC
|-
|-
| 0x40 || 0x04 || 00 00 00 88 || First Entry
| 0x128 || 0x04 || 00000000 || ||
|- bgcolor="#cccccc"
| colspan="5" | 4th entry start
|-
|-
| 0x44 || 0x04 || 00 00 3F 70 || Next Entry
| 0x12C || 0x04 || 0000000F || xml element TAG name relative offset ||  
|-
|-
| 0x48 || 0x04 || 00 00 00 12 || String Pointer (in this case <camera_num>)
| 0x130 || 0x04 || 00000002 || xml element number of attributes || 2
|-
|-
| 0x4C || 0x04 || 00 00 00 01 || Type descriptor (1 == Integer)
| 0x134 || 0x04 || 0000001C || parent element relative start offset ||  
|-
|-
| 0x50 || 0x04 || 00 00 00 01 || Integer value
| 0x138 || 0x04 || 000000B0 || previous brother element relative start offset || 0x40 + 0xB0 = 0xF0
|-
|-
| 0x54 || 0x04 || 00 00 00 00 || empty value
| 0x13C || 0x04 || 00000128 || next brother element relative start offset || 0x40 + 0x128 = 0x168
|-
|-
| 0x58 || 0x04 || 00 00 00 1D || String Pointer (in this case <light_num>)
| 0x140 || 0x04 || FFFFFFFF || first children element relative start offset ||  
|-
|-
| 0x5C || 0x04 || 00 00 00 01 || Type descriptor (1 == Integer)
| 0x144 || 0x04 || FFFFFFFF || last children element relative start offset ||  
|-
|-
| 0x60 || 0x04 || 00 00 00 01 || Integer value
| 0x148 || 0x04 || 00000014 || xml attribute TAG name relative offset ||  
|-
|-
| 0x64 || 0x04 || 00 00 00 00 || empty value
| 0x14C || 0x04 || 00000006 ||  ||  
|-
|-
| 0x68 || 0x04 || 00 00 00 27 || String Pointer (in this case <script_num>)
| 0x150 || 0x04 || 00000350 || 4th file relative start offset || 0x250 + 0x350 = 0x5A0
|-
|-
| 0x6C || 0x04 || 00 00 00 01 || Type descriptor (1 == Integer)
| 0x154 || 0x04 || 000001F0 || 4th file size ||  
|-
|-
| 0x70 || 0x04 || 00 00 00 01 || Integer value
| 0x158 || 0x04 || 00000018 || xml attribute TAG name relative offset ||  
|-
|-
| 0x74 || 0x04 || 00 00 00 00 || empty value
| 0x15C || 0x04 || 00000007 ||  ||  
|-
|-
| 0x78 || 0x04 || 00 00 00 32 || String Pointer (in this case <actor_num>)
| 0x160 || 0x04 || 00000041 || 4th filename relative start offset || 0x1B0 + 0x41 = 0x1F1
|-
|-
| 0x7C || 0x04 || 00 00 00 01 || Type descriptor (1 == Integer)
| 0x164 || 0x04 || 00000000 || ||
|- bgcolor="#cccccc"
| colspan="5" | 5th entry start
|-
|-
| 0x80 || 0x04 || 00 00 00 48 || Integer value
| 0x168 || 0x04 || 0000000F || xml element TAG name relative offset ||  
|-
|-
| 0x84 || 0x04 || 00 00 00 00 || empty value
| 0x16C || 0x04 || 00000002 || xml element number of attributes || 2
|-
|-
| 0x88 || 0x04 || 00 00 00 3C || String Pointer (in this case <actor>)
| 0x170 || 0x04 || 0000001C || parent element relative start offset ||  
|-
|-
| 0x8C || 0x04 || 00 00 00 0C || Attribute Counter (0x0C == 12)
| 0x174 || 0x04 || 000000EC || previous brother element relative start offset || 0x40 + 0xEC = 0x12C
|-
|-
| 0x90 || 0x04 || 00 00 00 2C || Parent
| 0x178 || 0x04 || FFFFFFFF || next brother element relative start offset || FFFFFFFF = '''next entry doesnt exists'''
|-
|-
| 0x94 || 0x04 || FF FF FF FF || Previous Element
| 0x17C || 0x04 || FFFFFFFF || first children element relative start offset ||  
|-
|-
| 0x98 || 0x04 || 00 00 01 64 || Next Element
| 0x180 || 0x04 || FFFFFFFF || last children element relative start offset ||  
|-
|-
| 0x9C || 0x04 || FF FF FF FF || Firs Entry
| 0x184 || 0x04 || 00000014 || xml attribute TAG name relative offset ||  
|-
|-
| 0xA0 || 0x04 || FF FF FF FF || Last Entry
| 0x188 || 0x04 || 00000006 ||  ||  
|-
|-
|}
| 0x18C || 0x04 || 00000540 || 5th file relative start offset || 0x250 + 0x540 = 0x790
 
|-
===String Table===
| 0x190 || 0x04 || 00000890 || 5th file size ||
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. This list doesnt makes differences of the "directory hierarchy" of the tags neither is specified 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)
|-
   
| 0x194 || 0x04 || 00000018 || xml attribute TAG name relative offset ||
'''Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F'''
|-
'''00000000'''  <span style="background:#ffff66;">72 61 66 00 76 65 72 73 69 6F 6E 00 73 63 65 6E</span>  raf.version.scen
| 0x198 || 0x04 || 00000007 || ||
'''00000010'''  <span style="background:#ffff66;">65 00 63 61 6D 65 72 61 5F 6E 75 6D 00 6C 69 67</span>  e.camera_num.lig
|-
  '''00000020'''  <span style="background:#ffff66;">68 74 5F 6E 75 6D 00 73 63 72 69 70 74 5F 6E 75</span>  ht_num.script_nu
| 0x19C || 0x04 || 00000059 || 5th filename relative start offset || 0x1B0 + 0x59 = 0x209
'''00000030'''  <span style="background:#ffff66;">6D 00 61 63 74 6F 72 5F 6E 75 6D 00 61 63 74 6F</span>  m.actor_num.acto
|-
'''00000040'''  <span style="background:#ffff66;">72 00 61 6E 69 6D 5F 73 70 65 65 64    [...]  </span>  r.anim_speed[..]
| 0x1A0 || 0x04 || 00000000 || ||
 
|- bgcolor="#cccccc"
*Notes:
| 0x1A4 || 0x0C || 00000000... || ''padding'' to align to a multiply of 0x10 ||
**yellow: used bytes
|-
 
! colspan="5" | Filename Table
===ID Table===
'''Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F'''
'''00000000'''  00 00 49 A8 6D 74 72 6C 5F 62 67 00 00 00 00 88  ..I¨mtrl_bg....ˆ
'''00000010'''  62 61 63 6B 67 72 6F 75 6E 64 00 00 00 3F D8 70  background...?Øp
'''00000020'''  6C 61 6E 65 00 00 00 4A 10 6D 74 72 6C 5F 72 75  lane...J.mtrl_ru
'''00000030'''  69 73 73 00 00 00 01 64 72 75 69 73 73 65 6C 00  iss....druissel.
'''00000040'''  00 00 40 7C 73 63 72 6F 6C 6C 5F 70 6C 61 6E 65  ..@|scroll_plane
'''00000050'''                      [...]                            [...]
 
===Float Array===
Used from the Attribute Type Describtor 0x00000005 '''Float Array'''
 
'''Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F'''                                          '''Coverted Float Value (4 values each 4bytes)'''
'''00000000'''  3F 80 00 00 3F 80 00 00 3F 80 00 00 3F 80 00 00  ?€..?€..?€..?€..                        '''1.0E0, 1.0E0, 1.0E0, 1.0E0'''
'''00000010'''  00 00 00 00 00 00 00 00 3F 80 00 00 00 00 00 00  ........?€......                        '''0.0E0, 0.0E0, 1.0E0, 0.0E0'''
'''00000020'''  00 00 00 00 00 00 00 00 3F 80 00 00 BF 80 00 00  ........?€..¿€..                        '''0.0E0, 0.0E0, 1.0E0, -1.0E0'''
'''00000030'''  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................                        '''0.0E0, 0.0E0, 0.0E0, 0.0E0'''
'''00000040'''  41 00 00 00 41 00 00 00 41 08 00 00 40 87 CF D5  A...A...A...@‡ÏÕ                        '''8.0E0, 8.0E0, 8.5E0, 4.244120121002197265625E0'''
'''00000050'''  C0 8D 49 7B C1 09 9E ED 3F C0 00 00 00 00 00 00  À.I{Á.ží?À......                        '''-4.415219783782958984375E0, -8.60130023956298828125E0, 1.5E0, 0.0E0'''
'''00000060'''  00 00 00 00 3D AE 14 7B BC 93 74 BC 3F 59 99 9A  ....=®.{¼“t¼?Y™š                        '''0.0E0, 8.5000000894069671630859375E-2, -1.7999999225139617919921875E-2, 8.5000002384185791015625E-1'''
'''00000070'''  40 E2 45 A2 BF 80 00 00 C1 CA A5 E3              @âE¢¿€..ÁÊ¥ã                            '''7.07100009918212890625E0, -1.0E0, -2.53309993743896484375E1'''
 
===File Table===
The files are not concatenated in the same order than in the '''Tree Table''' & '''ID Table'''. There are even some '''ID''' String's withing the Table which are not any file from the container at all.
 
==Summary==
===Table Description===
 
===Type Description===
{| class="wikitable"
|-
|-
! Value !! Typ !!  Notes
| 0x1B0 || 0x04 || 00000038 || 1st data, start offset (relative to data table start offset) || 0x40 + 0x38 = 0x78
|-
|-
| 0x00000001 || '''Integer''' || Composed of '''Value''' 4 bytes long
| 0x1B4 || 0x12 || lib/rhm/Clear.fpo || 1st file name || included 1 NULL byte at the end
|-
|-
| 0x00000002 || '''Float''' || Composed of '''Value''' 4 bytes long
| 0x1C6 || 0x04 || 00000074 || 2nd data, start offset (relative to data table start offset) || 0x40 + 0x74 = 0xB4
|-
|-
| 0x00000005  || '''Float Array''' || Composed of '''Offset''' and '''Count''' each 4 bytes long
| 0x1CA || 0x12 || lib/rhm/Clear.vpo || 2nd file name || included 1 NULL byte at the end
|-
|-
| 0x00000006 || '''File''' || Composed of '''Offset''' and '''Size''' each 4 bytes long
| 0x1DC || 0x04 || 000000B0 || 3rd data, start offset (relative to data table start offset) || 0x40 + 0xB0 = 0xF0
|-
|-
| 0x00000007 || '''ID with ref''' || Composed of '''Offset''' 4 bytes long
| 0x1E0 || 0x11 || lib/rhm/Copy.fpo || 3rd file name || included 1 NULL byte at the end
|-
|-
| 0x00000008 || '''ID without ref''' || Composed of '''Offset''' 4 bytes long
| 0x1F1 || 0x04 || 000000EC || 4th data, start offset (relative to data table start offset) || 0x40 + 0xEC = 0x12C
|-
|-
|}
| 0x1F5 || 0x14 || lib/rhm/default.fpo || 4th file name || included 1 NULL byte at the end
 
|-
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 with ref''' is used to descripe the Offset of a Filename within the '''ID Table''' with the use of a 4 byte long reference, starting from the Offset given. The Second value from '''ID''' seems not to be used in Containers. So '''ID without ref''' is the same but it doesn't use an reference byte (aka. the Offset of Element). Similar to  '''ID''', the '''Integer''' Typ only use one value the second one seems not to be used. '''Float''' is identical to '''Integer'''. '''Float Array''' is used to describe the offset and count of float values. But offset will be readed as a float count just like the second var float count it self, only with the diff it is meant as offset and you start to read the given Float count from there. Example: offset 7, float_count 2 == offset 7 (7 float values to jump, á 4 bytes * 7 = 28 so Offset = 0x28) float_count 2 (2 float values to take from offset 0x28 á 4 byts long so 8 bytes to read). Result in bytes: offset == 0x28, float_count == 0x08.
| 0x209 || 0x04 || 00000128 || 5th data, start offset (relative to data table start offset) || 0x40 + 0x128 = 0x168
* '''ID with ref''' (0x00000007) is using the entry Offset from the Element (to which the Attribute belongs) as reference byte to compare if it is using the correct Filename for the processing File.
|-
* '''ID without ref''' (0x00000008) doesn't. Or at least if it does it, it knows that the returned value will be a false one.
| 0x20D || 0x14 || lib/rhm/default.vpo || 5th file name || included 1 NULL byte at the end
 
|- bgcolor="#cccccc"
==CXML==
| 0x221 || 0xF || 00000000... || ''padding'' to align the filename table to a multiply of 0x10 ||
 
|-
====HKNW====
! colspan="5" | Strings table
Magic of the container is '''HKNW''' (acronym of hakoniwa)
|-
| 0x230 || 0x1B || qrc file-table file src id || Container identifyer (first tag) + other tags from MAKE.XML || <syntaxhighlight lang="xml"> <qrc> <file-table> <file src= id=/></syntaxhighlight> || <syntaxhighlight lang="xml"> <qrc> <file-table> <file src= id= size=/></syntaxhighlight> || <syntaxhighlight lang="xml"> <theme> <icontable> <icon src= id= size=/></syntaxhighlight>
|- bgcolor="#cccccc"
| 0x24B || 0x5 || 00000000... || ''padding'' to align the filename table to a multiply of 0x10 ||
|-
! colspan="5" | File Table
|-
| 0x250 || 0x150 || 00001B5C... || 1st file ||
|-
| 0x3A0 || 0x1E0 || 00001B5B... || 2nd file ||
|-
| 0x480 || 0x120 || 00001B5C... || 3rd file ||
|-
| 0x5A0 || 0x1F0 || 00001B5C... || 4th file ||
|-
| 0x790 || 0x890 || 00001B5B... || 5th file ||
|-
|}


Hakoniwa is the "Photo Gallery" official app (NPIA00006) that comes partially preinstalled in the firmwares (there is a mandatory icon in XMB photo column and is dependant of hknw_plugin.sprx, but the program itself is not installed with the firmware). To use the program it is needed to install the .PKG that installs the rest of the files in dev_hdd0/game/NPIA00006/USRDIR/EBOOT.PBP
'''rhm.qrc (from firmware 1.00)'''
 
<div style="height:450px; overflow:auto">
In path: '''dev_flash/vsh/resource/hknw_plugin/jacket/''' index.cxml, frame_01.cxml, and frame_05.cxml
Offset(h) 00      04      08      0C
 
*Example of the string table from frame_01.cxml
00000000  51524346 00000110 00000040 00000164  [email protected]
 
00000010  000001B0 00000071 00000230 0000001B  ...°...q...0....
{{Boxcode|code=<syntaxhighlight lang="xml">
00000020  00000250 00000000 00000250 00000000  ...P.......P....
root.version.1.00.jacket.id.normal.base.position.rotation.scale.name.frame_01.filetable.num.file.src.frame_01_lo.gim.lod.frame_01_parallax_512.gtf.shadow_square_1.gtf.shadow_square_2.gtf.shadow_3.gtf.frame_01_mi.gim.frame_01_hi.gim.vptable.vp.vp_jacket_ezprim.vpo.optional.vp_jacket_normalmap.vpo.vp_jacket_ezshadow.vpo.fptable.fp.fp_jacket_ezprim_rgb.fpo.fp_jacket_normalmap_specL.fpo.fp_jacket_ezshadow.fpo.modeltable.model.color.uv.vertex.tangent.binormal.layertable.layer.priority.type.image-frame-static.order.duration.image-thumbnail-auto
00000030  00000250 00000DD0 00000000 00000000  ...P...Ð........
</syntaxhighlight>}}
00000040  00000000 00000000 FFFFFFFF FFFFFFFF  ........ÿÿÿÿÿÿÿÿ
 
00000050  FFFFFFFF 0000001C 0000001C 00000004  ÿÿÿÿ............
*Notes:
00000060  00000000 00000000 FFFFFFFF FFFFFFFF  ........ÿÿÿÿÿÿÿÿ
**The main tag is <root> like in a standard .xml
00000070  00000038 00000128 0000000F 00000002  ...8...(........
**Contains some attribute types (e.g: the second tag <version> has an "attribute type 3" that points to the value "1.00" stored inside the string table) not present in the examples in this wiki page (usefull for completion of the lists of data types numbers)
00000080  0000001C FFFFFFFF 00000074 FFFFFFFF  ....ÿÿÿÿ...tÿÿÿÿ
 
00000090  FFFFFFFF 00000014 00000006 00000000  ÿÿÿÿ............
=Examples=
000000A0  00000150 00000018 00000007 00000000  ...P............
 
000000B0  00000000 0000000F 00000002 0000001C  ................
==QRC==
000000C0  00000038 000000B0 FFFFFFFF FFFFFFFF  ...8...°ÿÿÿÿÿÿÿÿ
The structure of QRCF_1 (same structure used by rhm.qrc in the example below and all .qrc files except icontex.qrc) is composed by a element table named '''file-table''' containing one or more elements '''file''' that are associated with the attributes '''src''' and '''id'''
000000D0  00000014 00000006 00000150 000000E0  ...........P...à
 
000000E0  00000018 00000007 00000016 00000000  ................
QRC doesnt makes any difference of the stored file type, all them are considered generic files and stored in the same table, this is why QRCF_1 is considered one of the most simple CXML structure variations (a container for generic files). The example used here is '''rhm.qrc''' from firmware 1.00 because is the smallest version of rhm.qrc only containing 5 files
000000F0  0000000F 00000002 0000001C 00000074  ...............t
 
00000100  000000EC FFFFFFFF FFFFFFFF 00000014  ...ìÿÿÿÿÿÿÿÿ....
For QRCF_1 every entry is composed by the element '''file''' (28 bytes) and his associated attributes: '''src''' (16 bytes), and '''id''' (16 bytes), for a total size of 60 bytes (or 0x3C)
00000110  00000006 00000230 00000120 00000018  .......0... ....
 
 
For QRCF_2


==P3T==
=Tools=
====P3TF====
There are several variations of the CXML container structure used by themes, but one of the tables used by themes is a '''icontable''' containing one of more '''icon''', where every entry is composed by the element '''icon''' (28 bytes) and his associated attributes: '''src''' (16 bytes), '''id''' (16 bytes), and '''size''' (16 bytes) for a total size of 76 bytes (or 0x4C)
 
This '''icontable''' substructure containing one of more '''icon''' is exactly the same than the '''file-table''' containing one or more '''file''' used by QRCF_2
 
*Notes:
**See: http://www.psdevwiki.com/ps3/Themes_%28.p3t%29#Theme_Name_.28.XML.29 for an example of an XML before compilation, and see: http://www.psdevwiki.com/ps3/Talk:Themes_%28.p3t%29#p3t_format.2C_p3tcompiler.2C_and_p3textractor_notes for a list of tags added by the compiler
 
==RAF==
====RAFO====
 
{| class="wikitable" style="font-size:x-small;"
|+ coldboot.raf (v2.70)
! Offset !! Size !! Example !! Name !! Notes
|-
! colspan="5" | CXML Header
|- {{cellcolors|#666666|#ffffff}}
| 0x00 || 0x04 || RAFO || Magic ||
|- {{cellcolors|#666666|#ffffff}}
| 0x04 || 0x04 || 00000110 || Version || 110
|- bgcolor="#ff8888"
| 0x08 || 0x04 || 00000040 || Data table absolute start offset || 40
|- bgcolor="#ff8888"
| 0x0C || 0x04 || 00001288 || Data table size || 1288
|- bgcolor="#88ff88"
| 0x10 || 0x04 || 000012D0 || Filename table absolute start offset || 12D0
|- bgcolor="#88ff88"
| 0x14 || 0x04 || 0000021C || Filename table size || 21C
|- bgcolor="#8888ff"
| 0x18 || 0x04 || 000014F0 || Strings table absolute start offset || 14F0
|- bgcolor="#8888ff"
| 0x1C || 0x04 || 000001B1 || Strings table size || 1B1
|- bgcolor="#ffeedd"
| 0x20 || 0x04 || 000016B0 || Integer array absolute start offset || 16B0 (overlapped)
|- bgcolor="#ffeedd"
| 0x24 || 0x04 || 00000000 || Integer array size || 0
|- bgcolor="#ffeebb"
| 0x28 || 0x04 || 000016B0 || Float array absolute start offset || 16B0
|- bgcolor="#ffeebb"
| 0x2C || 0x04 || 000000A0 || Float array size || A0
|- bgcolor="#ffee99"
| 0x30 || 0x04 || 00001750 || File table absolute start offset || 1750
|- bgcolor="#ffee99"
| 0x34 || 0x04 || 0018F9F0 || File table size || 18F9F0
|- bgcolor="#ffee77"
| 0x38 || 0x04 || 00000000 || Unknown area absolute start offset || 0
|- bgcolor="#ffee77"
| 0x3C || 0x04 || 00000000 || Unknown area size || 0
|-
! colspan="5" | Data Table
|- bgcolor="#cccccc"
| colspan="5" | element start (raf)
|- {{cellcolors|#ff6666}}
| 0x40 || 0x04 || 00000000 || xml element TAG name relative offset || 0 = '''raf'''
|- {{cellcolors|#ff6666}}
| 0x44 || 0x04 || 00000001 || xml element number of attributes || 1 attribute
|- {{cellcolors|#ff6666}}
| 0x48 || 0x04 || FFFFFFFF || parent element relative start offset || FFFFFFFF = '''parent doesnt exists'''
|- {{cellcolors|#ff6666}}
| 0x4C || 0x04 || FFFFFFFF || previous brother element relative start offset || FFFFFFFF = '''previous brother doesnt exists'''
|- {{cellcolors|#ff6666}}
| 0x50 || 0x04 || FFFFFFFF || next brother element relative start offset || FFFFFFFF = '''next brother doesnt exists'''
|- {{cellcolors|#ff6666}}
| 0x54 || 0x04 || 0000002C || first children element relative start offset || 0x40 + 0x2C = 0x6C absolute
|- {{cellcolors|#ff6666}}
| 0x58 || 0x04 || 00000FB0 || last children element relative start offset || 0x40 + 0xFB0 = 0xFF0 absolute
|- bgcolor="#cccccc"
| colspan="5" | attribute start "version" (is an attribute of "raf" element)
|- {{cellcolors|#ff8888}}
| 0x5C || 0x04 || 00000004 || xml attribute TAG name relative offset || 4 = '''version'''
|- {{cellcolors|#ff8888}}
| 0x60 || 0x04 || 00000002 || xml attribute TAG type || 2
|- {{cellcolors|#ff8888}}
| 0x64 || 0x04 || 3F800000 || float || 3F800000 = '''1.0'''
|- {{cellcolors|#ff8888}}
| 0x68 || 0x04 || 00000000 || Not used || 0
|- bgcolor="#cccccc"
| colspan="5" | element start "scene" (is the 1st children of "raf" element)
|- {{cellcolors|#ff6666}}
| 0x6C || 0x04 || 0000000C || xml element TAG name relative offset || C = '''scene'''
|- {{cellcolors|#ff6666}}
| 0x70 || 0x04 || 00000004 || xml element number of attributes || 4 attributes ('''camera_num''', '''light_num''', '''script_num''', and '''actor_num''')
|- {{cellcolors|#ff6666}}
| 0x74 || 0x04 || 00000000 || parent element relative start offset || 0 = parent is '''raf'''
|- {{cellcolors|#ff6666}}
| 0x78 || 0x04 || FFFFFFFF || previous brother element relative start offset || FFFFFFFF = '''previous brother doesnt exists'''
|- {{cellcolors|#ff6666}}
| 0x7C || 0x04 || 00000750 || next brother element relative start offset || 0x40 + 0x750 = 0x790 absolute
|- {{cellcolors|#ff6666}}
| 0x80 || 0x04 || 00000088 || first children element relative start offset || 0x40 + 0x88 = C8 absolute = first children is '''actor'''
|- {{cellcolors|#ff6666}}
| 0x84 || 0x04 || 00000714 || last children element relative start offset || 0x40 + 714 = 754 absolute
|- bgcolor="#cccccc"
| colspan="5" | attribute start "camera_num" (is an attribute of "scene" element)
|- {{cellcolors|#ff9999}}
| 0x88 || 0x04 || 00000012 || xml attribute TAG name relative offset || 12 = '''camera_num'''
|- {{cellcolors|#ff9999}}
| 0x8C || 0x04 || 00000001 || xml attribute TAG type || 1
|- {{cellcolors|#ff9999}}
| 0x90 || 0x04 || 00000001 || integer || 1
|- {{cellcolors|#ff9999}}
| 0x94 || 0x04 || 00000000 || Not used || 0
|- bgcolor="#cccccc"
| colspan="5" | attribute start "light_num" (is an attribute of "scene" element)
|- {{cellcolors|#ff9999}}
| 0x98 || 0x04 || 0000001D || xml attribute TAG name relative offset || 1D = '''light_num'''
|- {{cellcolors|#ff9999}}
| 0x9C || 0x04 || 00000001 || xml attribute TAG type || 1
|- {{cellcolors|#ff9999}}
| 0xA0 || 0x04 || 00000002 || integer || 2
|- {{cellcolors|#ff9999}}
| 0xA4 || 0x04 || 00000000 || Not used || 0
|- bgcolor="#cccccc"
| colspan="5" | attribute start "script_num" (is an attribute of "scene" element)
|- {{cellcolors|#ff9999}}
| 0xA8 || 0x04 || 00000027 || xml attribute TAG name relative offset || 27 = '''script_num'''
|- {{cellcolors|#ff9999}}
| 0xAC || 0x04 || 00000001 || xml attribute TAG type || 1
|- {{cellcolors|#ff9999}}
| 0xB0 || 0x04 || 00000001 || integer || 1
|- {{cellcolors|#ff9999}}
| 0xB4 || 0x04 || 00000000 || Not used || 0
|- bgcolor="#cccccc"
| colspan="5" | attribute start "actor_num" (is an attribute of "scene" element)
|- {{cellcolors|#ff9999}}
| 0xB8 || 0x04 || 00000032 || xml attribute TAG name relative offset || 32 = '''actor_num'''
|- {{cellcolors|#ff9999}}
| 0xBC || 0x04 || 00000001 || xml attribute TAG type || 1
|- {{cellcolors|#ff9999}}
| 0xC0 || 0x04 || 00000006 || integer || 6
|- {{cellcolors|#ff9999}}
| 0xC4 || 0x04 || 00000000 || Not used || 0
|- bgcolor="#cccccc"
| colspan="5" | element start "actor" (is the children of "scene" element)
|- {{cellcolors|#ff6666}}
| 0xC8 || 0x04 || 0000003C || xml element TAG name relative offset || 3C = '''actor'''
|- {{cellcolors|#ff6666}}
| 0xCC || 0x04 || 0000000C || xml element number of attributes || C = 12 attributes
|- {{cellcolors|#ff6666}}
| 0xD0 || 0x04 || 0000002C || parent element relative start offset || 0x40 + 0x2C = 0x6C absolute = parent is '''scene'''
|- {{cellcolors|#ff6666}}
| 0xD4 || 0x04 || FFFFFFFF || previous brother element relative start offset || FFFFFFFF = '''previous brother doesnt exists'''
|- {{cellcolors|#ff6666}}
| 0xD8 || 0x04 || 00000164 || next brother element relative start offset || 0x40 + 0x164 = 1C4 absolute
|- {{cellcolors|#ff6666}}
| 0xDC || 0X04 || FFFFFFFF || first children element relative start offset || FFFFFFFF = '''first children doesnt exists'''
|- {{cellcolors|#ff6666}}
| 0xE0 || 0x04 || FFFFFFFF || last children element relative start offset || FFFFFFFF = '''last children doesnt exists'''
|- bgcolor="#cccccc"
| colspan="5" | attribute start "anim_speed" (is an attribute of "actor" element)
|- {{cellcolors|#ff9999}}
| 0xE4 || 0x04 || 00000042 || xml attribute TAG name relative offset || 42 = '''anim_speed'''
|- {{cellcolors|#ff9999}}
| 0xE8 || 0x04 || 00000005 || xml attribute TAG type || 5
|- {{cellcolors|#ff9999}}
| 0xEC || 0x04 || 00000000 || Float Arrays Table offset || 0
|- {{cellcolors|#ff9999}}
| 0xF0 || 0x04 || 00000004 || Array size || 4 = '''1.0,1.0,1.0,1.0'''
|- bgcolor="#cccccc"
| colspan="5" | attribute start "scale" (is an attribute of "actor" element)
|- {{cellcolors|#ff9999}}
| 0xF4 || 0x04 || 0000004D || xml attribute TAG name relative offset || 4D = '''scale'''
|- {{cellcolors|#ff9999}}
| 0xF8 || 0x04 || 00000005 || xml attribute TAG type || 5
|- {{cellcolors|#ff9999}}
| 0xFC || 0x04 || 00000004 || Float Arrays Table offset || 4
|- {{cellcolors|#ff9999}}
| 0x100 || 0x04 || 00000003 || Array size || 3 = '''1.28,0.64,0.64'''
|- bgcolor="#cccccc"
| colspan="5" | attribute start "uv_offset" (is an attribute of "actor" element)
|- {{cellcolors|#ff9999}}
| 0x104 || 0x04 || 00000053 || xml attribute TAG name relative offset || 53 = '''uv_offset'''
|- {{cellcolors|#ff9999}}
| 0x108 || 0x04 || 00000005 || xml attribute TAG type || 5
|- {{cellcolors|#ff9999}}
| 0x10C || 0x04 || 00000007 || Float Arrays Table offset || 7
|- {{cellcolors|#ff9999}}
| 0x110 || 0x04 || 00000002 || Array size || 2 = '''0.0,0.0'''
|- bgcolor="#cccccc"
| colspan="5" | attribute start "color" (is an attribute of "actor" element)
|- {{cellcolors|#ff9999}}
| 0x114 || 0x04 || 0000005D || xml attribute TAG name relative offset || 5D = '''color'''
|- {{cellcolors|#ff9999}}
| 0x118 || 0x04 || 00000005 || xml attribute TAG type || 5
|- {{cellcolors|#ff9999}}
| 0x11C || 0x04 || 00000000 || Float Arrays Table offset || 0
|- {{cellcolors|#ff9999}}
| 0x120 || 0x04 || 00000004 || Array size || 4 = '''1.0,1.0,1.0,1.0'''
|- bgcolor="#cccccc"
| colspan="5" | attribute start "anim_weight" (is an attribute of "actor" element)
|- {{cellcolors|#ff9999}}
| 0x124 || 0x04 || 00000063 || xml attribute TAG name relative offset || 63 = '''anim_weight'''
|- {{cellcolors|#ff9999}}
| 0x128 || 0x04 || 00000005 || xml attribute TAG type || 5
|- {{cellcolors|#ff9999}}
| 0x12C || 0x04 || 00000009 || Float Arrays Table offset || 9
|- {{cellcolors|#ff9999}}
| 0x130 || 0x04 || 00000004 || Array size || 4 = '''1.0,0.0,0.0,0.0'''
|- bgcolor="#cccccc"
| colspan="5" | attribute start "material" (is an attribute of "actor" element)
|- {{cellcolors|#ff9999}}
| 0x134 || 0x04 || 0000006F || xml attribute TAG name relative offset || 6F = '''material'''
|- {{cellcolors|#ff9999}}
| 0x138 || 0x04 || 00000008 || xml attribute TAG type || 8
|- {{cellcolors|#ff9999}}
| 0x13C || 0x04 || 00000000 || strings table offset || 0 = '''mtrl_logo'''
|- {{cellcolors|#ff9999}}
| 0x140 || 0x04 || 00000000 || Not used || 0
|- bgcolor="#cccccc"
| colspan="5" | attribute start "uv_scale" (is an attribute of "actor" element)
|- {{cellcolors|#ff9999}}
| 0x144 || 0x04 || 00000078 || xml attribute TAG name relative offset || 78 = '''uv_scale'''
|- {{cellcolors|#ff9999}}
| 0x148 || 0x04 || 00000005 || xml attribute TAG type || 5
|- {{cellcolors|#ff9999}}
| 0x14C || 0x04 || 0000000D || Float Arrays Table offset || D
|- {{cellcolors|#ff9999}}
| 0x150 || 0x04 || 00000002 || Array size || 2 = '''1.0,-1.0'''
|- bgcolor="#cccccc"
| colspan="5" | attribute start "id" (is an attribute of "actor" element)
|- {{cellcolors|#ff9999}}
| 0x154 || 0x04 || 00000081 || xml attribute TAG name relative offset || 6F = '''id'''
|- {{cellcolors|#ff9999}}
| 0x158 || 0x04 || 00000007 || xml attribute TAG type || 7
|- {{cellcolors|#ff9999}}
| 0x15C || 0x04 || 0000000E || strings table offset || E = '''logo'''
|- {{cellcolors|#ff9999}}
| 0x160 || 0x04 || 00000000 || Not used || 0
|-
|}
You can compare this table with the xml representation of colboot.raf contents in [http://www.psdevwiki.com/ps3/Talk:Coldboot.raf#Coldboot.sxml coldboot.raf talk page]
 
*Attribute 8 means there is another element in the xml (a different element than the one who owns the attribute) with the same name (so the loopback of his string points to a different element). In this case coldboot.raf uses the name '''mtrl_logo''' 2 times (but is only stored one time in the string table):
{{Boxcode|code=<syntaxhighlight lang="xml">
<raf> <!-- this is a reduced version of coldboot.raf.cxml -->
<scene>
<actor material="mtrl_logo"/>
</scene>
<material-table>
<material id="mtrl_logo">
</material-table>
</raf>
</syntaxhighlight>}}
 
=Tools=
 
==CXML decompiler==
Experimental python script made by flatz for research purposes, there was several versions of it where some minor changes where made, to read about that changes check the history of the page
 
The tool extracts the files inside a CXML container (CXML, QRCF, P3TF, RAFO, etc...), the extracted filenames contains the hexcodes for fileoffset and filelenght, additionally it generates an .xml that represents the original CXML structure where can be seen the order of the files and all the other data inside it
 
*Usage:
**You can copypaste the python code below and save it in your PC as cxmdecompiler.py then run it in command line without arguments to verify that it works fine (you need python v2.7 installed)
**The original files [[lines.qrc]] and [[coldboot.raf]] are zlib compressed (and the CXML decompiler cant read zlib compressed files). The command line examples below considers the files has been decompressed in a previous step (using a [[Qt_Resource_Container_(QRC)#QRC_related_tools|zlib tool]]), in that previous step the file-extension was renamed to "qrcf" and "rafo" (which are the decompressed versions where the cxml structure is fully readable and the tool can process it)
 
{{Keyboard|content=<syntaxhighlight lang="bash">C:\>cxmldecompiler.py lines.qrcf lines.xml</syntaxhighlight>}}
{{Keyboard|content=<syntaxhighlight lang="bash">C:\>cxmldecompiler.py coldboot.rafo coldboot.xml</syntaxhighlight>}}
 
'''Changelog'''
'''---------'''
v1 alpha - Basic .cxml support
v2 alpha - Fixed a bug related with RAFO header (coldboot.raf support added)
v3 alpha - Fixed offset/length displacements in the function that locates float values (xml tag attributes related with x,y,z axis in 3D space now looks correct)
v4 alpha - Floats precission increased
v5 alpha - Floats precission adjusted (previous versions had errors in the output of coldboot.raf)
v6 alpha - Now the extracted filenames contains the hexcodes for fileoffset and filelength, both values are needed for the SEARCH/REPLACE patterns to remap them in the internal .QRC structure, as can be seen in the experiments made [https://www.psx-place.com/threads/research-modifying-the-coldboot-gameboot-sequence-custom_render_plugin-sprx-rco.25952/page-19#post-214240 here] and [https://www.psx-place.com/threads/research-modifying-gaia-visualization-custom_render_plugin-earth-qrc.27756/ here]
v7 alpha - Filenames simplifyed, is better to have the filenames standarized for automated/mass comparison purposes in between official and custom files
 
{{Boxcode|height=600px|title=CXML decompiler v7 alpha (python script)|code=<syntaxhighlight lang="python">
#!python2
 
import sys, os, struct
 
from io import BytesIO
from pprint import pprint
 
def read_cstring(f):
bytes = []
while True:
byte = f.read(1)
if byte == b'\x00':
break
elif byte == '':
raise EOFError()
else:
bytes.append(byte)
return b''.join(bytes)
 
def check_file_magic(f, expected_magic):
old_offset = f.tell()
try:
magic = f.read(len(expected_magic))
except:
return False
finally:
f.seek(old_offset)
return magic == expected_magic
 
script_file_name = os.path.split(sys.argv[0])[1]
script_file_base = os.path.splitext(script_file_name)[0]
 
if len(sys.argv) < 2:
print('CXML decompiler (c) flatz')
print('Usage: {0} <cxml file> <xml file>'.format(script_file_name))
sys.exit()
 
ENDIANNESS = '>'
 
def write_raw(f, data):
if type(data) == str:
f.write(data)
elif type(data) == unicode:
f.write(data.decode('utf-8'))
else:
f.write(data)
def write_indent(f, depth):
write_raw(f, '\t' * depth)
def write_line(f, data):
write_raw(f, data)
write_raw(f, '\n')
 
INT_FMT = ENDIANNESS + 'i'
FLOAT_FMT = ENDIANNESS + 'f'
STRING_FMT = ENDIANNESS + 'ii'
INT_ARRAY_FMT = ENDIANNESS + 'ii'
FLOAT_ARRAY_FMT = ENDIANNESS + 'ii'
FILE_FMT = ENDIANNESS + 'ii'
ID_FMT = ENDIANNESS + 'i'
ID_REF_FMT = ENDIANNESS + 'i'
 
class Attribute(object):
HEADER_FMT = ENDIANNESS + 'ii'
HEADER_SIZE = struct.calcsize(HEADER_FMT)
SIZE = HEADER_SIZE + max(struct.calcsize(INT_FMT), struct.calcsize(FLOAT_FMT), struct.calcsize(STRING_FMT), struct.calcsize(INT_ARRAY_FMT), struct.calcsize(FLOAT_ARRAY_FMT), struct.calcsize(FILE_FMT), struct.calcsize(ID_FMT), struct.calcsize(ID_REF_FMT))
 
TYPE_NONE = 0
TYPE_INT = 1
TYPE_FLOAT = 2
TYPE_STRING = 3
TYPE_INT_ARRAY = 4
TYPE_FLOAT_ARRAY = 5
TYPE_FILE = 6
TYPE_ID = 7
TYPE_ID_REF = 8
 
def __init__(self, element):
self.element = element
self.start = None
self.name = None
self.type = None
self.offset = None
self.length = None
self.value = None
 
def load(self, f):
self.start = f.tell()
data = f.read(self.HEADER_SIZE)
self.name, self.type = struct.unpack(self.HEADER_FMT, data)
data = f.read(self.SIZE - self.HEADER_SIZE)
if self.type == self.TYPE_NONE:
pass
elif self.type == self.TYPE_INT:
self.value, = struct.unpack(INT_FMT, data[:struct.calcsize(INT_FMT)])
elif self.type == self.TYPE_FLOAT:
self.value, = struct.unpack(FLOAT_FMT, data[:struct.calcsize(FLOAT_FMT)])
elif self.type == self.TYPE_STRING:
self.offset, self.length = struct.unpack(STRING_FMT, data[:struct.calcsize(STRING_FMT)])
elif self.type == self.TYPE_INT_ARRAY:
self.offset, self.length = struct.unpack(INT_ARRAY_FMT, data[:struct.calcsize(INT_ARRAY_FMT)])
elif self.type == self.TYPE_FLOAT_ARRAY:
self.offset, self.length = struct.unpack(FLOAT_ARRAY_FMT, data[:struct.calcsize(FLOAT_ARRAY_FMT)])
elif self.type == self.TYPE_FILE:
self.offset, self.length = struct.unpack(FILE_FMT, data[:struct.calcsize(FILE_FMT)])
elif self.type == self.TYPE_ID:
self.offset, = struct.unpack(ID_FMT, data[:struct.calcsize(ID_FMT)])
elif self.type == self.TYPE_ID_REF:
self.offset, = struct.unpack(ID_REF_FMT, data[:struct.calcsize(ID_REF_FMT)])
return True
 
def get_name(self):
return self.element.document.get_string(self.name)
 
def get_int(self):
if self.type != self.TYPE_INT:
return None
return self.value
 
def get_float(self):
if self.type != self.TYPE_FLOAT:
return None
return self.value
 
def get_string(self):
if self.type != self.TYPE_STRING:
return None
value = self.element.document.get_string(self.offset)
if len(value) != self.length:
return None
return value
 
def get_int_array(self):
if self.type != self.TYPE_INT_ARRAY:
return None
value = self.element.document.get_int_array(self.offset, self.length)
if len(value) != self.length:
return None
return value
 
def get_float_array(self):
if self.type != self.TYPE_FLOAT_ARRAY:
return None
value = self.element.document.get_float_array(self.offset, self.length)
if len(value) != self.length:
return None
return value
 
def get_file(self):
if self.type != self.TYPE_FILE:
return None
value = self.element.document.get_file(self.offset, self.length)
return value
 
def get_id(self):
if self.type != self.TYPE_ID:
return None
id = self.element.document.get_id_string(self.offset)
return id
 
def get_id_ref(self):
if self.type != self.TYPE_ID_REF:
return None
id = self.element.document.get_id_string(self.offset)
element = Element(self.element.document)
return [id, element]
 
def dump(self, f, depth):
pass
#print('  ' * depth + 'Attribute:' + 'name:{0} type:{1}'.format(self.name, self.type), end='\n', file=f)
 
class Element(object):
HEADER_FMT = ENDIANNESS + 'iiiiiii'
SIZE = struct.calcsize(HEADER_FMT)
 
TAG_NAME = 0
ATTR_NUM = 1
PARENT = 2
PREV = 3
NEXT = 4
FIRST_CHILD = 5
LAST_CHILD = 6
 
def __init__(self, document):
self.document = document
self.start = None
self.name = None
self.num_attributes = None
self.parent = None
self.prev = None
self.next = None
self.first_child = None
self.last_child = None
 
def load(self, f):
self.start = f.tell()
self.name, self.num_attributes, self.parent, self.prev, self.next, self.first_child, self.last_child = struct.unpack(self.HEADER_FMT, f.read(self.SIZE))
return True
 
def get_name(self):
return self.document.get_string(self.name)
 
def get_attribute(self, index):
if index < 0 or index >= self.num_attributes:
return None
offset = self.start + Element.SIZE + index * Attribute.SIZE
if not is_valid_attribute(self.document, offset):
return None
attribute = Attribute(self)
f = BytesIO(self.document.tree_bin)
f.seek(offset)
attribute.load(f)
return attribute
 
def get_parent(self):
if not is_valid_element(self.document, self.parent):
return None
element = Element(self.document)
f = BytesIO(self.document.tree_bin)
f.seek(parent)
element.load(f)
return element
 
def get_first_child(self):
if not is_valid_element(self.document, self.first_child):
return None
element = Element(self.document)
f = BytesIO(self.document.tree_bin)
f.seek(self.first_child)
element.load(f)
return element
 
def get_last_child(self):
if not is_valid_element(self.document, self.last_child):
return None
element = Element(self.document)
f = BytesIO(self.document.tree_bin)
f.seek(self.last_child)
element.load(f)
return element
 
def get_prev_sibling(self):
if not is_valid_element(self.document, self.prev):
return None
element = Element(self.document)
f = BytesIO(self.document.tree_bin)
f.seek(self.prev)
element.load(f)
return element
 
def get_next_sibling(self):
if not is_valid_element(self.document, self.next):
return None
element = Element(self.document)
f = BytesIO(self.document.tree_bin)
f.seek(self.next)
element.load(f)
return element
 
def dump(self, f, depth):
write_indent(f, depth)
name = self.get_name()
write_raw(f, '<' + name)
for i in range(self.num_attributes):
attribute = self.get_attribute(i)
if attribute is None:
return False
write_raw(f, ' {0}='.format(attribute.get_name()))
if attribute.type == Attribute.TYPE_NONE:
write_raw(f, '\"null\"')
elif attribute.type == Attribute.TYPE_INT:
write_raw(f, '\"{0}\"'.format(attribute.get_int()))
elif attribute.type == Attribute.TYPE_FLOAT:
write_raw(f, '\"{0:3.7}\"'.format(attribute.get_float()))
elif attribute.type == Attribute.TYPE_STRING:
write_raw(f, '\"{0}\"'.format(attribute.get_string()))
elif attribute.type == Attribute.TYPE_INT_ARRAY:
write_raw(f, '\"')
array = attribute.get_int_array()
array_length = len(array)
for j in range(array_length):
write_raw(f, '{0:3.7}'.format(array[j]))
if j + 1 < array_length:
write_raw(f, ',')
write_raw(f, '\"')
elif attribute.type == Attribute.TYPE_FLOAT_ARRAY:
write_raw(f, '\"')
array = attribute.get_float_array()
array_length = len(array)
for j in range(array_length):
write_raw(f, '{0}'.format(array[j]))
if j + 1 < array_length:
write_raw(f, ',')
write_raw(f, '\"')
elif attribute.type == Attribute.TYPE_FILE:
file_name = 'Offset=0x{0:08X}, Length=0x{1:08X}.bin'.format(attribute.offset, attribute.length)
file_data = attribute.get_file()
with open(file_name, 'wb') as of:
of.write(file_data)
write_raw(f, '\"{0}\"'.format(file_name))
elif attribute.type == Attribute.TYPE_ID:
write_raw(f, '\"{0}\"'.format(attribute.get_id()))
elif attribute.type == Attribute.TYPE_ID_REF:
id_entity = attribute.get_id_ref()
write_raw(f, '\"{0}\"'.format(id_entity[0]))
child_element = self.get_first_child()
if not child_element is None:
write_raw(f, '>\n')
while not child_element is None:
child_element.dump(f, depth + 1)
child_element = child_element.get_next_sibling()
write_indent(f, depth)
write_raw(f, '</' + name + '>\n')
else:
write_raw(f, ' />\n')
 
def is_valid_element(document, offset):
if offset < 0 or offset + Element.SIZE > document.tree_size:
return False
element = Element(document)
f = BytesIO(document.tree_bin)
f.seek(offset)
element.load(f)
if element.num_attributes < 0 or offset + Element.SIZE + element.num_attributes * Attribute.SIZE > document.tree_size:
return False
return True
 
def is_valid_attribute(document, offset):
if offset < 0 or offset + Attribute.SIZE > document.tree_size:
return False
return True
 
class Document(object):
HEADER_FMT = ENDIANNESS + '4siiiiiiiiiiiii8x'
HEADER_SIZE = struct.calcsize(HEADER_FMT)
 
def __init__(self, file_prefix=''):
self.file_prefix = file_prefix
self.magic = None
self.version = None
self.tree_offset = None
self.tree_size = None
self.id_table_offset = None
self.id_table_size = None
self.string_table_offset = None
self.string_table_size = None
self.int_array_table_offset = None
self.int_array_table_size = None
self.float_array_table_offset = None
self.float_array_table_size = None
self.file_table_offset = None
self.file_table_size = None
self.tree_bin = None
self.id_table_bin = None
self.string_table_bin = None
self.int_array_table_bin = None
self.float_array_table_bin = None
self.file_table_bin = None
self.root = None
 
def get_document_element(self):
if not is_valid_element(self, 0):
return None
element = Element(self)
f = BytesIO(self.tree_bin)
element.load(f)
return element
 
def get_id_string(self, offset):
if offset < 0 or offset >= self.id_table_size:
return None
f = BytesIO(self.id_table_bin)
f.seek(offset)
entity_offset, = struct.unpack(INT_FMT, f.read(struct.calcsize(INT_FMT)))
return read_cstring(f)
 
def get_string(self, offset):
if offset < 0 or offset >= self.string_table_size:
return None
f = BytesIO(self.string_table_bin)
f.seek(offset)
return read_cstring(f)
 
def get_int_array(self, offset, length):
if offset < 0 or (offset + length) * struct.calcsize(INT_FMT) > self.int_array_table_size:
return None
f = BytesIO(self.int_array_table_bin)
f.seek(offset * struct.calcsize(INT_FMT))
array = []
for i in range(length):
value, = struct.unpack(INT_FMT, f.read(struct.calcsize(INT_FMT)))
array.append(value)
return array
 
def get_float_array(self, offset, length):
if offset < 0 or (offset + length) * struct.calcsize(FLOAT_FMT) > self.float_array_table_size:
return None
f = BytesIO(self.float_array_table_bin)
f.seek(offset * struct.calcsize(FLOAT_FMT))
array = []
for i in range(length):
value, = struct.unpack(FLOAT_FMT, f.read(struct.calcsize(FLOAT_FMT)))
array.append(value)
return array
 
def get_file(self, offset, length):
if offset < 0 or offset + length > self.file_table_size:
return None
return self.file_table_bin[offset:offset + length]
 
def load(self, f):
self.magic, self.version, self.tree_offset, self.tree_size, self.id_table_offset, self.id_table_size, self.string_table_offset, self.string_table_size, self.int_array_table_offset, self.int_array_table_size, self.float_array_table_offset, self.float_array_table_size, self.file_table_offset, self.file_table_size = struct.unpack(self.HEADER_FMT, f.read(self.HEADER_SIZE))
f.seek(self.tree_offset)
self.tree_bin = f.read(self.tree_size)
f.seek(self.id_table_offset)
self.id_table_bin = f.read(self.id_table_size)
f.seek(self.string_table_offset)
self.string_table_bin = f.read(self.string_table_size)
f.seek(self.int_array_table_offset)
self.int_array_table_bin = f.read(self.int_array_table_size)
f.seek(self.float_array_table_offset)
self.float_array_table_bin = f.read(self.float_array_table_size)
f.seek(self.file_table_offset)
self.file_table_bin = f.read(self.file_table_size)
self.root = self.get_document_element()
return True
 
def check(self, f):
return check_file_magic(f, 'CXML')
 
def dump(self, f=sys.stdout, depth=0):
if self.root is None:
return
self.root.dump(f, depth)
 
if len(sys.argv) < 3:
print('error: insufficient options specified')
sys.exit()
 
cxml_file_path = sys.argv[1]
if not os.path.isfile(cxml_file_path):
print('error: invalid cxml file specified')
sys.exit()
xml_file_path = sys.argv[2]
if os.path.exists(xml_file_path) and not os.path.isfile(xml_file_path):
print('error: invalid xml file specified')
sys.exit()
 
cxml_file_base = os.path.splitext(cxml_file_path)[0]
document = Document(cxml_file_base)
with open(cxml_file_path, 'rb') as f:
#if not document.check(f):
# print 'error: invalid CXML file format'
# sys.exit()
document.load(f)
 
with open(xml_file_path, 'wb') as f:
write_raw(f, '<?xml version="1.0" encoding="utf-8"?>\n')
document.dump(f)
</syntaxhighlight>}}
 
===CXML decompiler (exe for windows)===
There are tools to pack a python script together with some python libraries into an executable .exe to run it in windows. Some versions of the CXML decompiler script was distributed in this format but most probably the download inks are dead or are old versions, if someone wants to upload some of them post the links here
 
*CXML decompiler v3 alpha, download links: http://multiupload.biz/dnsipf0dkssz/cxml_decompiler_v3_alpha_MultiUpload.biz.7z.html


.
..
...




{{File Formats}}
{{File Formats}}
<noinclude>[[Category:Main]]</noinclude>
<noinclude>[[Category:Main]]</noinclude>
Please note that all contributions to PS3 Developer wiki are considered to be released under the GNU Free Documentation License 1.2 (see PS3 Developer wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To protect the wiki against automated edit spam, we kindly ask you to solve the following hCaptcha:

Cancel Editing help (opens in new window)