Editing RCO archive

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:
== 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)


*The PS4 and PS Vita RCOs are the same with only one single difference: the PS4 ones are not zlib compressed.
[https://github.com/cfwprpht/Simply_Vita_RCO_Extractor Simply Vita RCO Extractor]
*In PS4 the RCO's uses a cxml structure, with a header size of 0x50 and the magic identifier '''RCOF'''
 
**RCOF header is 0x10 bytes bigger than any [http://www.psdevwiki.com/ps3/CXML_Containers CXML header in PS3] (this means that there are 2 new tables added for the new CXML variant used in PS Vita RCOs). And endianess changed
[http://www.file-upload.net/download-9992747/Desktop.rar.html Some RCO as Reference]
**Some of the extracted files are another variant of a CXML structure with identifier '''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 store 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 (PS Vita)
|+ 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
|-
|}
|}


== Ressource Container Common Structure ==
== 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 ====
====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 193: Line 193:
| Char Table Size || 0x2C || 0x04 || {{cellcolors|#ffeebb}} 00 00 36 B2 ||
| Char Table Size || 0x2C || 0x04 || {{cellcolors|#ffeebb}} 00 00 36 B2 ||
|-
|-
| End offset || 0x30 || 0x04 || {{cellcolors|#ffee99}} 00 01 21 00* || End offset
| overlapped || 0x30 || 0x04 || {{cellcolors|#ffee99}} 00 01 21 00* || overlapped
|-
|-
| empty || 0x34 || 0x04 || {{cellcolors|#ffee99}} 00 00 00 00* || not used
| empty || 0x34 || 0x04 || {{cellcolors|#ffee99}} 00 00 00 00* || not used
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
|-
|}
|}


<code>*</code> means reversed little endian
* reversed little endian
 
*Notes
* The sizes do not include the (possible) padding at the end of all tables.
**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 identifier (in this case 1 so a integer value)
| 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 identifier (in this case 8 so a file)
| 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 identifier (in this case 3 so a string)
| 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 identifier (in this case 9 so a ID String with Loopback offset)
| 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 tool (me, cfwprophet)
**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 ====


====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 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)
**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 ===
===ID Table===
 
In a '''PS4 RCO''' we have '''3''' diffrent '''ID Tables''' which we will take a deeper look now.  
To document.
 
=== ID Table ===
 
In a PS4 RCO there are 3 different '''ID Tables''': ID String, ID Integer and .


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.


*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??


It is a Table that only holds 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.
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 offsets are used depends on the used Attribute identifier (9-will use loopback- or  A-will not use loopback-). But for strings they will always 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 400:
  '''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??


It is a Table that only holds Integer values. The values to read are always size of 4 so seems to be in 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.
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 identifier (B-will use loopback-  or  C-will not use loopback-)'''
**'''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 420:
  '''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??


It is a Table that only holds Integer values. The values to read are always size of 4 so seems to be in little endian. There are no '''loopback''' offsets within this table and one integer value is placed after another without any padding. Moreover those values are only used for the Attribute Tag '''id=""''' from the '''<styletable>''' Element.
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 433:
  '''00000030'''  <span style="background:#ffff66;">DD 31 50 3B</span>                                        Ý1P;
  '''00000030'''  <span style="background:#ffff66;">DD 31 50 3B</span>                                        Ý1P;


=== Integer Array ===


===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 449:
  '''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 468:
  '''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 XML files are stored as CXML Containers as well. Additional will a PS4 RCO file hold the most common file formats that Sony already used in the past for resource files. Which are as follows: VAG, GTF, DDS, GIM.
 
== Summary ==


To understand how all the Tables work together here is an example from the HeavyRain.p3t PS3 Theme. Do not worry that it is a PS3 Theme because the work down of the CXML is the same as a PS4 RCO.
==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 576:
  '''<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 Useful Links ==
==Other Usefull Links==
 
So what of old but still handy [http://www.filedropper.com/vag2wav VAG2WAV WAV2VAG Source]
* [http://www.filedropper.com/vag2wav VAG2WAV WAV2VAG Source (dead link)]
 
 
{{Software}}
<noinclude>[[Category:Main]]</noinclude>
Please note that all contributions to PS4 Developer wiki are considered to be released under the GNU Free Documentation License 1.2 (see PS4 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)