Editing Resource Container (RCO)
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: | ||
=Description= | =Description= | ||
The file extension in PSP and PS3 is '''RCO''' that seems to be the acronym of '''R'''esource '''C'''ontainer '''O''' | The file extension in PSP and PS3 is '''RCO''' that seems to be the acronym of '''R'''esource '''C'''ontainer '''O'''bjet | ||
The file signature (aka [https://en.wikipedia.org/wiki/Magic_number_(programming) magic number]) from PSP (in little endian) is '''PRF''' that seems to be the acronym of '''P'''laystation '''R'''esource '''F'''ile | The file signature (aka [https://en.wikipedia.org/wiki/Magic_number_(programming) magic number]) from PSP (in little endian) is '''PRF''' that seems to be the acronym of '''P'''laystation '''R'''esource '''F'''ile | ||
Line 8: | Line 8: | ||
==Contents== | ==Contents== | ||
*RCO contents (See [[Multimedia Formats and Tools]]): <!--and see rcomage miscmap.ini for a list of the supported formats--> | *RCO contents (See [[Multimedia Formats and Tools]]): <!--and see rcomage miscmap.ini for a list of the supported formats--> | ||
Text for all [[Template: | Text for all [[Template:XMB_languages|languages]], textures, sounds (for cursor navigation, trophy unlocking, etc...) and models | ||
{| class="wikitable" | {| class="wikitable" | ||
Line 26: | Line 26: | ||
! Toc trees !! Toc compression !! Other Notes | ! Toc trees !! Toc compression !! Other Notes | ||
|- | |- | ||
| 0x55 || {{icon content psp|50px}} 0.6.5 || pre-retail || 9 || uncompressed || archaic rco format, header is 16 bytes smaller | |||
| | |||
|- | |- | ||
| 0x70 || {{icon content psp|50px}} 1.00 || 2004 / 12 / 12 || 10 || uncompressed || | |||
| | |||
|- | |- | ||
| 0x71 || {{icon content psp|50px}} 1.50~2.50 || 2005 / 3 / 24 || 10 || uncompressed || normal toc up to this version | |||
| | |||
|- | |- | ||
| 0x90 || {{icon content psp|50px}} 2.60 || 2005 / 11 / 29 || 10 || || zlib compressed toc implemented | |||
| | |||
|- | |- | ||
| 0x95 || {{icon content psp|50px}} 2.70~2.71 || 2006 / 4 / 25 || 10 || || rlz compressed toc implemented | |||
| | |||
|- | |- | ||
| 0x96 || {{icon content psp|50px}} 2.80~3.40 || 2006 / 7 / 27 || 10 || || the toc seems to be compressed in parts | |||
| | |||
|- | |- | ||
| 0x97 || {{icon content ps3|50px}} 1.00~1.54 || 2006 / 11 / 11 || 10 || || | |||
| | |||
|- | |- | ||
| | | 0x100 || {{icon content psp|50px}} 3.50~6.61 || 2007 / 5 / 31 || 10 || || | ||
|- | |- | ||
| 0x102 || {{icon content ps3|50px}} 1.60~1.70 || 2007 / 3 / 22 || 10 || || | |||
| | |||
|- | |- | ||
| 0x104 || {{icon content ps3|50px}} 1.80~1.82 || 2007 / 5 / 24 || 10 || || | |||
| | |||
|- | |- | ||
| 0x105 || {{icon content ps3|50px}} 1.90~1.94 || 2007 / 7 / 24 || 10 || || | |||
| | |||
|- | |- | ||
| 0x106 || {{icon content ps3|50px}} 2.00~2.17 || 2007 / 11 / 8 || 10 || || | |||
| | |||
|- | |- | ||
| 0x107 || {{icon content ps3|50px}} 2.20~2.80 || 2008 / 3 / 25 || 10 || || | |||
| | |||
|- | |- | ||
| 0x108 || {{icon content ps3|50px}} 3.00~3.01 || 2009 / 9 / 1 || 10 || || | |||
| | |||
|- | |- | ||
| 0x110 || {{icon content ps3|50px}} 3.10~3.74 || 2009 / 11 / 19 || 10 || || | |||
| | |||
|- | |- | ||
| 0x120 || {{icon content ps3|50px}} 4.00~4.25 || 2011 / 11 / 29 || 10 || || | |||
| | |||
|- | |- | ||
| 0x130 || {{icon content ps3|50px}} 4.30~4.76 || 2012 / 10 / 24 || 10 || || | |||
| | |||
| | |||
|} | |} | ||
Line 100: | Line 75: | ||
| 0x08 || 0x04 || <abbr title="Always seems to be 0x00000000">00 00 00 00</abbr> || {{cellcolors|#ff7777}} <abbr title="prf_minor_version ?">''prf_unk''</abbr> || | | 0x08 || 0x04 || <abbr title="Always seems to be 0x00000000">00 00 00 00</abbr> || {{cellcolors|#ff7777}} <abbr title="prf_minor_version ?">''prf_unk''</abbr> || | ||
|-{{cellcolors|#666666|#ffffff}} | |-{{cellcolors|#666666|#ffffff}} | ||
| 0x0C || 0x04 || 00 00 00 00 || <abbr title="compress everything except the header and '''dat''' data tables to store files">'''prf_compress'''</abbr> || 0x00= | | 0x0C || 0x04 || 00 00 00 00 || <abbr title="compress everything except the header and '''dat''' data tables to store files">'''prf_compress'''</abbr> || 0x00=uncompressed, 0x10=ZLIB, 0x20=RLZ, see {{talk}} page | ||
|-{{cellcolors|#7777ff}} | |-{{cellcolors|#7777ff}} | ||
| 0x10 || 0x04 || 00 00 00 A4 || '''toc_main_tree_offset''' || | | 0x10 || 0x04 || 00 00 00 A4 || '''toc_main_tree_offset''' || | ||
Line 170: | Line 145: | ||
| 0x94 || 0x04 || 00 00 00 00 || '''dat_model_table_length''' || | | 0x94 || 0x04 || 00 00 00 00 || '''dat_model_table_length''' || | ||
|-{{cellcolors|#ffddbb}} | |-{{cellcolors|#ffddbb}} | ||
| 0x98 || | | 0x98 || 0x04 || <abbr title="Always seems to be 0xFFFFFFFF">FF FF FF FF</abbr> || {{cellcolors|#ff7777}} ''dat_unk_1'' || | ||
|-{{cellcolors|#ffddbb}} | |||
| 0x9C || 0x04 || <abbr title="Always seems to be 0xFFFFFFFF">FF FF FF FF</abbr> || {{cellcolors|#ff7777}} ''dat_unk_2'' || | |||
|-{{cellcolors|#ffddbb}} | |||
| 0xA0 || 0x04 || <abbr title="Always seems to be 0xFFFFFFFF">FF FF FF FF</abbr> || {{cellcolors|#ff7777}} ''dat_unk_3'' || | |||
|} | |} | ||
Line 176: | Line 155: | ||
==TOC== | ==TOC== | ||
The TOC (table of contents) works as an index of all the .RCO contents, is composed by entries that follows a hierarchy of parent/children/siblings, it can be represented as an .XML file composed by '''elements''' and its '''attributes''' (see [http://www.w3schools.com/xml/xml_tree.asp XML Tree | The TOC (table of contents) works as an index of all the .RCO contents, is composed by entries that follows a hierarchy of parent/children/siblings, it can be represented as an .XML file composed by '''elements''' and its '''attributes''' (see [http://www.w3schools.com/xml/xml_tree.asp XML Tree]) | ||
This .XML file that represents the RCO contents is also known as an [[RCOXML Coding|RCOXML]] and is the main file generated by [[rcomage]] when extracting the contents of a .RCO. Contains all the important info from the original .RCO file and some more info added by rcomage needed to rebuild the .RCO file accuratelly keeping the original settings | |||
Every entry starts with an area of 0x28 length that represents an XML '''element''', it specifyes the '''entry_type''', a '''label''' identifyer for this entry (optional) and some info related with the TOC internal structure and its hierarchy relationship with other entries | |||
Every entry starts with an area of 0x28 length that represents an XML '''element''', it specifyes the '''entry_type''', a '''label''' identifyer for this entry (optional) and some info related with the TOC internal structure and its hierarchy relationship with other entries | |||
{| class="wikitable" style="font-size:small;" | {| class="wikitable" style="font-size:small;" | ||
Line 189: | Line 169: | ||
|} | |} | ||
After the common area (at entry relative offset 0x28) appears the '''attributes''', the attributes are different for every '''entry_type''' and are explained in detail in other wiki pages, see the links in the table below | |||
The entry_types wich name contains the word '''tree''' (as example MainTree) are special and doesnt uses attributes, MainTree is always located as the first entry, doesn't have a parent, and doesn't have any previous or next "sibling", the maximun number posible of childrens for MainTree is 8 (containing all the other "trees")<!--actually it should be 9 trees max because the toc_unknown area at absolute offset 0x28 in the header is telling it exists another unknown tree-->. The other "trees" (as example imageTree or soundTree) are siblings and are the childrens of "MainTree", Every one of those "trees" contains a variable number of '''entry_types''' that are its childrens | |||
An special mention is needed to the [[RCOXML Objects]] (entry_types starting with 0x08) and [[RCOXML Animations]] (entry_types starting with 0x09) where the attributes can be grouped in standard attributes (used by most entryes of this type) and specific attributes (different for every entry_type). The standard attributes are always located before the specific attributes | |||
{{RCO TOC entry types}} | {{RCO TOC entry types}} | ||
Some of the attributes are a '''reference''' to load other entry | Some of the attributes are a '''reference''' to load other entry, are composed by two values, the first is the '''reference_type''' that indicates the "tree" of the entry that is going to be loaded, and the second is a '''pointer''' to a text string with the '''label''' of the entry that is going to be loaded. The reference_type '''event''' doesnt loads an entry from a "tree" though, it runs a code function from either a .sprx (by storing the text '''native:/''' as part of the text string inside the RCO) or from a [[VSMX]] script (by storing the text '''script:/''' as part of the text string inside the RCO) | ||
{{RCO TOC reference types}} | {{RCO TOC reference types}} | ||
{{Boxframe1|content='''example placeholder''' | {{Boxframe1|content='''example placeholder''' | ||
*Example here following the other example of the header at top of the page, using color codes like the examples in {{talk}} page | *Example here following the other example of the header at top of the page, using color codes like the examples in {{talk}} page | ||
Line 202: | Line 184: | ||
*And '''MainTree-ObjectTree-Page''' (because the animation needs to be linked to an object by using a reference, otherway rcomage will return an error when trying to compile it) | *And '''MainTree-ObjectTree-Page''' (because the animation needs to be linked to an object by using a reference, otherway rcomage will return an error when trying to compile it) | ||
}} | }} | ||
*All offsets in the TOC are relative | |||
==String tables== | |||
This area stores the text strings used by the TOC entries, is composed by 3 tables in this order: | |||
*'''text_string_table''' (to store localized language texts from TextTree entries) | |||
*'''label_string_table''' (to store the labels of all the entries that uses labels) | |||
*'''event_string_table''' (to store the values of the attributes used by some entries, either "native" or "script" events) | |||
*Strings are null terminated (ends in 0x00) | |||
*Strings are aligned to 4 bytes boundary (padding at the end of every string when needed) | |||
==Pointer tables== | ==Pointer tables== | ||
This area works as an external index of the TOC, stores <abbr title="unlike in TOC table that are relative">absolute</abbr> pointers to | This area works as an external index of the TOC, stores <abbr title="unlike in TOC table that are relative">absolute</abbr> pointers to some of the TOC entries, is composed by 6 tables in this order: | ||
*'''text_tree_pointer_table''' | *'''text_tree_pointer_table''' | ||
*'''image_tree_pointer_table''' | *'''image_tree_pointer_table''' | ||
Line 213: | Line 206: | ||
* | *every pointer is 0x04 bytes length | ||
==Data tables== | ==Data tables== | ||
Line 251: | Line 232: | ||
|} | |} | ||
{{File Formats}} | {{File Formats}} | ||
<noinclude>[[Category:Main]]</noinclude> | <noinclude>[[Category:Main]]</noinclude> |