Resource Container (RCO): Difference between revisions

From PS3 Developer wiki
Jump to navigation Jump to search
m (→‎RCO Structure: this was named "object" later and the name fits pretty well)
Line 69: Line 69:
! Offset !! Length !! Name !! Example !! Notes
! Offset !! Length !! Name !! Example !! Notes
|-
|-
| 0x00 || 0x04 || '''magic''' || FRP || In PS3 is "FRP" (big endian). In PSP is "PRF" (little endian)
| 0x00 || 0x04 || '''magic''' || FRP || In PS3 is "FRP" (big endian). In PSP is "PRF" (little endian). '''P'''laystation '''R'''esource '''F'''ile
|-
|-
| 0x04 || 0x04 || '''version''' || 00 00 01 30 || named ''minFirmwareVer'' in rcomage, see {{talk}} page
| 0x04 || 0x04 || '''version''' || 00 00 01 30 || named ''minFirmwareVer'' in rcomage, see {{talk}} page
|-
|-
| 0x08 || 0x04 || ''unknown'' || 00 00 00 00 ||  
| 0x08 || 0x04 || ''unknown'' || 00 00 00 00 || Always seems to be 0x00000000
|-
|-
| 0x0C || 0x04 || '''compress_header''' || 00 00 00 00 || *0x00 no compress<br>*0x10 zlib<br>*0x20 rlz ?
| 0x0C || 0x04 || '''compress_header''' || 00 00 00 00 || *0x00 no compress<br>*0x10 zlib<br>*0x20 rlz ?
Line 89: Line 89:
| 0x24 || 0x04 || '''image_table_offset''' ||  ||  
| 0x24 || 0x04 || '''image_table_offset''' ||  ||  
|-
|-
| 0x28 || 0x04 || ''unknown'' || FF FF FF FF || Always seems to be 0xFFFFFF
| 0x28 || 0x04 || ''unknown'' || FF FF FF FF || Always seems to be 0xFFFFFFFF
|-
|-
| 0x2C || 0x04 || '''font_table_offset''' ||  ||  
| 0x2C || 0x04 || '''font_table_offset''' ||  ||  
Line 160: Line 160:
| 0x94 || 0x04 || '''model_data_section_length''' ||  ||  
| 0x94 || 0x04 || '''model_data_section_length''' ||  ||  
|-
|-
| 0x98 || 0x04 || ''unknown'' ||  || Always seems to be 0xFFFFFF
| 0x98 || 0x04 || ''unknown'' ||  || Always seems to be 0xFFFFFFFF
|-
|-
| 0x9C || 0x04 || ''unknown'' ||  || Always seems to be 0xFFFFFF
| 0x9C || 0x04 || ''unknown'' ||  || Always seems to be 0xFFFFFFFF
|-
|-
| 0xA0 || 0x04 || ''unknown'' ||  || Always seems to be 0xFFFFFF
| 0xA0 || 0x04 || ''unknown'' ||  || Always seems to be 0xFFFFFFFF
|}
|}


Line 195: Line 195:
| 0x04 || 0x04 || '''entry_label_offset''' ||  || Offset to the label (relative to the label table).  0xFFFFFFFF means the label doesn't exist for this entry
| 0x04 || 0x04 || '''entry_label_offset''' ||  || Offset to the label (relative to the label table).  0xFFFFFFFF means the label doesn't exist for this entry
|-
|-
| 0x08 || 0x04 || ''entry_header_size'' ||  || sizeof(RCOEntry) = 0x28 [ only used for entries with extra info (ie not "main" entries) ]
| 0x08 || 0x04 || '''entry_header_size''' ||  || sizeof(RCOEntry) = 0x28 [ only used for entries with extra info (ie not "main" entries) ]
|-
|-
| 0x0C || 0x04 || ''entry_size'' ||  || main tables (main/img etc) uses 0x28 here, or is this the length of current entry (not including subentries)?
| 0x0C || 0x04 || '''entry_size''' ||  || main tables (main/img etc) uses 0x28 here, or is this the length of current entry (not including subentries)?
|-
|-
| 0x10 || 0x04 || '''children_number''' ||  ||  
| 0x10 || 0x04 || '''children_number''' ||  ||  
Line 207: Line 207:
| 0x1C || 0x04 || '''parent_offset''' ||  ||  
| 0x1C || 0x04 || '''parent_offset''' ||  ||  
|-
|-
| 0x20 || 0x04 || '''unknown''' ||  ||  
| 0x20 || 0x04 || ''unknown'' ||  || Always seems to be 0x00000000
|-
|-
| 0x24 || 0x04 || '''unknown''' ||  ||  
| 0x24 || 0x04 || ''unknown'' ||  || Always seems to be 0x00000000
|}
|}
After the common area it starts with the info specific for the '''entry_type''', in wiki this has been separated in different pages...
After the common area it starts with the info specific for the '''entry_type''', in wiki this has been separated in different pages...

Revision as of 17:36, 9 September 2016

Description

Resource Container Objet (RCO) contents are loaded by XMB modules (also known as .sprx plugins), see Plugin Interfaces and VSH

  • Compression types availables:
    • ZLIB
    • RLZ
    • Uncompressed

Contents

Text for all languages, textures, sounds (for cursor navigation, trophy unlocking, etc...) and models

RCO format Embedded code Text Textures Sounds Models Script
Generic RCOXML utf8, utf16, utf32 gim, png, jpg, tif, gif, bmp vag, unknown0x0 gmo PlayStation JavaScript
PS3 specific RCOXML utf16 gim, png, jpg vag n/a n/a

Versions

RCO version Firmware Release date Notes
0x55 PSP icon 0.6.5 pre-retail archaic rco format, header is 12 bytes smaller
0x70 PSP icon 1.00 2004 / 12 / 12
0x71 PSP icon 1.50~2.50 2005 / 3 / 24 normal table section up to this version
0x90 PSP icon 2.60 2005 / 11 / 29 zlib compressed table section implemented
0x95 PSP icon 2.70~2.71 2006 / 4 / 25 rlz compressed table section implemented
0x96 PSP icon 2.80~3.40 2006 / 7 / 27
0x97 PS3 icon 1.00~1.54 2006 / 11 / 11
0x100 PSP icon 3.50~6.61 2007 / 5 / 31
0x102 PS3 icon 1.60~1.70 2007 / 3 / 22
0x104 PS3 icon 1.80~1.82 2007 / 5 / 24
0x105 PS3 icon 1.90~1.94 2007 / 7 / 24
0x106 PS3 icon 2.00~2.17 2007 / 11 / 8
0x107 PS3 icon 2.20~2.80 2008 / 3 / 25
0x108 PS3 icon 3.00~3.01 2009 / 9 / 1
0x110 PS3 icon 3.10~3.74 2009 / 11 / 19
0x120 PS3 icon 4.00~4.25 2011 / 11 / 29
0x130 PS3 icon 4.30~4.76 2012 / 10 / 24

RCO Structure

The container structure can be represented as an XML (see RCOXML), with rcomage is posible to generate this XML when extracting, and for rebuilding the rco using the XML as a layout

http://endlessparadigm.com/forum/showthread.php?tid=231 (outdated)

Header

Offset Length Name Example Notes
0x00 0x04 magic FRP In PS3 is "FRP" (big endian). In PSP is "PRF" (little endian). Playstation Resource File
0x04 0x04 version 00 00 01 30 named minFirmwareVer in rcomage, see Discussion page
0x08 0x04 unknown 00 00 00 00 Always seems to be 0x00000000
0x0C 0x04 compress_header 00 00 00 00 *0x00 no compress
*0x10 zlib
*0x20 rlz ?
0x10 0x04 info_table_offset 00 00 00 A4 usually 0xA4
0x14 0x04 vsmx_table_offset
0x18 0x04 text_table_offset
0x1C 0x04 sound_table_offset
0x20 0x04 model_table_offset
0x24 0x04 image_table_offset
0x28 0x04 unknown FF FF FF FF Always seems to be 0xFFFFFFFF
0x2C 0x04 font_table_offset
0x30 0x04 object_table_offset
0x34 0x04 anim_table_offset
strings
Offset Length Name Example Notes
0x38 0x04 text_table_offset
0x3C 0x04 text_table_length
0x40 0x04 label_table_offset
0x44 0x04 label_table_length
0x48 0x04 native_table_offset
0x4C 0x04 native_table_length
pointers
Offset Length Name Example Notes
0x50 0x04 text_pointer_table_offset
0x54 0x04 text_pointer_table_length
0x58 0x04 image_pointer_table_offset
0x5C 0x04 image_pointer_table_length
0x60 0x04 model_pointer_table_offset
0x64 0x04 model_pointer_table_length
0x68 0x04 sound_pointer_table_offset
0x6C 0x04 sound_pointer_table_length
0x70 0x04 object_pointer_table_offset
0x74 0x04 object_pointer_table_length
0x78 0x04 anim_pointer_table_offset
0x7C 0x04 anim_pointer_table_length
files
Offset Length Name Example Notes
0x80 0x04 image_data_section_offset
0x84 0x04 image_data_section_length
0x88 0x04 sound_data_section_offset
0x8C 0x04 sound_data_section_length
0x90 0x04 model_data_section_offset
0x94 0x04 model_data_section_length
0x98 0x04 unknown Always seems to be 0xFFFFFFFF
0x9C 0x04 unknown Always seems to be 0xFFFFFFFF
0xA0 0x04 unknown Always seems to be 0xFFFFFFFF

info/main/xml table

This area works as an index of all the .rco contents, when the area is compressed there are 12 bytes at the beggining with info about this compression, aftr it starts the info, is composed by entries that follows a hierarchy of parent/children/brother and every entry defines an element wich can have several attributes. All this info can be represented as an xml file (this is what rcomage names an RCOXML)

When the table is compressed at beggining there are 3 values related with the compression (otherway if the table is not compressed this 3 values doesnt exists)

Offset Length Name Example Notes
0x00 0x04 lenPacked Packed size of all the table sections
0x04 0x04 lenUnpacked Unpacked size of all the table sections
0x08 0x04 lenLongestText length of the longest language's text data (unpacked)

And then it starts with the entries, every entry has an area at begining that is common, in it is specifyed the entry_type, the values that comes after this area are dependant of the entry type

Offset Length Name Example Notes
0x00 0x01 hierarchy_depth ? main table uses 0x01, may be used as a current entry depth value
0x01 0x01 entry_type *0x1=MainTree
*0x2=ScriptTree
*0x3=TextTree
*0x4=ImageTree
*0x5=ModelTree
*0x6=SoundTree
*0x7=FontTree
*0x8=ObjectTree
*0x9=AnimTree
0x02 0x02 unknown Always seems to be 0x0000
0x04 0x04 entry_label_offset Offset to the label (relative to the label table). 0xFFFFFFFF means the label doesn't exist for this entry
0x08 0x04 entry_header_size sizeof(RCOEntry) = 0x28 [ only used for entries with extra info (ie not "main" entries) ]
0x0C 0x04 entry_size main tables (main/img etc) uses 0x28 here, or is this the length of current entry (not including subentries)?
0x10 0x04 children_number
0x14 0x04 next_entry_offset
0x18 0x04 previous_entry_offset
0x1C 0x04 parent_offset
0x20 0x04 unknown Always seems to be 0x00000000
0x24 0x04 unknown Always seems to be 0x00000000

After the common area it starts with the info specific for the entry_type, in wiki this has been separated in different pages...