Resource Container (RCO): Difference between revisions

From PS3 Developer wiki
Jump to navigation Jump to search
Line 161: Line 161:
{| class="wikitable" style="font-size:small;"
{| class="wikitable" style="font-size:small;"
|-
|-
! Offset !! Length !! Data type !! Name !! {{icon content psp|50px}} !! {{icon content ps3|50px}} !! Example (HEX) !! Example (RCOXML) !! Notes !! Speculation
! Offset !! Length !! Data type !! Name !! {{icon content psp|50px}} !! {{icon content ps3|50px}} !! Example (HEX) !! Example (RCOXML) !! Notes
|-
|-
| 0x00 || 0x04 || integer || '''entry_type''' || {{yes}} || {{yes}} || 01 01 00 00 || rowspan="2" | <MainTree <span style="color:#000099;">name</span><span style="color:#990000;">="label"</span>> || First and second byte indicates the entry type. See '''RCOXML TOC entry types''' table below ||
| 0x00 || 0x04 || integer || '''entry_type''' || {{yes}} || {{yes}} || 01 01 00 00 || rowspan="2" | <MainTree <span style="color:#000099;">name</span><span style="color:#990000;">="label"</span>> || First and second byte indicates the entry type
|-
|-
| 0x04 || 0x04 || integer || '''entry_label_offset''' || {{yes}} || {{yes}} || 00 00 00 00 || Offset to the label (relative to the label table).  0xFFFFFFFF means the label doesn't exist for this entry ||
| 0x04 || 0x04 || integer || '''entry_label_offset''' || {{yes}} || {{yes}} || 00 00 00 00 || Offset to the label (relative to the label table).  0xFFFFFFFF means the label doesn't exist for this entry
|-
|-
| 0x08 || 0x04 || integer || '''entry_header_size''' || {{yes}} || {{yes}} || || || sizeof(RCOEntry) = 0x28 [ only used for entries with extra info (ie not "main" entries) ] || ''entry_common_area_size''
| 0x08 || 0x04 || integer || '''entry_header_size''' || {{yes}} || {{yes}} || 00 00 00 28 || {{cellcolors|lightgrey}} n/a || sizeof(RCOEntry) = 0x28 [ only used for entries with extra info (ie not "main" entries) ]
|-
|-
| 0x0C || 0x04 || integer || '''entry_size''' || {{yes}} || {{yes}} || || || main tables (main/img etc) uses 0x28 here, or is this the length of current entry (not including subentries)? || ''entry_whole_size''
| 0x0C || 0x04 || integer || '''entry_size''' || {{yes}} || {{yes}} || 00 00 00 4C || {{cellcolors|lightgrey}} n/a || main tables (main/img etc) uses 0x28 here, or is this the length of current entry (not including subentries)?
|-
|-
| 0x10 || 0x04 || integer || '''children_number''' || {{yes}} || {{yes}} || || |||  
| 0x10 || 0x04 || integer || '''children_number''' || {{yes}} || {{yes}} || 00 00 00 08 || {{cellcolors|lightgrey}} n/a ||  
|-
|-
| 0x14 || 0x04 || integer || '''next_entry_offset''' || {{yes}} || {{yes}} || || || || ''next_brother_entry_size''
| 0x14 || 0x04 || integer || '''next_brother_entry_offset''' || {{yes}} || {{yes}} || 00 00 00 00 || {{cellcolors|lightgrey}} n/a ||  
|-
|-
| 0x18 || 0x04 || integer || '''previous_entry_offset''' || {{yes}} || {{yes}} || || || this is usually 0x0 however (does make writing RCOs easier though :P I guess Sony's tools do something similar...) || ''previous_brother_entry_size''
| 0x18 || 0x04 || integer || '''prev_brother_entry_offset''' || {{yes}} || {{yes}} || 00 00 00 00 || {{cellcolors|lightgrey}} n/a || this is usually 0x0 however (does make writing RCOs easier though :P I guess Sony's tools do something similar...)
|-
|-
| 0x1C || 0x04 || integer || '''parent_offset''' || {{yes}} || {{yes}} || || || offset of this entry from parent entry || ''entry_offset_relative_to_parent_start_offset''
| 0x1C || 0x04 || integer || '''parent_offset''' || {{yes}} || {{yes}} || 00 00 00 28 || {{cellcolors|lightgrey}} n/a || entry offset relative to parent start offset
|-
|-
| 0x20 || 0x04 || unk || {{cellcolors|#ff9999}} ''unknown'' || {{yes}} || {{yes}} || ||  || Always seems to be 0x00000000 ||  
| 0x20 || 0x04 || unk || {{cellcolors|#ff9999}} ''unknown'' || {{yes}} || {{yes}} || <abbr title="Always seems to be 0x00000000">00 00 00 00</abbr> || {{cellcolors|lightgrey}} n/a ||  
|-
|-
| 0x24 || 0x04 || unk || {{cellcolors|#ff9999}} ''unknown'' || {{yes}} || {{yes}} || ||  || Always seems to be 0x00000000 ||  
| 0x24 || 0x04 || unk || {{cellcolors|#ff9999}} ''unknown'' || {{yes}} || {{yes}} || <abbr title="Always seems to be 0x00000000">00 00 00 00</abbr> || {{cellcolors|lightgrey}} n/a ||  
|}
|}


Line 196: Line 196:
{| class="wikitable"
{| class="wikitable"
|-
|-
! Offset !! Length !! Name !! Example !! Notes !! Speculation
! Offset !! Length !! Name !! Example !! Notes
|-
|-
| 0x00 || 0x04 || '''file_offset''' ||  || VSMX file offset, relative to the start offset of the vsmx data table (always 0) ||
| 0x00 || 0x04 || '''file_offset''' ||  || VSMX file offset, relative to the start offset of the vsmx data table (always 0)
|-
|-
| 0x04 || 0x04 || '''file_size''' ||  || VSMX file length ||
| 0x04 || 0x04 || '''file_size''' ||  || VSMX file length
|}
|}


Line 209: Line 209:
{| class="wikitable"
{| class="wikitable"
|-
|-
! Offset !! Length !! Name !! Example !! Notes !! Speculation
! Offset !! Length !! Name !! Example !! Notes
|-
|-
| 0x00 || 0x02 || '''language_id''' ||  || 0x00=Japanese<br>0x01=English (United States)<br>0x02=French<br>0x03=Spanish (Spain)<br>0x04=German<br>0x05=Italian<br>0x06=Dutch<br>0x07=Portuguese (Portugal)<br>0x08=Russian<br>0x09=Korean<br>0x0A=Chinese (Traditional)<br>0x0B=Chinese (Simplified)<br>0x0C=Finnish<br>0x0D=Swedish<br>0x0E=Danish<br>0x0F=Norwegian<br>0x10=Polish<br>0x11=Portuguese (Brazil)<br>0x12=English (United Kingdom)<br>0x13=Turkish ||
| 0x00 || 0x02 || '''language_id''' ||  || 0x00=Japanese<br>0x01=English (United States)<br>0x02=French<br>0x03=Spanish (Spain)<br>0x04=German<br>0x05=Italian<br>0x06=Dutch<br>0x07=Portuguese (Portugal)<br>0x08=Russian<br>0x09=Korean<br>0x0A=Chinese (Traditional)<br>0x0B=Chinese (Simplified)<br>0x0C=Finnish<br>0x0D=Swedish<br>0x0E=Danish<br>0x0F=Norwegian<br>0x10=Polish<br>0x11=Portuguese (Brazil)<br>0x12=English (United Kingdom)<br>0x13=Turkish
|-
|-
| 0x02 || 0x02 || '''strings_format''' ||  || 0x00=UTF8<br>0x01=UTF16<br>0x02=UTF32 ||
| 0x02 || 0x02 || '''strings_format''' ||  || 0x00=UTF8<br>0x01=UTF16<br>0x02=UTF32
|-
|-
| 0x04 || 0x04 || '''strings_number''' ||  || number of text strings for this '''language_id''' ||
| 0x04 || 0x04 || '''strings_number''' ||  || number of text strings for this '''language_id'''
|}
|}


Line 221: Line 221:
{| class="wikitable"
{| class="wikitable"
|-
|-
! Offset !! Length !! Name !! Example !! Notes !! Speculation
! Offset !! Length !! Name !! Example !! Notes
|-
|-
| 0x00 || 0x04 || '''label_offset''' ||  || Offset to label, relative of the label table ||
| 0x00 || 0x04 || '''label_offset''' ||  || Offset to label, relative of the label table
|-
|-
| 0x04 || 0x04 || '''string_length''' ||  || Length of the text ||
| 0x04 || 0x04 || '''string_length''' ||  || Length of the text
|-
|-
| 0x08 || 0x04 || '''string_offset''' ||  || Offset of the text, relative to the text data start address ||
| 0x08 || 0x04 || '''string_offset''' ||  || Offset of the text, relative to the text data start address
|}
|}


Line 237: Line 237:
{| class="wikitable"
{| class="wikitable"
|-
|-
! Offset !! Length !! Name !! Example !! Notes !! Speculation
! Offset !! Length !! Name !! Example !! Notes
|-
|-
| 0x00 || 0x02 || '''file_format''' ||  || 0x0=PNG<br>0x1=JPEG<br>0x2=TIFF<br>0x3=GIF<br>0x4=BMP<br>0x5=GIM ||
| 0x00 || 0x02 || '''file_format''' ||  || 0x0=PNG<br>0x1=JPEG<br>0x2=TIFF<br>0x3=GIF<br>0x4=BMP<br>0x5=GIM
|-
|-
| 0x02 || 0x02 || '''file_compression''' ||  || 0x0=NONE<br>0x1=ZLIB<br>0x2=RLZ ||
| 0x02 || 0x02 || '''file_compression''' ||  || 0x0=NONE<br>0x1=ZLIB<br>0x2=RLZ
|-
|-
| 0x04 || 0x04 || '''file_size''' ||  || either compressed or uncompressed, this is the final size of the file stored inside the rco ||
| 0x04 || 0x04 || '''file_size''' ||  || either compressed or uncompressed, this is the final size of the file stored inside the rco
|-
|-
| 0x08 || 0x04 || '''file_offset''' ||  ||  ||  
| 0x08 || 0x04 || '''file_offset''' ||  ||  
|-
|-
| 0x0C || 0x04 || {{cellcolors|#ff9999}} ''unknown'' ||  || PS3 RCOs seem to have this extra value - probably something to do with planes/frames?? usually 0x1 ||
| 0x0C || 0x04 || {{cellcolors|#ff9999}} ''unknown'' ||  || PS3 RCOs seem to have this extra value - probably something to do with planes/frames?? usually 0x1
|-
|-
| 0x10 || 0x04 || {{cellcolors|#9999ff}} '''file_uncompressed_size''' ||  || Optional. Doesn't exist if '''file_compression''' = '''NONE''', for PSP is located 4 bytes before because the previous value doesn't exists ||
| 0x10 || 0x04 || {{cellcolors|#9999ff}} '''file_uncompressed_size''' ||  || Optional. Doesn't exist if '''file_compression''' = '''NONE''', for PSP is located 4 bytes before because the previous value doesn't exists
|}
|}


Line 259: Line 259:
{| class="wikitable"
{| class="wikitable"
|-
|-
! Offset !! Length !! Name !! Example !! Notes !! Speculation
! Offset !! Length !! Name !! Example !! Notes
|-
|-
| 0x00 || 0x02 || '''file_format''' ||  || 0x0=GMO ||
| 0x00 || 0x02 || '''file_format''' ||  || 0x0=GMO
|-
|-
| 0x02 || 0x02 || '''file_compression''' ||  || 0x0=NONE<br>0x1=ZLIB<br>0x2=RLZ ||
| 0x02 || 0x02 || '''file_compression''' ||  || 0x0=NONE<br>0x1=ZLIB<br>0x2=RLZ
|-
|-
| 0x04 || 0x04 || '''file_size''' ||  || either compressed or uncompressed, this is the final size of the file stored inside the rco ||
| 0x04 || 0x04 || '''file_size''' ||  || either compressed or uncompressed, this is the final size of the file stored inside the rco
|-
|-
| 0x08 || 0x04 || '''file_offset''' ||  || Offset of data relative to the beginning of the image data section ||
| 0x08 || 0x04 || '''file_offset''' ||  || Offset of data relative to the beginning of the image data section
|-
|-
| 0x0C || 0x04 || {{cellcolors|#ff9999}} ''unknown'' ||  || PS3 RCOs seem to have this extra value - probably something to do with planes/frames?? usually 0x1 ||
| 0x0C || 0x04 || {{cellcolors|#ff9999}} ''unknown'' ||  || PS3 RCOs seem to have this extra value - probably something to do with planes/frames?? usually 0x1
|-
|-
| 0x10 || 0x04 || {{cellcolors|#9999ff}} '''file_uncompressed_size''' ||  || Optional. Doesn't exist if '''file_compression''' = '''NONE''', for PSP is located 4 bytes before because the previous value doesn't exists ||
| 0x10 || 0x04 || {{cellcolors|#9999ff}} '''file_uncompressed_size''' ||  || Optional. Doesn't exist if '''file_compression''' = '''NONE''', for PSP is located 4 bytes before because the previous value doesn't exists
|}
|}


Line 277: Line 277:
{| class="wikitable"
{| class="wikitable"
|-
|-
! Offset !! Length !! Name !! Example !! Notes !! Speculation
! Offset !! Length !! Name !! Example !! Notes
|-
|-
| 0x00 || 0x02 || '''file_format''' ||  || <span style="background:#ff9999;">0x0=''unknown''</span><br>0x1=VAG ||
| 0x00 || 0x02 || '''file_format''' ||  || <span style="background:#ff9999;">0x0=''unknown''</span><br>0x1=VAG
|-
|-
| 0x02 || 0x02 || '''audio_channels''' ||  || 0x1=MONO<br>0x2=STEREO ||
| 0x02 || 0x02 || '''audio_channels''' ||  || 0x1=MONO<br>0x2=STEREO
|-
|-
| 0x04 || 0x04 || '''file_size''' ||  || either one or two channels, this is the final size of the file stored inside the rco ||
| 0x04 || 0x04 || '''file_size''' ||  || either one or two channels, this is the final size of the file stored inside the rco
|-
|-
| 0x08 || 0x04 || '''file_offset''' ||  || Offset of the sound data to the beginning of the sound data section ||
| 0x08 || 0x04 || '''file_offset''' ||  || Offset of the sound data to the beginning of the sound data section
|-
|-
| 0x0C || 0x04 || '''left_channel_size''' ||  || <!--If '''audio_channels''' = '''MONO''' this is the size of the whole audio file, if '''STEREO''' -->This is the size of left channel file ||
| 0x0C || 0x04 || '''left_channel_size''' ||  || <!--If '''audio_channels''' = '''MONO''' this is the size of the whole audio file, if '''STEREO''' -->This is the size of left channel file
|-
|-
| 0x10 || 0x04 || '''left_channel_offset''' ||  || Offset of left channel VAG to the beginning of the sound data section ||
| 0x10 || 0x04 || '''left_channel_offset''' ||  || Offset of left channel VAG to the beginning of the sound data section
|-
|-
| 0x0C || 0x04 || {{cellcolors|#9999ff}} '''right_channel_size''' ||  || Optional. Only exists if '''audio_channels''' = '''STEREO''' ||
| 0x0C || 0x04 || {{cellcolors|#9999ff}} '''right_channel_size''' ||  || Optional. Only exists if '''audio_channels''' = '''STEREO'''
|-
|-
| 0x10 || 0x04 || {{cellcolors|#9999ff}} '''right_channel_offset''' ||  || Optional. Only exists if '''audio_channels''' = '''STEREO''' ||
| 0x10 || 0x04 || {{cellcolors|#9999ff}} '''right_channel_offset''' ||  || Optional. Only exists if '''audio_channels''' = '''STEREO'''
|}
|}


Line 299: Line 299:
{| class="wikitable"
{| class="wikitable"
|-
|-
! Offset !! Length !! Name !! Example !! Notes !! Speculation
! Offset !! Length !! Name !! Example !! Notes
|-
|-
| 0x00 || 0x02 || {{cellcolors|#ff7777}} '''file_format''' ||  || 0x1=? ||
| 0x00 || 0x02 || {{cellcolors|#ff7777}} '''file_format''' ||  || 0x1=?
|-
|-
| 0x02 || 0x02 || {{cellcolors|#ff7777}} '''file_compression''' ||  || 0x0=NONE ?<br>0x1=ZLIB ?<br>0x2=RLZ ? ||
| 0x02 || 0x02 || {{cellcolors|#ff7777}} '''file_compression''' ||  || 0x0=NONE ?<br>0x1=ZLIB ?<br>0x2=RLZ ?
|-
|-
| 0x04 || 0x04 || {{cellcolors|#ff7777}} ''unknown'' ||  ||  || ''file_size'' ?
| 0x04 || 0x04 || {{cellcolors|#ff7777}} ''unknown'' ||  || ''file_size'' ?
|-
|-
| 0x08 || 0x04 || {{cellcolors|#ff7777}} ''unknown'' ||  ||  || ''file_offset'' ?
| 0x08 || 0x04 || {{cellcolors|#ff7777}} ''unknown'' ||  || ''file_offset'' ?
|}
|}



Revision as of 03:50, 25 September 2016

Description

The file extension in PSP and PS3 is RCO that seems to be the acronym of Resource Container Objet

The file signature (aka magic number) from PSP (in little endian) is PRF that seems to be the acronym of Playstation Resource File

RCO contents are loaded by other firmware functions as XMBML setting files, and XMB modules (also known as .sprx plugins), see Plugin Interfaces and VSH

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

RCO Structure

Based on RCO File Format (outdated) and rcomage source

Header

Offset Length Example Name Notes
0x00 0x04 46 52 50 00 prf_signature In PS3 is "FRP" (big endian). In PSP is "PRF" (little endian)
0x04 0x04 00 00 00 97 prf_version named minFirmwareVer in Rcomage, see Discussion page
0x08 0x04 00 00 00 00 prf_unknown
0x0C 0x04 00 00 00 00 prf_compression 0x00=uncompressed, 0x10=ZLIB, 0x20=RLZ
It can be combined with UMDflag, see Discussion page
0x10 0x04 00 00 00 A4 toc_maintree_absolute_offset
0x14 0x04 FF FF FF FF toc_scripttree_absolute_offset
0x18 0x04 FF FF FF FF toc_languagetree_absolute_offset
0x1C 0x04 FF FF FF FF toc_soundtree_absolute_offset
0x20 0x04 FF FF FF FF toc_modeltree_absolute_offset
0x24 0x04 FF FF FF FF toc_imagetree_absolute_offset
0x28 0x04 FF FF FF FF toc_unknown
0x2C 0x04 FF FF FF FF toc_fonttree_absolute_offset
0x30 0x04 00 00 00 CC toc_objecttree_absolute_offset
0x34 0x04 FF FF FF FF toc_animationtree_absolute_offset
0x38 0x04 00 00 01 D4 str_language_table_absolute_offset
0x3C 0x04 00 00 00 00 str_language_table_length
0x40 0x04 00 00 01 D4 str_label_table_absolute_offset
0x44 0x04 00 00 00 1C str_label_table_length
0x48 0x04 00 00 01 F0 str_event_table_absolute_offset
0x4C 0x04 00 00 00 04 str_event_table_length
0x50 0x04 FF FF FF FF ptr_language_table_absolute_offset
0x54 0x04 00 00 00 00 ptr_language_table_length
0x58 0x04 FF FF FF FF ptr_image_table_absolute_offset
0x5C 0x04 00 00 00 00 ptr_image_table_length
0x60 0x04 FF FF FF FF ptr_model_table_absolute_offset
0x64 0x04 00 00 00 00 ptr_model_table_length
0x68 0x04 FF FF FF FF ptr_sound_table_absolute_offset
0x6C 0x04 00 00 00 00 ptr_sound_table_length
0x70 0x04 00 00 01 CC ptr_object_table_absolute_offset
0x74 0x04 00 00 00 08 ptr_object_table_length
0x78 0x04 FF FF FF FF ptr_animation_table_absolute_offset
0x7C 0x04 00 00 00 00 ptr_animation_table_length
0x80 0x04 FF FF FF FF dat_image_table_absolute_offset
0x84 0x04 00 00 00 00 dat_image_table_length
0x88 0x04 FF FF FF FF dat_sound_table_absolute_offset
0x8C 0x04 00 00 00 00 dat_sound_table_length
0x90 0x04 FF FF FF FF dat_model_table_absolute_offset
0x94 0x04 00 00 00 00 dat_model_table_length
0x98 0x04 FF FF FF FF dat_unknown_1
0x9C 0x04 FF FF FF FF dat_unknown_2
0xA0 0x04 FF FF FF FF dat_unknown_3

TOC

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

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

Every entry has an area at beginning that is common for all entry_types, the values that comes after this common area are specific and different for each the entry_type

Offset Length Data type Name PSP icon PS3 icon Example (HEX) Example (RCOXML) Notes
0x00 0x04 integer entry_type Yes Yes 01 01 00 00 <MainTree name="label"> First and second byte indicates the entry type
0x04 0x04 integer entry_label_offset Yes Yes 00 00 00 00 Offset to the label (relative to the label table). 0xFFFFFFFF means the label doesn't exist for this entry
0x08 0x04 integer entry_header_size Yes Yes 00 00 00 28 n/a sizeof(RCOEntry) = 0x28 [ only used for entries with extra info (ie not "main" entries) ]
0x0C 0x04 integer entry_size Yes Yes 00 00 00 4C n/a main tables (main/img etc) uses 0x28 here, or is this the length of current entry (not including subentries)?
0x10 0x04 integer children_number Yes Yes 00 00 00 08 n/a
0x14 0x04 integer next_brother_entry_offset Yes Yes 00 00 00 00 n/a
0x18 0x04 integer prev_brother_entry_offset Yes Yes 00 00 00 00 n/a this is usually 0x0 however (does make writing RCOs easier though :P I guess Sony's tools do something similar...)
0x1C 0x04 integer parent_offset Yes Yes 00 00 00 28 n/a entry offset relative to parent start offset
0x20 0x04 unk unknown Yes Yes 00 00 00 00 n/a
0x24 0x04 unk unknown Yes Yes 00 00 00 00 n/a

Template:RCOXML TOC entry types

After the area common for all entries it starts the info specific for each entry_type explained below

  • (0x1) MainTree

Main tree doesnt uses specific attributes, only uses the default ones explained above that indicates his position at top of the RCOXML Structure hierarchy and gives it a "label" name

  • (0x2) Script

This is named "ScriptTree" for simplification purposes, but is not actually a tree, only one VSMX file can be stored inside an RCO

Offset Length Name Example Notes
0x00 0x04 file_offset VSMX file offset, relative to the start offset of the vsmx data table (always 0)
0x04 0x04 file_size VSMX file length
  • (0x3) Text

"TextTree" could be renamed to LanguageTree, is more intuitive, the point is every entry here is the "parent" of several string texts, but the entry itself is not a text (is the parent of a group of texts), so is better to use a name more abstract like "LanguageTree"

For a Language first are specified the language_id and the number of "children" text strings

Offset Length Name Example Notes
0x00 0x02 language_id 0x00=Japanese
0x01=English (United States)
0x02=French
0x03=Spanish (Spain)
0x04=German
0x05=Italian
0x06=Dutch
0x07=Portuguese (Portugal)
0x08=Russian
0x09=Korean
0x0A=Chinese (Traditional)
0x0B=Chinese (Simplified)
0x0C=Finnish
0x0D=Swedish
0x0E=Danish
0x0F=Norwegian
0x10=Polish
0x11=Portuguese (Brazil)
0x12=English (United Kingdom)
0x13=Turkish
0x02 0x02 strings_format 0x00=UTF8
0x01=UTF16
0x02=UTF32
0x04 0x04 strings_number number of text strings for this language_id

Now for every strings_number are repeated 12 bytes to define every string that are references to other tables

Offset Length Name Example Notes
0x00 0x04 label_offset Offset to label, relative of the label table
0x04 0x04 string_length Length of the text
0x08 0x04 string_offset Offset of the text, relative to the text data start address
  • (0x4) Image

The values marked in red are optional, the presence of the unknown specific for PS3 can be deduced based on the "rco version" in the rco header, only exists in PS3 RCO's (PSP doesnt uses it). See rcomage talk page. The presence of the other optional value file_uncompressed_size can be deduced by reading the entry itself

The file_compression feature adds a compression layer over the file format (pointless for image formats that are nativelly compressed like GIM or JPG)

Offset Length Name Example Notes
0x00 0x02 file_format 0x0=PNG
0x1=JPEG
0x2=TIFF
0x3=GIF
0x4=BMP
0x5=GIM
0x02 0x02 file_compression 0x0=NONE
0x1=ZLIB
0x2=RLZ
0x04 0x04 file_size either compressed or uncompressed, this is the final size of the file stored inside the rco
0x08 0x04 file_offset
0x0C 0x04 unknown PS3 RCOs seem to have this extra value - probably something to do with planes/frames?? usually 0x1
0x10 0x04 file_uncompressed_size Optional. Doesn't exist if file_compression = NONE, for PSP is located 4 bytes before because the previous value doesn't exists
  • (0x5) Model

ModelTree uses the same values than ImageTree with a couple of differences, the table is repeated here for comparison purposes

The presence of the unknown (specific for PS3) is completlly speculative because never has been found a GMO file used on PS3 official firmware, is not even known if PS3 firmware has some function able to manage GMO files

Offset Length Name Example Notes
0x00 0x02 file_format 0x0=GMO
0x02 0x02 file_compression 0x0=NONE
0x1=ZLIB
0x2=RLZ
0x04 0x04 file_size either compressed or uncompressed, this is the final size of the file stored inside the rco
0x08 0x04 file_offset Offset of data relative to the beginning of the image data section
0x0C 0x04 unknown PS3 RCOs seem to have this extra value - probably something to do with planes/frames?? usually 0x1
0x10 0x04 file_uncompressed_size Optional. Doesn't exist if file_compression = NONE, for PSP is located 4 bytes before because the previous value doesn't exists
  • (0x6) Sound
Offset Length Name Example Notes
0x00 0x02 file_format 0x0=unknown
0x1=VAG
0x02 0x02 audio_channels 0x1=MONO
0x2=STEREO
0x04 0x04 file_size either one or two channels, this is the final size of the file stored inside the rco
0x08 0x04 file_offset Offset of the sound data to the beginning of the sound data section
0x0C 0x04 left_channel_size This is the size of left channel file
0x10 0x04 left_channel_offset Offset of left channel VAG to the beginning of the sound data section
0x0C 0x04 right_channel_size Optional. Only exists if audio_channels = STEREO
0x10 0x04 right_channel_offset Optional. Only exists if audio_channels = STEREO
  • (0x7) Font
Offset Length Name Example Notes
0x00 0x02 file_format 0x1=?
0x02 0x02 file_compression 0x0=NONE ?
0x1=ZLIB ?
0x2=RLZ ?
0x04 0x04 unknown file_size ?
0x08 0x04 unknown file_offset ?
  • (0x8) Object
  • (0x9) Animation

Pointer tables

String tables

Data tables

RCO compression methods

When the TOC table is compressed at beginning 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 Speculation
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)
if the compressed area doesn't contains any language text the value is 0