Editing RCO archive
Jump to navigation
Jump to search
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: | ||
== RCO == | |||
*The PS4 and Vita RCOs are the same with only one single difference: The PS4 ones are not zlib compressed. | |||
*In PS4 the RCO's uses a cxml structure, with a header size of 0x50 and the magic identifyer '''RCOF''' | |||
**RCOF header is 0x10 bytes bigger than any [http://www.psdevwiki.com/ps3/CXML_Containers cxml header in PS3] (this means there are 2 new tables added for the new cxml variant used in vita rco's). And endianess changed | |||
**Some of the extracted files are another variant of a cxml structure with identifyer '''RCSF'''. After a second extraction (with a cxml decompiler tool) the resulting file is a .xml containing only text strings (this double cxml method is used for .xml files that stores language translations) | |||
[https://github.com/cfwprpht/Simply_Vita_RCO_Extractor Simply Vita RCO Extractor] | |||
[http://www.file-upload.net/download-9992747/Desktop.rar.html Some RCO as Reference] | |||
{| class="wikitable" style="font-size:x-small;" | {| class="wikitable" style="font-size:x-small;" | ||
|+ notification_settings_plugin.rco ( | |+ notification_settings_plugin.rco (PSvita) | ||
! Offset !! Size !! Example !! Name !! Notes | ! Offset !! Size !! Example !! Name !! Notes | ||
|- | |- | ||
Line 56: | Line 58: | ||
|-bgcolor="#ff8888" | |-bgcolor="#ff8888" | ||
| 0x50 || colspan="4" | Tree starts here | | 0x50 || colspan="4" | Tree starts here | ||
|- | |||
|} | |} | ||
== | == Container Common Structure == | ||
==== RCOF ==== | ==== RCOF ==== | ||
RCOF ('''R'''esources '''C'''ontainer '''O'''bject '''F'''ile)<br /> | |||
RCOF ('''R'''esources '''C'''ontainer '''O'''bject '''F'''ile) | |||
RCSF ('''R'''esources '''C'''ontainer '''S'''tring '''F'''ile) | RCSF ('''R'''esources '''C'''ontainer '''S'''tring '''F'''ile) | ||
Line 77: | Line 77: | ||
|- | |- | ||
| Version || 0x04 || 0x04 || {{cellcolors|#888888|#ffffff}} 00 00 01 10* || CXML version '1.10' | | Version || 0x04 || 0x04 || {{cellcolors|#888888|#ffffff}} 00 00 01 10* || CXML version '1.10' | ||
|- | |||
|} | |} | ||
'''Offset(h) 00 01 02 03 04 05 06 07''' | '''Offset(h) 00 01 02 03 04 05 06 07''' | ||
Line 89: | Line 91: | ||
|- | |- | ||
| Version || 0x04 || 0x04 || {{cellcolors|#888888|#ffffff}} 00 00 01 10* || CXML version '1.10' | | Version || 0x04 || 0x04 || {{cellcolors|#888888|#ffffff}} 00 00 01 10* || CXML version '1.10' | ||
|- | |||
|} | |} | ||
* reversed little endian | * reversed little endian | ||
=== Main Header === | ===Main Header=== | ||
The header contains an identifier of the container (magic), his version, and allows to store the "absolute start offset" and "size" of 9 tables (or areas) | The header contains an identifier of the container (magic), his version, and allows to store the "absolute start offset" and "size" of 9 tables (or areas) | ||
Line 102: | Line 103: | ||
**one of the "not used table" (at offset 0x18D0 with a size of 0) is placed before an used table (also at offset 0x18D0 but with a size of 0x34) | **one of the "not used table" (at offset 0x18D0 with a size of 0) is placed before an used table (also at offset 0x18D0 but with a size of 0x34) | ||
==== RCOF ==== | ====RCOF==== | ||
'''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''' <span style="background:#666666;">52 43 4F 46</span> <span style="background:#666666;">10 01 00 00</span> <span style="background:#ff8888;">50 00 00 00</span> <span style="background:#ff8888;">2C 15 00 00</span> RCOF....P...,... | '''00000000''' <span style="background:#666666;">52 43 4F 46</span> <span style="background:#666666;">10 01 00 00</span> <span style="background:#ff8888;">50 00 00 00</span> <span style="background:#ff8888;">2C 15 00 00</span> RCOF....P...,... | ||
Line 154: | Line 154: | ||
|- | |- | ||
| File Table Size || 0x3C || 0x04 || {{cellcolors|#ffee33}} 00 00 89 60* || | | File Table Size || 0x3C || 0x04 || {{cellcolors|#ffee33}} 00 00 89 60* || | ||
|- | |||
|} | |} | ||
==== PS4 RCSF ==== | ====PS4 RCSF==== | ||
'''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''' <span style="background:#666666;">52 43 53 46</span> <span style="background:#666666;">10 01 00 00</span> <span style="background:#ff8888;">50 00 00 00</span> <span style="background:#ff8888;">8C AD 00 00</span> RCSF....P...Œ-.. | '''00000000''' <span style="background:#666666;">52 43 53 46</span> <span style="background:#666666;">10 01 00 00</span> <span style="background:#ff8888;">50 00 00 00</span> <span style="background:#ff8888;">8C AD 00 00</span> RCSF....P...Œ-.. | ||
Line 208: | Line 208: | ||
|- | |- | ||
| empty || 0x3C || 0x04 || {{cellcolors|#ffee33}} 00 00 00 00* || not used | | empty || 0x3C || 0x04 || {{cellcolors|#ffee33}} 00 00 00 00* || not used | ||
|- | |||
|} | |} | ||
* reversed little endian | |||
*Notes | |||
* The sizes | **The sizes doesn't includes the (possible) padding at the end of all tables | ||
===Tree Table=== | ===Tree Table=== | ||
from [http://www.file-upload.net/download-9992766/xml_toc.rar.html notification_settings_plugin.rco] FW?? | |||
from [http://www.file-upload.net/download-9992766/xml_toc.rar.html notification_settings_plugin.rco] FW?? | |||
{| class="wikitable" | {| class="wikitable" | ||
! Offset !! Size !! Example !! Remark | ! Offset !! Size !! Example !! Remark | ||
Line 281: | Line 280: | ||
| 0x74 || 0x04 || 00 00 00 30 || String Pointer (in this case origsize="") | | 0x74 || 0x04 || 00 00 00 30 || String Pointer (in this case origsize="") | ||
|- | |- | ||
| 0x78 || 0x04 || 00 00 00 01 || Attribute | | 0x78 || 0x04 || 00 00 00 01 || Attribute identifyer (in this case 1 so a integer value) | ||
|- | |- | ||
| 0x7C || 0x04 || 00 00 04 10 || Hex integer size (1040 bytes when converted so origsize="1045") | | 0x7C || 0x04 || 00 00 04 10 || Hex integer size (1040 bytes when converted so origsize="1045") | ||
Line 289: | Line 288: | ||
| 0x84 || 0x04 || 00 00 00 39 || String Pointer (in this case src="") | | 0x84 || 0x04 || 00 00 00 39 || String Pointer (in this case src="") | ||
|- | |- | ||
| 0x88 || 0x04 || 00 00 00 08 || Attribute | | 0x88 || 0x04 || 00 00 00 08 || Attribute identifyer (in this case 8 so a file) | ||
|- | |- | ||
| 0x8C || 0x04 || 00 00 00 00 || Offset within File Table | | 0x8C || 0x04 || 00 00 00 00 || Offset within File Table | ||
Line 297: | Line 296: | ||
| 0x94 || 0x04 || 00 00 00 3D || String Pointer (in this case compress="") | | 0x94 || 0x04 || 00 00 00 3D || String Pointer (in this case compress="") | ||
|- | |- | ||
| 0x98 || 0x04 || 00 00 00 03 || Attribute | | 0x98 || 0x04 || 00 00 00 03 || Attribute identifyer (in this case 3 so a string) | ||
|- | |- | ||
| 0x9C || 0x04 || 00 00 00 46 || Offset of the string to read within String Table | | 0x9C || 0x04 || 00 00 00 46 || Offset of the string to read within String Table | ||
Line 305: | Line 304: | ||
| 0xA4 || 0x04 || 00 00 00 49 || String Pointer (in this case id="") | | 0xA4 || 0x04 || 00 00 00 49 || String Pointer (in this case id="") | ||
|- | |- | ||
| 0xA8 || 0x04 || 00 00 00 09 || Attribute | | 0xA8 || 0x04 || 00 00 00 09 || Attribute identifyer (in this case 9 so a ID String with Loopback offset) | ||
|- | |- | ||
| 0xAC || 0x04 || 00 00 00 00 || Offset of the id to read within ID String Table (in this case 'ja' so id="ja" and after the loopback src="/xmls/ja.xml") | | 0xAC || 0x04 || 00 00 00 00 || Offset of the id to read within ID String Table (in this case 'ja' so id="ja" and after the loopback src="/xmls/ja.xml") | ||
|- | |- | ||
| 0xB0 || 0x04 || 00 00 00 00 || empty value | | 0xB0 || 0x04 || 00 00 00 00 || empty value | ||
|- | |||
|} | |} | ||
*Note: the folder string within the src="" Attribute is a custom one which need to be handled by the app or which is dependend to the developer who will write the CXML Tool (so me) | |||
*Note: the folder string within the src="" Attribute is a custom one which need to be handled by the app or which is dependend to the developer who will write the CXML | |||
**Note2: All values are reversed little endian | **Note2: All values are reversed little endian | ||
Line 329: | Line 328: | ||
'''000000B0''' 00 00 00 00 .... | '''000000B0''' 00 00 00 00 .... | ||
====String Table==== | |||
from [http://www.file-upload.net/download-9994498/string_table.rar.html notification_settings_plugin.rco] FW?? | from [http://www.file-upload.net/download-9994498/string_table.rar.html notification_settings_plugin.rco] FW?? | ||
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) | 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) | ||
Line 372: | Line 370: | ||
**yellow: used bytes | **yellow: used bytes | ||
**red: padding to align to 0x10 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 | **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, RCO 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) | ||
=== Char Table === | ===Char Table=== | ||
Need To write.... | |||
===ID Table=== | |||
In a '''PS4 RCO''' we have '''3''' diffrent '''ID Tables''' which we will take a deeper look now. | |||
=== ID Table === | |||
In a PS4 RCO | |||
The <span style="background:#ff6666;">loopback</span> offset is market as red. | The <span style="background:#ff6666;">loopback</span> offset is market as red. | ||
The <span style="background:#ffff66;">id</span> is marked as yellow. | The <span style="background:#ffff66;">id</span> is marked as yellow. | ||
*Note: All loopback offset are reversed little endian. | |||
====ID String==== | |||
==== ID String ==== | |||
from [http://www.file-upload.net/download-9994499/id_str_table.rar.html notification_settings_plugin.rco] FW?? | from [http://www.file-upload.net/download-9994499/id_str_table.rar.html notification_settings_plugin.rco] FW?? | ||
Is a Table that only hold Strings and will be readed till the first 0x00 byte and then stop. The first 4 bytes '''before''' the string are the '''loopback''' offset to add the id string to the src="" Attribute value. | |||
*'''Note: If all loopback | *'''Note: If all loopback offset's are used depends on the used Attribute identifyer (9-will use loopback- or A-will not use loopback-). But for string's they will always loopback''' | ||
'''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''' | ||
Line 409: | Line 403: | ||
'''000000A0''' <span style="background:#ff6666;">00 00 06 D0</span> <span style="background:#ffff66;">70 6C 00</span> 00 <span style="background:#ff6666;">00 00 07 2C</span> <span style="background:#ffff66;">74 72 00</span> 00 Ð...<span style="background:#ffff66;">pl</span>..,...<span style="background:#ffff66;">tr</span>.. | '''000000A0''' <span style="background:#ff6666;">00 00 06 D0</span> <span style="background:#ffff66;">70 6C 00</span> 00 <span style="background:#ff6666;">00 00 07 2C</span> <span style="background:#ffff66;">74 72 00</span> 00 Ð...<span style="background:#ffff66;">pl</span>..,...<span style="background:#ffff66;">tr</span>.. | ||
==== ID Integer ==== | ====ID Integer==== | ||
from [http://www.file-upload.net/download-9994502/id_int_table.rar.html notification_settings_plugin.rco] FW?? | from [http://www.file-upload.net/download-9994502/id_int_table.rar.html notification_settings_plugin.rco] FW?? | ||
Is a Table that only hold Integer values. The values to read are always size of 4 so seems to be an little endian. The first 4 bytes '''before''' the Integer value are the '''loopback''' offset to add the id int value to the src="" Attribute value. | |||
*'''Note: All values are reversed little endian''' | *'''Note: All values are reversed little endian''' | ||
**'''Note2: Not all loopback offset's are used, that depends on the used Attribute | **'''Note2: Not all loopback offset's are used, that depends on the used Attribute identifyer (B-will use loopback- or C-will not use loopback-)''' | ||
'''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''' | ||
Line 430: | Line 423: | ||
'''00000090''' FF FF FF FF <span style="background:#ffff66;">20 41 32 74</span> ÿÿÿÿ.A2t | '''00000090''' FF FF FF FF <span style="background:#ffff66;">20 41 32 74</span> ÿÿÿÿ.A2t | ||
==== ID Style ==== | ====ID Style==== | ||
from [http://www.file-upload.net/download-9994521/id_styletable.rar.html notification_settings_plugin.rco] FW?? | from [http://www.file-upload.net/download-9994521/id_styletable.rar.html notification_settings_plugin.rco] FW?? | ||
Is a Table that only hold Integer values. The values to read are always size of 4 so seems to be an little endian. There are no '''loopback''' offset's within this table and one integer value is placed after another without any padding. Additional are thoes value's only used for the Attribute Tag '''id=""''' from the '''<styletable>''' Element. | |||
*'''Note: All values are reversed little endian''' | *'''Note: All values are reversed little endian''' | ||
Line 444: | Line 436: | ||
'''00000030''' <span style="background:#ffff66;">DD 31 50 3B</span> Ý1P; | '''00000030''' <span style="background:#ffff66;">DD 31 50 3B</span> Ý1P; | ||
===Integer Array=== | |||
from [http://www.file-upload.net/download-9994537/integer_array.rar.html notification_settings_plugin.rco] FW?? | from [http://www.file-upload.net/download-9994537/integer_array.rar.html notification_settings_plugin.rco] FW?? | ||
Line 460: | Line 452: | ||
'''00000020''' 00 00 00 05 00 00 00 02 00 00 00 00 | '''00000020''' 00 00 00 05 00 00 00 02 00 00 00 00 | ||
=== Float Array === | ===Float Array=== | ||
from [http://www.file-upload.net/download-9994542/float_array.rar.html notification_settings_plugin.rco] FW?? | from [http://www.file-upload.net/download-9994542/float_array.rar.html notification_settings_plugin.rco] FW?? | ||
Line 480: | Line 471: | ||
'''00000080''' 00 00 00 00 43 A5 00 00 00 00 00 00 '''00000080''' 0 330 0 | '''00000080''' 00 00 00 00 43 A5 00 00 00 00 00 00 '''00000080''' 0 330 0 | ||
=== File Table === | ===File Table=== | ||
The files are concatenated in the same order than in the Tree Table & ID's Table (ID String & Integer). The xml's are stored as CXML Container's as well. Additional will a PS4 RCO hold the most common file format's that Sony allready used in the past for resource files. Which are as follow: VAG, GTF, DDS, GIM | |||
The files are concatenated in the same order than in the Tree Table & ID's Table (ID String & Integer). The | |||
==Summary== | |||
How all the Tables work together you can check below on a example from the HeavyRain.p3t PS3 Theme: | |||
* Don't worry that it is a PS3 Theme. The work down of the CXML is the same like for a PS4 RCO | |||
=== Table Description === | ===Table Description=== | ||
''' ''Tree Table of HeavyRain.p3t'' ''ID Table of HeavyRain.p3t''''' | ''' ''Tree Table of HeavyRain.p3t'' ''ID Table of HeavyRain.p3t''''' | ||
Line 589: | Line 579: | ||
'''<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>''' | ||
== Other | ==Other Usefull Links== | ||
So what of old but still handy [http://www.filedropper.com/vag2wav VAG2WAV WAV2VAG Source] | |||