Talk:Resource Container (RCO): Difference between revisions

From PS3 Developer wiki
Jump to navigation Jump to search
Line 1,688: Line 1,688:
| 0x1F0 || 0x04 || 00 00 00 00 ||  || dummy event ?
| 0x1F0 || 0x04 || 00 00 00 00 ||  || dummy event ?
|}
|}
When compiled with ZLIB compression MD5: 4B6C364DDA94BBF1C0A7AC9864DC4796
Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
00000000  46 52 50 00 00 00 00 97 00 00 00 00 00 00 00 <span style="background:#ff0000;">10</span>  FRP....—........
00000010  00 00 00 A4 FF FF FF FF FF FF FF FF FF FF FF FF  ...¤ÿÿÿÿÿÿÿÿÿÿÿÿ
00000020  FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00000030  00 00 00 CC FF FF FF FF <span style="background:#00ff00;">FF FF FF FF</span> 00 00 00 00  ...Ìÿÿÿÿÿÿÿÿ....
00000040  00 00 01 D4 00 00 00 1C 00 00 01 F0 00 00 00 04  ...Ô.......ð....
00000050  FF FF FF FF 00 00 00 00 FF FF FF FF 00 00 00 00  ÿÿÿÿ....ÿÿÿÿ....
00000060  FF FF FF FF 00 00 00 00 FF FF FF FF 00 00 00 00  ÿÿÿÿ....ÿÿÿÿ....
00000070  00 00 01 CC 00 00 00 08 FF FF FF FF 00 00 00 00  ...Ì....ÿÿÿÿ....
00000080  FF FF FF FF 00 00 00 00 FF FF FF FF 00 00 00 00  ÿÿÿÿ....ÿÿÿÿ....
00000090  FF FF FF FF 00 00 00 00 FF FF FF FF FF FF FF FF  ÿÿÿÿ....ÿÿÿÿÿÿÿÿ
000000A0  FF FF FF FF <span style="background:#ffff00;">00 00 00 6C</span> <span style="background:#ffff00;">00 00 01 50</span> <span style="background:#ffff00;">00 00 00 00</span>  ÿÿÿÿ...l...P....
000000B0  <span style="background:#ff00ff;">78 DA 75 CD C1 0D 80 20 0C 05 D0 5F 4F 1C 75 0B</span>  xÚuÍÁ.€ ..Ð_O.u.
000000C0  <span style="background:#ff00ff;">B6 D0 01 58 82 18 0F 24 28 44 19 C0 A1 BD 2B 04</span>  ¶Ð.X‚..$(D.À¡½+.
000000D0  <span style="background:#ff00ff;">23 2A F0 92 9F 26 A5 B4 44 78 E3 3E 84 02 E6 73</span>  #*ð’Ÿ&¥´Dxã>„.æs
000000E0  <span style="background:#ff00ff;">7A 95 39 FE CC 51 2C 77 4F D4 E6 A8 0B FB E2 CE</span>  z•9þÌQ,wOÔæ¨.ûâÎ
000000F0  <span style="background:#ff00ff;">5A 65 0D 82 36 FE CB 08 14 F4 FB 37 C9 BF 9F EE</span>  Ze.‚6þË..ôû7É¿Ÿî
00000100  <span style="background:#ff00ff;">23 53 7C 3F 00 1A 36 39 5B 3D 01 AB 31 0E 9E B4</span>  #S|?..69[=.«1.ž´
00000110  <span style="background:#ff00ff;">56 AB 51 3A 65 16 04 17 88 21 38 F3</span>              V«Q:e...ˆ!8ó
*Changes
**<span style="background:#ff0000;">10</span> the compression setting for ZLIB
**<span style="background:#00ff00;">FF FF FF FF</span> weird
**<span style="background:#ffff00;">00 00 00 6C</span> <span style="background:#ffff00;">00 00 01 50</span> <span style="background:#ffff00;">00 00 00 00</span> the info about the compressed area that comes next (composed by: lenPacked, lenUnpacked, and lenLongestText)
**<span style="background:#ff00ff;">78 DA ...</span> the compressed area itself, includes the TOC, the pointer tables (PTR), and string tables (STR)

Revision as of 02:44, 22 September 2016

Unknowns

RCO versions (aka minFirmwareVer in rcomage)

All RCO files contains a version number, the version increases with bigger firmwares but not for every firmware and is not directly associated with it. The same versioning method is used in PSP and PS3 RCO's

It seems all the RCO's of a specific firmware shares the same version (verifyed for firmware 4.76) and seems to be the version of the "rco set", or the version of the "rco tool" used to compile the whole "rco set". RCOmage v1.1.1 (latest stable) identifyes the version with a list of hardcoded values

Code Sample

After extracting the contents of the RCO with RCOmage, the version is stored for rebuilding purposes in the RCOXML descriptor file as an attribute with the name minFirmwareVer

If the version is unknown is stored as unknownId0x%x using unknownId to specify the fact that is unknown + the real hex value 0x%x

Example... sysconf_plugin.rco from PS3 firmware 2.00 with version 0x106

Code Sample

unknownByte

In the xml representation of the .rco structure... every image inside the imagetree uses an unknown attribute named unknownByte. Is an attribute related with the image format and is equal to 0 in most of the PS3 images (very rarelly used)

  • After searching in ALL the images contained inside ALL .rco files from firmware 4.76... there is a total of 72 images using unknownByte="1" (and 3098 images using unknownByte="0" for a total of 3170 images inside .rco's)

from system_plugin.rco

Code Sample
  • The 2 .gim files found using unknownByte="1" has some things in common:
    • The size of both .gim file is exactlly 452KB (463.232 bytes)
    • The resolution of both images in pixels is 512x206
    • The first 0x80 bytes of the header in both is exactlly the same (see example below)

unknownByte .gim header example

Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F

00000000  2E 47 49 4D 31 2E 30 30 00 50 53 50 00 00 00 00  .GIM1.00.PSP....
00000010  00 02 00 00 00 07 11 70 00 00 00 10 00 00 00 10  .......p........
00000020  00 03 00 00 00 07 11 60 00 00 00 10 00 00 00 10  .......`........
00000030  00 04 00 00 00 07 11 50 00 07 11 50 00 00 00 10  .......P...P....
00000040  00 30 00 00 00 03 00 00 02 18 00 D8 00 20 00 10  .0.........Ø. ..
00000050  00 01 00 02 00 00 00 00 00 00 00 30 00 00 00 40  ...........0...@
00000060  00 07 11 40 00 00 00 00 00 01 00 01 00 03 00 01  ...@............
00000070  00 00 00 40 00 00 00 00 00 00 00 00 00 00 00 00  ...@............

Is not specific for .GIM image format because other image formats uses it too, here are a couple of examples from newstore_plugin.rco where is used with .JPG and .PNG

Code Sample

Is specific for PS3 (not used on PSP) as can be seen in the comments of the source code of rcomage here in line number 188

PS3 RCOs seem to have this extra element - probably something to do with planes/frames??

UMDFlag

This attribute was named UMDFlag unofficially because it was found used in the .rco files contained inside PSP UMD discs only

The name seems not accurate enought (because PS3 cant read UMD discs) so maybe is something more generic like "disc media", though never has been found a PS3 disc containing .rco's and the HYBRID_FLAG used in the bluray contents descriptor file PS3_DISC.SFB for "music bluray" and "photo bluray" are completlly speculative

  • Speculation. Maybe is::
    • 0 = system rco
    • 1 = external rco (disc media, etc)

Hashreports

PS3 all versions

all OFW 1.00-4.75 hashes: https://www.mirrorcreator.com/files/7KCMQKWQ/RCO-hashreport.7z_links <--- please someone convert this in a "human readable wiki table"

PSP 6.61

  • PSP 6.60 and 6.61 firmware contains 63 .rco files (same files for both firmwares). Two of them are specific for PSPgo model (bluetooth_plugin.rco, slide_plugin.rco)
  • Only 10 of them are compresed with ZLIB (dd_helper.rco, dnas_plugin.rco, htmlviewer_plugin.rco, lftv_rmc_univer3in1.rco, lftv_rmc_univer3in1_jp.rco, lftv_rmc_univertuner.rco, lftv_rmc_univertuner_jp.rco, lftv_tuner_jp_jp.rco, lftv_tuner_us_en.rco, oneseg_plugin.rco). All the others are compressed with RLZ (and RLZ decompression is not supported by rcomage, is needed to use Resurssiklunssi v0.3 to rebuild them)
  • Resurssiklunssi rebuilds the .rco files and allows for two rebuild modes:
    • TRIANGLE or CROSS - only rebuilds
      • The converted files will have minFirmwareVer="1.5" (the original value is lost in the conversion)
    • SQUARE or CIRCLE - rebuilds and recompress in ZLIB
      • The converted files will have minFirmwareVer="2.6" (the original value is lost in the conversion)
Code Sample
  • PSP 6.60 and 6.61 firmware. RCO hashes after resurssiklunssi rebuild (cross option)
Code Sample
  • PSP firmware 1.00 contains only 21 .rco files (all them uses ZLIB, none of them uses RLZ)
Code Sample

Examples (rcomage builds)

This is a temporal section for tests using rcomage to create frankensteins .rco files smallest as posible that could serve as an explain of his structure. Will contain the source xml file used to create the rco, a big table with ALL the values of the structure, and a sample in hexview of the created rco. Eventually one (or a couple) of this tables will be moved to front page but by now this is a shared notepad and experimentation to see how to make that tables intuitive, pretty, and smallest posible, feel free to add other examples

Also, i think rcomage has several problems (no offense intended is a great tool everybody loves) in how the areas of the structure are divided, some names that can be improved, some definition of lengths of partially known or unknown values, etc... the examples are going to look pretty similar to the examples i wrote at the bottom of CXML Containers page (the concept of how it works is the same)--Sandungas (talk) 18:48, 10 September 2016 (UTC)

ImageTree with 1 image

This is a basic example of how the files are stored inside the container, similar method is used for all files (images, models, sounds, and fonts ?)

The .xml below is the RCOXML source file used to create the .rco. The file image_test.gim is a dummy of 8 bytes filed with 8888888888888888

Code Sample

When compiled MD5: E4C203A3D4B0B6854C90CD576E028545

Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
00000000  46 52 50 00 00 00 01 30 00 00 00 00 00 00 00 00  FRP....0........
00000010  00 00 00 A4 FF FF FF FF FF FF FF FF FF FF FF FF  ...¤ÿÿÿÿÿÿÿÿÿÿÿÿ
00000020  FF FF FF FF 00 00 00 CC FF FF FF FF FF FF FF FF  ÿÿÿÿ...Ìÿÿÿÿÿÿÿÿ
00000030  FF FF FF FF FF FF FF FF 00 00 01 34 00 00 00 00  ÿÿÿÿÿÿÿÿ...4....
00000040  00 00 01 34 00 00 00 14 00 00 01 48 00 00 00 00  ...4.......H....
00000050  FF FF FF FF 00 00 00 00 00 00 01 2C 00 00 00 08  ÿÿÿÿ.......,....
00000060  FF FF FF FF 00 00 00 00 FF FF FF FF 00 00 00 00  ÿÿÿÿ....ÿÿÿÿ....
00000070  FF FF FF FF 00 00 00 00 FF FF FF FF 00 00 00 00  ÿÿÿÿ....ÿÿÿÿ....
00000080  00 00 01 48 00 00 00 08 FF FF FF FF 00 00 00 00  ...H....ÿÿÿÿ....
00000090  FF FF FF FF 00 00 00 00 FF FF FF FF FF FF FF FF  ÿÿÿÿ....ÿÿÿÿÿÿÿÿ
000000A0  FF FF FF FF 01 01 00 00 00 00 00 00 00 00 00 00  ÿÿÿÿ............
000000B0  00 00 00 28 00 00 00 01 00 00 00 00 00 00 00 00  ...(............
000000C0  00 00 00 00 00 00 00 00 00 00 00 00 04 00 00 00  ................
000000D0  FF FF FF FF 00 00 00 00 00 00 00 28 00 00 00 01  ÿÿÿÿ.......(....
000000E0  00 00 00 00 00 00 00 00 00 00 00 28 00 00 00 00  ...........(....
000000F0  00 00 00 00 04 01 00 00 00 00 00 08 00 00 00 28  ...............(
00000100  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00000110  00 00 00 28 00 00 00 00 00 00 00 00 00 05 01 00  ...(............
00000120  00 00 00 08 00 00 00 00 00 00 00 01 00 00 00 F4  ...............ô
00000130  00 00 00 00 74 65 73 74 00 00 00 00 69 6D 61 67  ....test....imag
00000140  65 5F 74 65 73 74 00 00 88 88 88 88 88 88 88 88  e_test..ˆˆˆˆˆˆˆˆ
Areas Offset Length Example Name Notes
Header
0x00 0x04 FRP magic FRP in big endian
0x04 0x04 00 00 01 30 version 0x130 = one of the firmwares for PS3
0x08 0x04 00 00 00 00 unknown
0x0C 0x04 00 00 00 00 compress_header 0x00 = uncompressed
0x10 0x04 00 00 00 A4 toc_maintree_absolute_offset MainTree at absolute offset 0xA4
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 00 00 00 CC toc_imagetree_absolute_offset ImageTree at absolute offset 0xCC
0x28 0x04 FF FF FF FF toc_unknowntree_absolute_offset
0x2C 0x04 FF FF FF FF toc_fonttree_absolute_offset
0x30 0x04 FF FF FF FF toc_objecttree_absolute_offset
0x34 0x04 FF FF FF FF toc_animationtree_absolute_offset
0x38 0x04 00 00 01 34 strings_texts_absolute_offset strings texts table at absolute offset 0x134
0x3C 0x04 00 00 00 00 strings_texts_length strings texts table is empty
0x40 0x04 00 00 01 34 strings_labels_absolute_offset strings labels table at absolute offset 0x134
0x44 0x04 00 00 00 14 strings_labels_length strings labels size 0x14
0x48 0x04 00 00 01 48 strings_events_absolute_offset strings events table at absolute offset 0x148
0x4C 0x04 00 00 00 00 strings_events_length strings events table is empty
0x50 0x04 FF FF FF FF text_pointer_table_offset
0x54 0x04 00 00 00 00 text_pointer_table_length
0x58 0x04 00 00 01 2C image_pointer_table_offset
0x5C 0x04 00 00 00 00 image_pointer_table_length
0x60 0x04 FF FF FF FF model_pointer_table_offset
0x64 0x04 00 00 00 00 model_pointer_table_length
0x68 0x04 FF FF FF FF sound_pointer_table_offset
0x6C 0x04 00 00 00 00 sound_pointer_table_length
0x70 0x04 FF FF FF FF object_pointer_table_offset
0x74 0x04 00 00 00 00 object_pointer_table_length
0x78 0x04 FF FF FF FF anim_pointer_table_offset
0x7C 0x04 00 00 00 00 anim_pointer_table_length
0x80 0x04 00 00 01 48 image_data_section_offset
0x84 0x04 00 00 00 08 image_data_section_length
0x88 0x04 FF FF FF FF sound_data_section_offset
0x8C 0x04 00 00 00 00 sound_data_section_length
0x90 0x04 FF FF FF FF model_data_section_offset
0x94 0x04 00 00 00 00 model_data_section_length
0x98 0x04 FF FF FF FF unknown
0x9C 0x04 FF FF FF FF unknown
0xA0 0x04 FF FF FF FF unknown
TOC
0xA4 0x01 01 entry_type 0x1=MainTree
0xA5 0x01 01 hierarchy_depth
0xA6 0x02 00 00 unknown
0xA8 0x04 00 00 00 00 entry_label_offset test
0xAC 0x04 00 00 00 00 entry_header_size
0xB0 0x04 00 00 00 28 entry_size
0xB4 0x04 00 00 00 01 children_number
0xB8 0x04 00 00 00 00 next_entry_offset
0xBC 0x04 00 00 00 00 previous_entry_offset
0xC0 0x04 00 00 00 00 parent_offset
0xC4 0x04 00 00 00 00 unknown
0xC8 0x04 00 00 00 00 unknown
0xCC 0x01 04 entry_type 0x4=ImageTree
0xCD 0x01 00 hierarchy_depth
0xCE 0x02 00 00 unknown
0xD0 0x04 FF FF FF FF entry_label_offset no label
0xD4 0x04 00 00 00 00 entry_header_size
0xD8 0x04 00 00 00 28 entry_size
0xDC 0x04 00 00 00 01 children_number
0xE0 0x04 00 00 00 00 next_entry_offset
0xE4 0x04 00 00 00 00 previous_entry_offset
0xE8 0x04 00 00 00 28 parent_offset
0xEC 0x04 00 00 00 00 unknown
0xF0 0x04 00 00 00 00 unknown
0xF4 0x01 04 entry_type 0x4=ImageTree
0xF5 0x01 01 hierarchy_depth
0xF6 0x02 00 00 unknown
0xF8 0x04 00 00 00 08 entry_label_offset image_test
0xFC 0x04 00 00 00 28 entry_header_size
0x100 0x04 00 00 00 00 entry_size
0x104 0x04 00 00 00 00 children_number
0x108 0x04 00 00 00 00 next_entry_offset
0x10C 0x04 00 00 00 00 previous_entry_offset
0x110 0x04 00 00 00 28 parent_offset
0x114 0x04 00 00 00 00 unknown
0x118 0x04 00 00 00 00 unknown
0x11C 0x02 00 05 file_format 0x5=GIM
0x11E 0x01 01 unknown
0x11F 0x01 00 file_compression 0x0=NONE
0x120 0x04 00 00 00 08 file_size
0x124 0x04 00 00 00 00 file_offset
0x128 0x04 00 00 00 01 unknown
pointers
0x12C 0x04 00 00 00 F4
0x130 0x04 00 00 00 00
texts
0x134 0x00 text table is empty
labels
0x134 0x05 74 65 73 74 00 test (null terminated)
0x139 0x03 00 00 00 padding (aligned to 4 bytes boundary)
0x13C 0x0B 69 6D 61 67 65 5F 74 65 73 74 00 image_test (null terminated)
0x147 0x01 00 padding (aligned to 4 bytes boundary)
events
0x148 0x00 events table is empty
images
0x148 0x8 0x8888888888888888 image_test.gim

When compiled (with zlib header compression) MD5: E73D8E195D7A344294AB84A03E6662A1

Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F

00000000  46 52 50 00 00 00 01 30 00 00 00 00 00 00 00 10  FRP....0........
00000010  00 00 00 A4 FF FF FF FF FF FF FF FF FF FF FF FF  ...¤ÿÿÿÿÿÿÿÿÿÿÿÿ
00000020  FF FF FF FF 00 00 00 CC FF FF FF FF FF FF FF FF  ÿÿÿÿ...Ìÿÿÿÿÿÿÿÿ
00000030  FF FF FF FF FF FF FF FF FF FF FF FF 00 00 00 00  ÿÿÿÿÿÿÿÿÿÿÿÿ....
00000040  00 00 01 34 00 00 00 14 00 00 01 48 00 00 00 00  ...4.......H....
00000050  FF FF FF FF 00 00 00 00 00 00 01 2C 00 00 00 08  ÿÿÿÿ.......,....
00000060  FF FF FF FF 00 00 00 00 FF FF FF FF 00 00 00 00  ÿÿÿÿ....ÿÿÿÿ....
00000070  FF FF FF FF 00 00 00 00 FF FF FF FF 00 00 00 00  ÿÿÿÿ....ÿÿÿÿ....
00000080  00 00 00 F4 00 00 00 08 FF FF FF FF 00 00 00 00  ...ô....ÿÿÿÿ....
00000090  FF FF FF FF 00 00 00 00 FF FF FF FF FF FF FF FF  ÿÿÿÿ....ÿÿÿÿÿÿÿÿ
000000A0  FF FF FF FF 00 00 00 44 00 00 00 A4 00 00 00 00  ÿÿÿÿ...D...¤....
000000B0  78 DA 75 8A C1 0A 00 10 10 44 6D 51 3E C5 5F C9  xÚuŠÁ....DmQ>Å_É
000000C0  61 93 83 13 9F EE CE 6E 53 28 79 35 ED CE 6B 88  a“ƒ.ŸîÎnS(y5íÎkˆ
000000D0  CC 4D 90 88 79 B1 92 29 7C 76 61 EF 60 3D DC C3  ÌM.ˆy±’)|vaï`=ÜÃ
000000E0  71 8E B0 03 5A 86 3E 9D 5B D7 5B 6A CA 1C D1 16  qŽ°.Z†>.[×[jÊ.Ñ.
000000F0  84 BD 0B BF 88 88 88 88 88 88 88 88              „½.¿ˆˆˆˆˆˆˆˆ
  • Changes
    • 10 the "compression header" setting with zlib (is not actually compressing the header, the term is not accurate)
    • FF FF FF FF weird
    • 00 00 00 F4 the offset where the image data starts, because the area before the image data has been compressed his position has been displaced
    • 00 00 00 44 00 00 00 A4 00 00 00 00 the info about the compressed area that comes next (composed by: lenPacked, lenUnpacked, and lenLongestText)
    • 78 DA ... the compressed area itself, includes the whole TOC, the pointers to the TOC, and all the strings tables (languages, labels, and events)

ImageTree with 2 images

This example is intended to replace the previous one (but by now i dont want to delete the previous one). It can help to see how the offsets are cummulated and the optional paddings to align to boundary The .xml below is the RCOXML source file used to create the .rco. The file image2_test.gim is a dummy of 2 bytes filed with 2222 and the file image3_test.gim is a dummy of 3 bytes filed with 333333

Code Sample

When compiled MD5: 4E69E7E88F0872C71D007A21478FA1D1

Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F

00000000  46 52 50 00 00 00 01 30 00 00 00 00 00 00 00 00  FRP....0........
00000010  00 00 00 A4 FF FF FF FF FF FF FF FF FF FF FF FF  ...¤ÿÿÿÿÿÿÿÿÿÿÿÿ
00000020  FF FF FF FF 00 00 00 CC FF FF FF FF FF FF FF FF  ÿÿÿÿ...Ìÿÿÿÿÿÿÿÿ
00000030  FF FF FF FF FF FF FF FF 00 00 01 70 00 00 00 00  ÿÿÿÿÿÿÿÿ...p....
00000040  00 00 01 70 00 00 00 20 00 00 01 90 00 00 00 00  ...p... ........
00000050  FF FF FF FF 00 00 00 00 00 00 01 68 00 00 00 08  ÿÿÿÿ.......h....
00000060  FF FF FF FF 00 00 00 00 FF FF FF FF 00 00 00 00  ÿÿÿÿ....ÿÿÿÿ....
00000070  FF FF FF FF 00 00 00 00 FF FF FF FF 00 00 00 00  ÿÿÿÿ....ÿÿÿÿ....
00000080  00 00 01 90 00 00 00 14 FF FF FF FF 00 00 00 00  ........ÿÿÿÿ....
00000090  FF FF FF FF 00 00 00 00 FF FF FF FF FF FF FF FF  ÿÿÿÿ....ÿÿÿÿÿÿÿÿ
000000A0  FF FF FF FF 01 01 00 00 00 00 00 00 00 00 00 00  ÿÿÿÿ............
000000B0  00 00 00 28 00 00 00 01 00 00 00 00 00 00 00 00  ...(............
000000C0  00 00 00 00 00 00 00 00 00 00 00 00 04 00 00 00  ................
000000D0  FF FF FF FF 00 00 00 00 00 00 00 28 00 00 00 02  ÿÿÿÿ.......(....
000000E0  00 00 00 00 00 00 00 00 00 00 00 28 00 00 00 00  ...........(....
000000F0  00 00 00 00 04 01 00 00 00 00 00 08 00 00 00 28  ...............(
00000100  00 00 00 00 00 00 00 00 00 00 00 38 00 00 00 00  ...........8....
00000110  00 00 00 28 00 00 00 00 00 00 00 00 00 05 01 00  ...(............
00000120  00 00 00 02 00 00 00 00 00 00 00 01 04 01 00 00  ................
00000130  00 00 00 14 00 00 00 28 00 00 00 00 00 00 00 00  .......(........
00000140  00 00 00 00 00 00 00 38 00 00 00 60 00 00 00 00  .......8...`....
00000150  00 00 00 00 00 05 00 01 00 00 00 0E 00 00 00 04  ................
00000160  00 00 00 01 00 00 00 03 00 00 00 F4 00 00 01 2C  ...........ô...,
00000170  74 65 73 74 00 00 00 00 69 6D 61 67 65 32 5F 74  test....image2_t
00000180  65 73 74 00 69 6D 61 67 65 33 5F 74 65 73 74 00  est.image3_test.
00000190  22 22 00 00 78 DA 01 03 00 FC FF 33 33 33 01 35  ""..xÚ...üÿ333.5
000001A0  00 9A 00 00                                      .š..
Areas Offset Length Example Name Notes
Header
0x00 0x04 FRP magic FRP in big endian
0x04 0x04 00 00 01 30 version 0x130 = one of the firmwares for PS3
0x08 0x04 00 00 00 00 unknown
0x0C 0x04 00 00 00 00 compress_header 0x00 = uncompressed
0x10 0x04 00 00 00 A4 toc_maintree_absolute_offset MainTree at absolute offset 0xA4
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 00 00 00 CC toc_imagetree_absolute_offset ImageTree at absolute offset 0xCC
0x28 0x04 FF FF FF FF toc_unknowntree_absolute_offset
0x2C 0x04 FF FF FF FF toc_fonttree_absolute_offset
0x30 0x04 FF FF FF FF toc_objecttree_absolute_offset
0x34 0x04 FF FF FF FF toc_animationtree_absolute_offset
0x38 0x04 00 00 01 70 strings_texts_absolute_offset strings texts table at absolute offset 0x170
0x3C 0x04 00 00 00 00 strings_texts_length strings texts table is empty
0x40 0x04 00 00 01 70 strings_labels_absolute_offset strings labels table at absolute offset 0x170
0x44 0x04 00 00 00 20 strings_labels_length strings labels size 0x20
0x48 0x04 00 00 01 90 strings_events_absolute_offset strings events table at absolute offset 0x190
0x4C 0x04 00 00 00 00 strings_events_length strings events table is empty
0x50 0x04 FF FF FF FF text_pointer_table_offset
0x54 0x04 00 00 00 00 text_pointer_table_length
0x58 0x04 00 00 01 68 image_pointer_table_offset
0x5C 0x04 00 00 00 08 image_pointer_table_length
0x60 0x04 FF FF FF FF model_pointer_table_offset
0x64 0x04 00 00 00 00 model_pointer_table_length
0x68 0x04 FF FF FF FF sound_pointer_table_offset
0x6C 0x04 00 00 00 00 sound_pointer_table_length
0x70 0x04 FF FF FF FF object_pointer_table_offset
0x74 0x04 00 00 00 00 object_pointer_table_length
0x78 0x04 FF FF FF FF anim_pointer_table_offset
0x7C 0x04 00 00 00 00 anim_pointer_table_length
0x80 0x04 00 00 01 90 image_data_section_offset
0x84 0x04 00 00 00 14 image_data_section_length
0x88 0x04 FF FF FF FF sound_data_section_offset
0x8C 0x04 00 00 00 00 sound_data_section_length
0x90 0x04 FF FF FF FF model_data_section_offset
0x94 0x04 00 00 00 00 model_data_section_length
0x98 0x04 FF FF FF FF unknown
0x9C 0x04 FF FF FF FF unknown
0xA0 0x04 FF FF FF FF unknown
TOC
0xA4 0x01 01 entry_type 0x1=MainTree
0xA5 0x01 01 hierarchy_depth
0xA6 0x02 00 00 unknown
0xA8 0x04 00 00 00 00 entry_label_offset test
0xAC 0x04 00 00 00 00 entry_header_size
0xB0 0x04 00 00 00 28 entry_size
0xB4 0x04 00 00 00 01 children_number
0xB8 0x04 00 00 00 00 next_entry_offset
0xBC 0x04 00 00 00 00 previous_entry_offset
0xC0 0x04 00 00 00 00 parent_offset
0xC4 0x04 00 00 00 00 unknown
0xC8 0x04 00 00 00 00 unknown
0xCC 0x01 04 entry_type 0x4=ImageTree
0xCD 0x01 00 hierarchy_depth
0xCE 0x02 00 00 unknown
0xD0 0x04 FF FF FF FF entry_label_offset no label
0xD4 0x04 00 00 00 00 entry_header_size
0xD8 0x04 00 00 00 28 entry_size
0xDC 0x04 00 00 00 02 children_number
0xE0 0x04 00 00 00 00 next_entry_offset
0xE4 0x04 00 00 00 00 previous_entry_offset
0xE8 0x04 00 00 00 28 parent_offset
0xEC 0x04 00 00 00 00 unknown
0xF0 0x04 00 00 00 00 unknown
0xF4 0x01 04 entry_type 0x4=ImageTree
0xF5 0x01 01 hierarchy_depth
0xF6 0x02 00 00 unknown
0xF8 0x04 00 00 00 08 entry_label_offset image2_test
0xFC 0x04 00 00 00 28 entry_header_size
0x100 0x04 00 00 00 00 entry_size
0x104 0x04 00 00 00 00 children_number
0x108 0x04 00 00 00 38 next_entry_offset
0x10C 0x04 00 00 00 00 previous_entry_offset
0x110 0x04 00 00 00 28 parent_offset
0x114 0x04 00 00 00 00 unknown
0x118 0x04 00 00 00 00 unknown
0x11C 0x02 00 05 file_format 0x5=GIM
0x11E 0x01 01 unknown
0x11F 0x01 00 file_compression 0x0=NONE
0x120 0x04 00 00 00 02 file_size
0x124 0x04 00 00 00 00 file_offset
0x128 0x04 00 00 00 01 unknown
0x12C 0x01 04 entry_type 0x4=ImageTree
0x12D 0x01 01 hierarchy_depth
0x12E 0x02 00 00 unknown
0x130 0x04 00 00 00 14 entry_label_offset image3_test
0x134 0x04 00 00 00 28 entry_header_size
0x138 0x04 00 00 00 00 entry_size
0x13C 0x04 00 00 00 00 children_number
0x140 0x04 00 00 00 00 next_entry_offset
0x144 0x04 00 00 00 38 previous_entry_offset
0x148 0x04 00 00 00 60 parent_offset
0x14C 0x04 00 00 00 00 unknown
0x150 0x04 00 00 00 00 unknown
0x154 0x02 00 05 file_format 0x5=GIM
0x156 0x01 00 unknown
0x157 0x01 01 file_compression 0x1=ZLIB
0x158 0x04 00 00 00 0E file_size
0x15C 0x04 00 00 00 04 file_offset
0x160 0x04 00 00 00 01 unknown
0x164 0x04 00 00 00 03 file_uncompressed_size
pointers
0x168 0x04 00 00 00 F4
0x16C 0x04 00 00 01 2C
texts
0x170 0x00 text table is empty
labels
0x170 0x05 74 65 73 74 00 test (null terminated)
0x175 0x03 00 00 00 padding (aligned to 4 bytes boundary)
0x178 0x0C 69 6D 61 67 65 32 5F 74 65 73 74 00 image2_test (null terminated)
0x184 0x0C 69 6D 61 67 65 33 5F 74 65 73 74 00 image3_test (null terminated)
events
0x190 0x00 events table is empty
images
0x190 0x02 22 22 image2_test.gim
0x192 0x02 00 00 padding (aligned to 4 bytes boundary)
0x194 0x0E 78 DA 01 03 00 FC FF 33 33 33 01 35 00 9A image3_test.gim (zlib compressed)
0x1A2 0x02 00 00 padding (aligned to 4 bytes boundary)

ObjectTree with 1 page and 1 plane

This is a basic example of how objecttree and animationtree (not files) stores his values inside the container. It can help to understand all the values related with the hierarchy relationship between parents/childrens/brothers, etc...

The same structure (almost exactly) is used by xai_plugin.rco from any PS3 firmware version (1.00 up to 3.55 or so)... so this example will be converted to an official one

Code Sample

When compiled MD5: 8950DE68C7DD9BA5DD96F7F29D86EF17

Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F

00000000  46 52 50 00 00 00 01 30 00 00 00 00 00 00 00 00  FRP....0........
00000010  00 00 00 A4 FF FF FF FF FF FF FF FF FF FF FF FF  ...¤ÿÿÿÿÿÿÿÿÿÿÿÿ
00000020  FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00000030  00 00 00 CC FF FF FF FF 00 00 01 D4 00 00 00 00  ...Ìÿÿÿÿ...Ô....
00000040  00 00 01 D4 00 00 00 20 00 00 01 F4 00 00 00 04  ...Ô... ...ô....
00000050  FF FF FF FF 00 00 00 00 FF FF FF FF 00 00 00 00  ÿÿÿÿ....ÿÿÿÿ....
00000060  FF FF FF FF 00 00 00 00 FF FF FF FF 00 00 00 00  ÿÿÿÿ....ÿÿÿÿ....
00000070  00 00 01 CC 00 00 00 08 FF FF FF FF 00 00 00 00  ...Ì....ÿÿÿÿ....
00000080  FF FF FF FF 00 00 00 00 FF FF FF FF 00 00 00 00  ÿÿÿÿ....ÿÿÿÿ....
00000090  FF FF FF FF 00 00 00 00 FF FF FF FF FF FF FF FF  ÿÿÿÿ....ÿÿÿÿÿÿÿÿ
000000A0  FF FF FF FF 01 01 00 00 00 00 00 00 00 00 00 00  ÿÿÿÿ............
000000B0  00 00 00 28 00 00 00 01 00 00 00 00 00 00 00 00  ...(............
000000C0  00 00 00 00 00 00 00 00 00 00 00 00 08 00 00 00  ................
000000D0  FF FF FF FF 00 00 00 00 00 00 00 28 00 00 00 01  ÿÿÿÿ.......(....
000000E0  00 00 00 00 00 00 00 00 00 00 00 28 00 00 00 00  ...........(....
000000F0  00 00 00 00 08 01 00 00 00 00 00 08 00 00 00 28  ...............(
00000100  00 00 00 4C 00 00 00 01 00 00 00 00 00 00 00 00  ...L............
00000110  00 00 00 28 00 00 00 00 00 00 00 00 11 01 00 00  ...(............
00000120  FF FF 00 00 FF FF FF FF FF FF 00 00 FF FF FF FF  ÿÿ..ÿÿÿÿÿÿ..ÿÿÿÿ
00000130  FF FF 00 00 FF FF FF FF FF FF 00 00 FF FF FF FF  ÿÿ..ÿÿÿÿÿÿ..ÿÿÿÿ
00000140  08 02 00 00 00 00 00 14 00 00 00 28 00 00 00 00  ...........(....
00000150  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 4C  ...............L
00000160  00 00 00 00 00 00 00 00 3F 80 00 00 40 00 00 00  ........?€..@...
00000170  40 40 00 00 40 80 00 00 40 A0 00 00 40 C0 00 00  @@..@€..@ ..@À..
00000180  40 E0 00 00 41 00 00 00 41 10 00 00 41 20 00 00  @à..A...A...A ..
00000190  41 30 00 00 41 40 00 00 41 50 00 00 00 00 00 03  [email protected]......
000001A0  FF FF 00 00 FF FF FF FF 10 00 00 00 20 00 00 00  ÿÿ..ÿÿÿÿ.... ...
000001B0  30 00 00 00 40 00 00 00 50 00 00 00 60 00 00 00  [email protected]...`...
000001C0  FF FF 00 00 FF FF FF FF 00 00 00 06 00 00 00 F4  ÿÿ..ÿÿÿÿ.......ô
000001D0  00 00 01 40 74 65 73 74 00 00 00 00 70 61 67 65  [email protected]
000001E0  5F 74 65 73 74 00 00 00 70 6C 61 6E 65 5F 74 65  _test...plane_te
000001F0  73 74 00 00 00 00 00 00                          st......
Areas Offset Length Example Name Notes
Header
0x00 0x04 46 52 50 00 signature FRP in big endian
0x04 0x04 00 00 01 30 version 0x130 = one of the firmwares for PS3
0x08 0x04 00 00 00 00 unknown
0x0C 0x04 00 00 00 00 compress_toc_ptr_str 0x00 = uncompressed
0x10 0x04 00 00 00 A4 toc_maintree_absolute_offset MainTree at 0xA4
0x14 0x04 FF FF FF FF toc_scripttree_absolute_offset no
0x18 0x04 FF FF FF FF toc_languagetree_absolute_offset no
0x1C 0x04 FF FF FF FF toc_soundtree_absolute_offset no
0x20 0x04 FF FF FF FF toc_modeltree_absolute_offset no
0x24 0x04 FF FF FF FF toc_imagetree_absolute_offset no
0x28 0x04 FF FF FF FF toc_unknown no
0x2C 0x04 FF FF FF FF toc_fonttree_absolute_offset no
0x30 0x04 00 00 00 CC toc_objecttree_absolute_offset ObjectTree at 0xCC
0x34 0x04 FF FF FF FF toc_animationtree_absolute_offset no
0x38 0x04 00 00 01 D4 str_language_table_absolute_offset languages at 0x1D4
0x3C 0x04 00 00 00 00 str_language_table_length empty
0x40 0x04 00 00 01 D4 str_label_table_absolute_offset labels at 0x1D4
0x44 0x04 00 00 00 20 str_label_table_length length 0x20
0x48 0x04 00 00 01 F4 str_event_table_absolute_offset events at 0x1F4
0x4C 0x04 00 00 00 04 str_event_table_length length 0x4
0x50 0x04 FF FF FF FF ptr_language_table_absolute_offset no
0x54 0x04 00 00 00 00 ptr_language_table_length empty
0x58 0x04 FF FF FF FF ptr_image_table_absolute_offset no
0x5C 0x04 00 00 00 00 ptr_image_table_length empty
0x60 0x04 FF FF FF FF ptr_model_table_absolute_offset no
0x64 0x04 00 00 00 00 ptr_model_table_length empty
0x68 0x04 FF FF FF FF ptr_sound_table_absolute_offset no
0x6C 0x04 00 00 00 00 ptr_sound_table_length empty
0x70 0x04 00 00 01 CC ptr_object_table_absolute_offset object pointers at 0x1CC
0x74 0x04 00 00 00 08 ptr_object_table_length size 0x8
0x78 0x04 FF FF FF FF ptr_animation_table_absolute_offset no
0x7C 0x04 00 00 00 00 ptr_animation_table_length empty
0x80 0x04 FF FF FF FF dat_image_table_absolute_offset no
0x84 0x04 00 00 00 00 dat_image_table_length empty
0x88 0x04 FF FF FF FF dat_sound_table_absolute_offset no
0x8C 0x04 00 00 00 00 dat_sound_table_length empty
0x90 0x04 FF FF FF FF dat_model_table_absolute_offset no
0x94 0x04 00 00 00 00 dat_model_table_length empty
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
0xA4 0x01 01 entry_type 0x1=MainTree
0xA5 0x01 01 hierarchy_depth
0xA6 0x02 00 00 unknown
0xA8 0x04 00 00 00 00 entry_label_offset test
0xAC 0x04 00 00 00 00 entry_header_size
0xB0 0x04 00 00 00 28 entry_size
0xB4 0x04 00 00 00 01 children_number
0xB8 0x04 00 00 00 00 next_entry_offset
0xBC 0x04 00 00 00 00 previous_entry_offset
0xC0 0x04 00 00 00 00 parent_offset no parent
0xC4 0x04 00 00 00 00 unknown
0xC8 0x04 00 00 00 00 unknown
0xCC 0x01 08 entry_type 0x8=ObjectTree
0xCD 0x01 00 hierarchy_depth 0x0=Root
0xCE 0x02 00 00 unknown
0xD0 0x04 FF FF FF FF entry_label_offset no label
0xD4 0x04 00 00 00 00 entry_header_size
0xD8 0x04 00 00 00 28 entry_size
0xDC 0x04 00 00 00 01 children_number
0xE0 0x04 00 00 00 00 next_entry_offset
0xE4 0x04 00 00 00 00 previous_entry_offset
0xE8 0x04 00 00 00 28 parent_offset 0xCC-0x28 = parent is at 0xA4 (MainTree)
0xEC 0x04 00 00 00 00 unknown
0xF0 0x04 00 00 00 00 unknown
0xF4 0x01 08 entry_type 0x8=ObjectTree
0xF5 0x01 01 hierarchy_depth 0x1=Page
0xF6 0x02 00 00 unknown
0xF8 0x04 00 00 00 08 entry_label_offset page_test
0xFC 0x04 00 00 00 28 entry_header_size
0x100 0x04 00 00 00 4C entry_size
0x104 0x04 00 00 00 01 children_number
0x108 0x04 00 00 00 00 next_entry_offset
0x10C 0x04 00 00 00 00 previous_entry_offset
0x110 0x04 00 00 00 28 parent_offset 0xF4-0x28 = parent is at 0xCC (ObjectTree)
0x114 0x04 00 00 00 00 unknown
0x118 0x04 00 00 00 00 unknown
0x11C 0x04 11 01 00 00 pageMode
0x120 0x08 FF FF 00 00 FF FF FF FF pageOnInit ?
0x128 0x08 FF FF 00 00 FF FF FF FF pageOnCancel ?
0x130 0x08 FF FF 00 00 FF FF FF FF pageOnContext ?
0x138 0x08 FF FF 00 00 FF FF FF FF pageOnActivate ?
0x140 0x01 08 entry_type 0x8=ObjectTree
0x141 0x01 02 hierarchy_depth 0x2=Plane
0x142 0x02 00 00 unknown
0x144 0x04 00 00 00 14 entry_label_offset plane_test
0x148 0x04 00 00 00 28 entry_header_size
0x14C 0x04 00 00 00 00 entry_size
0x150 0x04 00 00 00 00 children_number
0x154 0x04 00 00 00 00 next_entry_offset
0x158 0x04 00 00 00 00 previous_entry_offset
0x15C 0x04 00 00 00 4C parent_offset 0x140-0x4C = parent is at 0xF4 (Page)
0x160 0x04 00 00 00 00 unknown
0x164 0x04 00 00 00 00 unknown
0x168 0x04 3F 80 00 00 PositionX 1 after converted from float to decimal
0x16C 0x04 40 00 00 00 PositionY 2
0x170 0x04 40 40 00 00 PositionZ 3
0x174 0x04 40 80 00 00 ColorScaleR 4
0x178 0x04 40 A0 00 00 ColorScaleG 5
0x17C 0x04 40 C0 00 00 ColorScaleB 6
0x180 0x04 40 E0 00 00 ColorScaleA 7
0x184 0x04 41 00 00 00 SizeX 8
0x188 0x04 41 10 00 00 SizeY 9
0x18C 0x04 41 20 00 00 SizeZ 10
0x190 0x04 41 30 00 00 SizeScaleX 11
0x194 0x04 41 40 00 00 SizeScaleY 12
0x198 0x04 41 50 00 00 SizeScaleZ 13
0x19C 0x04 00 00 00 03 AnchorMode 0x3
0x1A0 0x08 FF FF 00 00 FF FF FF FF OnInit ?
0x1A8 0x04 10 00 00 00 PositionOverrideX 10
0x1AC 0x04 20 00 00 00 PositionOverrideY 20
0x1B0 0x04 30 00 00 00 PositionOverrideZ 30
0x1B4 0x04 40 00 00 00 SizeOverrideX 40
0x1B8 0x04 50 00 00 00 SizeOverrideY 50
0x1BC 0x04 60 00 00 00 SizeOverrideZ 60
0x1C0 0x04 FF FF 00 00 FF FF FF FF planeImage ?
0x1C8 0x04 00 00 00 06 planeResizeMode 0x6
object
pointers
0x1CC 0x04 00 00 00 F4 First object (Page) at 0xF4
0x1D0 0x04 00 00 01 40 Second object (Plane) at 0x140
languages
0x1D4 0x00 empty
labels
0x1D4 0x05 74 65 73 74 00 test (null terminated)
0x1D9 0x03 00 00 00 padding (aligned to 4 bytes boundary)
0x1DC 0x0A 70 61 67 65 5F 74 65 73 74 00 page_test (null terminated)
0x1E6 0x02 00 00 padding (aligned to 4 bytes boundary)
0x1E8 0x0B 70 6C 61 6E 65 5F 74 65 73 74 00 plane_test (null terminated)
0x1F3 0x01 00 padding (aligned to 4 bytes boundary)
events
0x1F4 0x04 00 00 00 00 dummy event ?

When compiled (with zlib header compression) MD5: E83B073FD14180A635A63D202EFBFBA3

Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F

00000000  46 52 50 00 00 00 01 30 00 00 00 00 00 00 00 10  FRP....0........
00000010  00 00 00 A4 FF FF FF FF FF FF FF FF FF FF FF FF  ...¤ÿÿÿÿÿÿÿÿÿÿÿÿ
00000020  FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00000030  00 00 00 CC FF FF FF FF FF FF FF FF 00 00 00 00  ...Ìÿÿÿÿÿÿÿÿ....
00000040  00 00 01 D4 00 00 00 20 00 00 01 F4 00 00 00 04  ...Ô... ...ô....
00000050  FF FF FF FF 00 00 00 00 FF FF FF FF 00 00 00 00  ÿÿÿÿ....ÿÿÿÿ....
00000060  FF FF FF FF 00 00 00 00 FF FF FF FF 00 00 00 00  ÿÿÿÿ....ÿÿÿÿ....
00000070  00 00 01 CC 00 00 00 08 FF FF FF FF 00 00 00 00  ...Ì....ÿÿÿÿ....
00000080  FF FF FF FF 00 00 00 00 FF FF FF FF 00 00 00 00  ÿÿÿÿ....ÿÿÿÿ....
00000090  FF FF FF FF 00 00 00 00 FF FF FF FF FF FF FF FF  ÿÿÿÿ....ÿÿÿÿÿÿÿÿ
000000A0  FF FF FF FF 00 00 00 8B 00 00 01 54 00 00 00 00  ÿÿÿÿ...‹...T....
000000B0  78 DA 75 CD 31 0A 83 30 14 87 F1 FF 6B A1 38 B6  xÚuÍ1.ƒ0.‡ñÿk¡8¶
000000C0  D0 03 38 66 F4 06 7D DD 1D BC 41 EB 20 5D 8A 08  Ð.8fô.}Ý.¼Aë ]Š.
000000D0  7A 00 8F D2 A3 F4 28 3D 84 BB 7E 83 86 82 E4 83  z..Ò£ô(=„»~ƒ†‚äƒ
000000E0  1F 49 C8 23 31 D3 7F 01 86 5D 19 66 4A CC 85 38  .IÈ#1Ó..†].fJÌ…8
000000F0  67 71 3C A0 4C CD 5D 4C BC 07 4A AD D9 41 A2 2B  gq< LÍ]L¼.J­ÙA¢+
00000100  82 F6 95 5A BB 8D 92 0B 8E 11 1F 7C F1 93 EE C2  ‚ö•Z».’.Ž..|ñ“îÂ
00000110  19 39 0A 38 2A 89 8E DB 3F 5C 2B 47 01 47 85 27  .9.8*‰ŽÛ?\+G.G…'
00000120  B6 7B B6 27 4C 92 F9 D0 F4 83 A8 AB 5F CD 63 3D  ¶{¶'L’ùÐôƒ¨«_Íc=
00000130  74 EF BA 8D 07 5A 00 16 DA 3D 9D 00              tïº..Z..Ú=..
  • Changes
    • 10 the "compression header" setting with zlib (is not actually compressing the header, the term is not accurate)
    • FF FF FF FF weird
    • 00 00 00 8B 00 00 01 54 00 00 00 00 the info about the compressed area that comes next (composed by: lenPacked, lenUnpacked, and lenLongestText)
    • 78 DA ... the compressed area itself, includes the whole TOC, the pointers to the TOC, and all the strings tables (languages, labels, and events)

Examples (official)

This ones should be considered "perfect" rco structures, even if there is a weird detail (initially a nonsense, a sony bug, or details not managed correctlly by rcomage)... it needs to be considered a "specification" of that rco version. See also Talk:Rcomage

PS3 1.02 xai_plugin.rco

Code Sample
MD5: F3835BBD0E2448EB6AD5C3FA02906346


Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F

00000000  46 52 50 00 00 00 00 97 00 00 00 00 00 00 00 00  FRP....—........
00000010  00 00 00 A4 FF FF FF FF FF FF FF FF FF FF FF FF  ...¤ÿÿÿÿÿÿÿÿÿÿÿÿ
00000020  FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00000030  00 00 00 CC FF FF FF FF 00 00 01 D4 00 00 00 00  ...Ìÿÿÿÿ...Ô....
00000040  00 00 01 D4 00 00 00 1C 00 00 01 F0 00 00 00 04  ...Ô.......ð....
00000050  FF FF FF FF 00 00 00 00 FF FF FF FF 00 00 00 00  ÿÿÿÿ....ÿÿÿÿ....
00000060  FF FF FF FF 00 00 00 00 FF FF FF FF 00 00 00 00  ÿÿÿÿ....ÿÿÿÿ....
00000070  00 00 01 CC 00 00 00 08 FF FF FF FF 00 00 00 00  ...Ì....ÿÿÿÿ....
00000080  FF FF FF FF 00 00 00 00 FF FF FF FF 00 00 00 00  ÿÿÿÿ....ÿÿÿÿ....
00000090  FF FF FF FF 00 00 00 00 FF FF FF FF FF FF FF FF  ÿÿÿÿ....ÿÿÿÿÿÿÿÿ
000000A0  FF FF FF FF 01 01 00 00 00 00 00 00 00 00 00 00  ÿÿÿÿ............
000000B0  00 00 00 28 00 00 00 01 00 00 00 00 00 00 00 00  ...(............
000000C0  00 00 00 00 00 00 00 00 00 00 00 00 08 00 00 00  ................
000000D0  FF FF FF FF 00 00 00 00 00 00 00 28 00 00 00 01  ÿÿÿÿ.......(....
000000E0  00 00 00 00 00 00 00 00 00 00 00 28 00 00 00 00  ...........(....
000000F0  00 00 00 00 08 01 00 00 00 00 00 08 00 00 00 28  ...............(
00000100  00 00 00 4C 00 00 00 01 00 00 00 00 00 00 00 00  ...L............
00000110  00 00 00 28 00 00 00 00 00 00 00 00 01 11 00 00  ...(............
00000120  FF FF 00 00 FF FF FF FF FF FF 00 00 FF FF FF FF  ÿÿ..ÿÿÿÿÿÿ..ÿÿÿÿ
00000130  FF FF 00 00 FF FF FF FF FF FF 00 00 FF FF FF FF  ÿÿ..ÿÿÿÿÿÿ..ÿÿÿÿ
00000140  08 02 00 00 00 00 00 10 00 00 00 28 00 00 00 00  ...........(....
00000150  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 4C  ...............L
00000160  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00000170  00 00 00 00 3F 80 00 00 3F 80 00 00 3F 80 00 00  ....?€..?€..?€..
00000180  3F 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ?€..............
00000190  3F 80 00 00 3F 80 00 00 3F 80 00 00 00 00 00 00  ?€..?€..?€......
000001A0  FF FF 00 00 FF FF FF FF 00 00 00 00 00 00 00 00  ÿÿ..ÿÿÿÿ........
000001B0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
000001C0  FF FF 00 00 FF FF FF FF 00 00 00 00 00 00 00 F4  ÿÿ..ÿÿÿÿ.......ô
000001D0  00 00 01 40 73 61 6D 70 6C 65 00 00 72 6F 6F 74  [email protected]
000001E0  00 00 00 00 61 70 70 6C 69 63 61 74 69 6F 6E 00  ....application.
000001F0  00 00 00 00                                      ....
Areas Offset Length Example Name Notes
HDR
0x00 0x04 46 52 50 00 signature FRP in big endian
0x04 0x04 00 00 00 97 version 0x97 = one of the firmwares for PS3
0x08 0x04 00 00 00 00 hdr_unknown
0x0C 0x04 00 00 00 00 compress_toc_ptr_str_tables 0x00 = uncompressed
0x10 0x04 00 00 00 A4 toc_maintree_absolute_offset MainTree at 0xA4
0x14 0x04 FF FF FF FF toc_scripttree_absolute_offset no
0x18 0x04 FF FF FF FF toc_languagetree_absolute_offset no
0x1C 0x04 FF FF FF FF toc_soundtree_absolute_offset no
0x20 0x04 FF FF FF FF toc_modeltree_absolute_offset no
0x24 0x04 FF FF FF FF toc_imagetree_absolute_offset no
0x28 0x04 FF FF FF FF toc_unknown no
0x2C 0x04 FF FF FF FF toc_fonttree_absolute_offset no
0x30 0x04 00 00 00 CC toc_objecttree_absolute_offset ObjectTree at 0xCC
0x34 0x04 FF FF FF FF toc_animationtree_absolute_offset no
0x38 0x04 00 00 01 D4 str_language_table_absolute_offset languages at 0x1D4
0x3C 0x04 00 00 00 00 str_language_table_length empty
0x40 0x04 00 00 01 D4 str_label_table_absolute_offset labels at 0x1D4
0x44 0x04 00 00 00 1C str_label_table_length length 0x1C
0x48 0x04 00 00 01 F0 str_event_table_absolute_offset events at 0x1F0
0x4C 0x04 00 00 00 04 str_event_table_length length 0x4
0x50 0x04 FF FF FF FF ptr_language_table_absolute_offset no
0x54 0x04 00 00 00 00 ptr_language_table_length empty
0x58 0x04 FF FF FF FF ptr_image_table_absolute_offset no
0x5C 0x04 00 00 00 00 ptr_image_table_length empty
0x60 0x04 FF FF FF FF ptr_model_table_absolute_offset no
0x64 0x04 00 00 00 00 ptr_model_table_length empty
0x68 0x04 FF FF FF FF ptr_sound_table_absolute_offset no
0x6C 0x04 00 00 00 00 ptr_sound_table_length empty
0x70 0x04 00 00 01 CC ptr_object_table_absolute_offset object pointers at 0x1CC
0x74 0x04 00 00 00 08 ptr_object_table_length size 0x8
0x78 0x04 FF FF FF FF ptr_animation_table_absolute_offset no
0x7C 0x04 00 00 00 00 ptr_animation_table_length empty
0x80 0x04 FF FF FF FF dat_image_table_absolute_offset no
0x84 0x04 00 00 00 00 dat_image_table_length empty
0x88 0x04 FF FF FF FF dat_sound_table_absolute_offset no
0x8C 0x04 00 00 00 00 dat_sound_table_length empty
0x90 0x04 FF FF FF FF dat_model_table_absolute_offset no
0x94 0x04 00 00 00 00 dat_model_table_length empty
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
0xA4 0x04 01 01 00 00 entry_type MainTree
0xA8 0x04 00 00 00 00 entry_label_offset sample
0xAC 0x04 00 00 00 00 entry_header_size
0xB0 0x04 00 00 00 28 entry_size
0xB4 0x04 00 00 00 01 children_number
0xB8 0x04 00 00 00 00 next_entry_offset
0xBC 0x04 00 00 00 00 previous_entry_offset
0xC0 0x04 00 00 00 00 parent_offset no parent
0xC4 0x04 00 00 00 00 toc_entry_unknown_1
0xC8 0x04 00 00 00 00 toc_entry_unknown_2
0xCC 0x04 08 00 00 00 entry_type ObjectTree
0xD0 0x04 FF FF FF FF entry_label_offset no label
0xD4 0x04 00 00 00 00 entry_header_size
0xD8 0x04 00 00 00 28 entry_size
0xDC 0x04 00 00 00 01 children_number
0xE0 0x04 00 00 00 00 next_entry_offset
0xE4 0x04 00 00 00 00 previous_entry_offset
0xE8 0x04 00 00 00 28 parent_offset 0xCC-0x28 = parent is at 0xA4 (MainTree)
0xEC 0x04 00 00 00 00 toc_entry_unknown_1
0xF0 0x04 00 00 00 00 toc_entry_unknown_2
0xF4 0x01 08 01 00 00 entry_type Page
0xF8 0x04 00 00 00 08 entry_label_offset root
0xFC 0x04 00 00 00 28 entry_header_size
0x100 0x04 00 00 00 4C entry_size
0x104 0x04 00 00 00 01 children_number
0x108 0x04 00 00 00 00 next_entry_offset
0x10C 0x04 00 00 00 00 previous_entry_offset
0x110 0x04 00 00 00 28 parent_offset 0xF4-0x28 = parent is at 0xCC (ObjectTree)
0x114 0x04 00 00 00 00 toc_entry_unknown_1
0x118 0x04 00 00 00 00 toc_entry_unknown_2
0x11C 0x04 01 11 00 00 pageMode
0x120 0x08 FF FF 00 00 FF FF FF FF pageOnInit nothing
0x128 0x08 FF FF 00 00 FF FF FF FF pageOnCancel nothing
0x130 0x08 FF FF 00 00 FF FF FF FF pageOnContext nothing
0x138 0x08 FF FF 00 00 FF FF FF FF pageOnActivate nothing
0x140 0x04 08 02 00 00 entry_type Plane
0x144 0x04 00 00 00 10 entry_label_offset application
0x148 0x04 00 00 00 28 entry_header_size
0x14C 0x04 00 00 00 00 entry_size
0x150 0x04 00 00 00 00 children_number
0x154 0x04 00 00 00 00 next_entry_offset
0x158 0x04 00 00 00 00 previous_entry_offset
0x15C 0x04 00 00 00 4C parent_offset 0x140-0x4C = parent is at 0xF4 (Page)
0x160 0x04 00 00 00 00 toc_entry_unknown_1
0x164 0x04 00 00 00 00 toc_entry_unknown_2
0x168 0x04 00 00 00 00 positionX 0
0x16C 0x04 00 00 00 00 positionY 0
0x170 0x04 00 00 00 00 positionZ 0
0x174 0x04 3F 80 00 00 colorScaleR 1
0x178 0x04 3F 80 00 00 colorScaleG 1
0x17C 0x04 3F 80 00 00 colorScaleB 1
0x180 0x04 3F 80 00 00 colorScaleA 1
0x184 0x04 00 00 00 00 sizeX 0
0x188 0x04 00 00 00 00 sizeY 0
0x18C 0x04 00 00 00 00 sizeZ 0
0x190 0x04 3F 80 00 00 sizeScaleX 1
0x194 0x04 3F 80 00 00 sizeScaleY 1
0x198 0x04 3F 80 00 00 sizeScaleZ 1
0x19C 0x04 00 00 00 00 anchorMode 0x0 (center)
0x1A0 0x08 FF FF 00 00 FF FF FF FF onInit nothing
0x1A8 0x04 00 00 00 00 positionOverrideX no
0x1AC 0x04 00 00 00 00 positionOverrideY no
0x1B0 0x04 00 00 00 00 positionOverrideZ no
0x1B4 0x04 00 00 00 00 sizeOverrideX no
0x1B8 0x04 00 00 00 00 sizeOverrideY no
0x1BC 0x04 00 00 00 00 sizeOverrideZ no
0x1C0 0x04 FF FF 00 00 FF FF FF FF planeImage nothing
0x1C8 0x04 00 00 00 00 planeResizeMode 0x0
PTR objects
0x1CC 0x04 00 00 00 F4 First object (Page) at 0xF4
0x1D0 0x04 00 00 01 40 Second object (Plane) at 0x140
STR languages
0x1D4 0x00 empty
labels
0x1D4 0x07 73 61 6D 70 6C 65 00 sample (null terminated)
0x1DB 0x01 00 padding (aligned to 4 bytes boundary)
0x1DC 0x05 72 6F 6F 74 00 root (null terminated)
0x1E1 0x03 00 00 00 padding (aligned to 4 bytes boundary)
0x1E4 0x0C 61 70 70 6C 69 63 61 74 69 6F 6E 00 application (null terminated)
events
0x1F0 0x04 00 00 00 00 dummy event ?

When compiled with ZLIB compression MD5: 4B6C364DDA94BBF1C0A7AC9864DC4796

Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F

00000000  46 52 50 00 00 00 00 97 00 00 00 00 00 00 00 10  FRP....—........
00000010  00 00 00 A4 FF FF FF FF FF FF FF FF FF FF FF FF  ...¤ÿÿÿÿÿÿÿÿÿÿÿÿ
00000020  FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00000030  00 00 00 CC FF FF FF FF FF FF FF FF 00 00 00 00  ...Ìÿÿÿÿÿÿÿÿ....
00000040  00 00 01 D4 00 00 00 1C 00 00 01 F0 00 00 00 04  ...Ô.......ð....
00000050  FF FF FF FF 00 00 00 00 FF FF FF FF 00 00 00 00  ÿÿÿÿ....ÿÿÿÿ....
00000060  FF FF FF FF 00 00 00 00 FF FF FF FF 00 00 00 00  ÿÿÿÿ....ÿÿÿÿ....
00000070  00 00 01 CC 00 00 00 08 FF FF FF FF 00 00 00 00  ...Ì....ÿÿÿÿ....
00000080  FF FF FF FF 00 00 00 00 FF FF FF FF 00 00 00 00  ÿÿÿÿ....ÿÿÿÿ....
00000090  FF FF FF FF 00 00 00 00 FF FF FF FF FF FF FF FF  ÿÿÿÿ....ÿÿÿÿÿÿÿÿ
000000A0  FF FF FF FF 00 00 00 6C 00 00 01 50 00 00 00 00  ÿÿÿÿ...l...P....
000000B0  78 DA 75 CD C1 0D 80 20 0C 05 D0 5F 4F 1C 75 0B  xÚuÍÁ.€ ..Ð_O.u.
000000C0  B6 D0 01 58 82 18 0F 24 28 44 19 C0 A1 BD 2B 04  ¶Ð.X‚..$(D.À¡½+.
000000D0  23 2A F0 92 9F 26 A5 B4 44 78 E3 3E 84 02 E6 73  #*ð’Ÿ&¥´Dxã>„.æs
000000E0  7A 95 39 FE CC 51 2C 77 4F D4 E6 A8 0B FB E2 CE  z•9þÌQ,wOÔæ¨.ûâÎ
000000F0  5A 65 0D 82 36 FE CB 08 14 F4 FB 37 C9 BF 9F EE  Ze.‚6þË..ôû7É¿Ÿî
00000100  23 53 7C 3F 00 1A 36 39 5B 3D 01 AB 31 0E 9E B4  #S|?..69[=.«1.ž´
00000110  56 AB 51 3A 65 16 04 17 88 21 38 F3              V«Q:e...ˆ!8ó
  • Changes
    • 10 the compression setting for ZLIB
    • FF FF FF FF weird
    • 00 00 00 6C 00 00 01 50 00 00 00 00 the info about the compressed area that comes next (composed by: lenPacked, lenUnpacked, and lenLongestText)
    • 78 DA ... the compressed area itself, includes the TOC, the pointer tables (PTR), and string tables (STR)