Editing Qt Resource Container (QRC)
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: | ||
== | == General format == | ||
QRC files ('''Q'''t '''R'''esources '''C'''ontainer) are located inside a QGL folder ('''Q'''t '''G'''raphics '''L'''ibrary) in path: '''dev_flash/vsh/resource/qgl''' | QRC files ('''Q'''t '''R'''esources '''C'''ontainer) are part of the firmware, located inside a QGL folder ('''Q'''t '''G'''raphics '''L'''ibrary) in path: '''dev_flash/vsh/resource/qgl''' using names: '''canyon.qrc, earth.qrc, icons.qrc, icontex.qrc, lines.qrc, raf.qrc, rhm.qrc''', and '''store.qrc''' | ||
*All them uses zlib compression and the same container, but the zlib compression method and the structure of the container has 2 variations: | |||
**'''All .qrc files except icontex.qrc''' (magic QRCC) - zlib compression is applyed over the whole .qrc file (except his first 8 bytes that are info for the decompression), after decompression the file generated is a QRCF and the internal container structure can be readed (QRCC always contains a QRCF that is the real container) | |||
**'''icontex.qrc''' - (magic QRCF) zlib compression is applyed per-file over each contained file (the container structure can be readed directlly and every one of the files inside the container structure is compressed individually) | |||
*QRC | In the practise and from the point of view of the system, the QRCC has no interest and is needed to decompress the whole QRCC to be able to read the internal structure of the container and to acess individual files, when a QRCC is decompressed it generates an QRCF file (the real container) but this QRCF has a different internal structure than the QRCF used by icontex.qrc (are variations of the same container with some small differences... althougth both uses the same identifyer QRCF) | ||
** | |||
** | *For this reason is not posible to identify them by reading his magic (both are QRCF) but his structure is different, so is needed to use unnofficial names to identify them and to be able to explain his variations here in wiki, the proposed names used in this page are: | ||
** | **'''QRCF_1''' (the most common and older... used by all .qrc's except icontext.qrc) | ||
** | **'''QRCF_2''' (the less common and newer... used only by icontex.qrc) | ||
*Notes | |||
**Actually, the correct way to identity the QRCF container is by reading the texts in the "strings table" that are related with the building process and defines his internal structure, but his names are too long to use when talking about them | |||
**The container used by '''.QRC''' files (the 2 variations of QRCF) is the same used by [[Themes_(.p3t) | .P3T]] themes (P3TF) and [[Rich_Appearance_Format_(RAF) | .RAF]] animations (RAFO). All them are variations of the same generic container for a total of 4 known/found | |||
**The contents of QRC files are compatible/generated with/by: [http://en.wikipedia.org/wiki/Qt_%28framework%29 Qt framework] and [http://en.wikipedia.org/wiki/OpenGL OpenGL] | |||
=== QRCC === | |||
QRCC ('''Q'''t '''R'''esources '''C'''ontainer '''C'''ompressed) | |||
QRC file ZLIB Compressed level 9. | |||
*Example from 3.55 rhm.qrc: | |||
'''Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F''' | |||
'''00000000''' <span style="background:#ff6666;">51 52 43 43</span> <span style="background:#8888ff;">00 00 28 00</span> <span style="background:#00ff00;">78 DA</span> QRCC..(.xÚ | |||
{| class="wikitable" | |||
|- | |||
! Name !! Offset !! Size !! Example !! Remark | |||
|- | |||
| Magic || 0x00 || 0x04 || {{cellcolors|#ff6666}} 51 52 43 43 || 'QRCC' | |||
|- | |||
| QRCF decompressed size || 0x04 || 0x04 || {{cellcolors|#8888ff}} 00 00 28 00 || The size of the QRCF file generated when a QRCC is decompressed | |||
|- | |||
| compressed QRCF || 0x08 || ''varies, up to the end of the QRCC file'' || {{cellcolors|#00FF00}} 78 DA... || QRCF file start offset, compressed with ZLIB | |||
|- | |||
|} | |||
*Notes | |||
**The first 2 bytes of the compressed QRCF is the ZLIB header, in this example: 0x78DA | |||
**default/max level 9 | |||
=== QRCF === | |||
QRCF ('''Q'''t '''R'''esources '''C'''ontainer '''F'''lat?) | |||
====Main Header==== | |||
The header contains an identifyer of the container (magic), his version, and allows to store the "absolute start offset" and "size" of 7 tables (or areas) | |||
When a "not used table" is placed before a "used table"... the start offset of the "not used table" and his size (as zero) are stored in the main header to preserve his position in the structure. The "used table" that comes later starts in the same offset than the previouslly "not used table" (an intuitive way to think in this is imagining are overlapped because starts in the same position but only the one at the top is used) | |||
*The container format is generic (used also by .RAF and .P3T with some variations) so the usage of this tables can vary, in this example there are 3 "not used tables": | |||
**two of the "not used tables" (both at offset 0x460 with a size of 0) are placed before an used table (also at offset 0x460 but with a size of 0x23A0) | |||
**the other "not used table" is placed at the end, so there is no need to store his offset | |||
*Example from fw 3.55 rhm.qrc: | |||
'''Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F''' | |||
'''00000000''' <span style="background:#666666;">51 52 43 46</span> <span style="background:#888888;">00 00 01 10</span> <span style="background:#dddd66;">00 00 00 40</span> <span style="background:#ffff88;">00 00 02 CC</span> QRCF.......@..%| | |||
'''00000010''' <span style="background:#dd6666;">00 00 03 10</span> <span style="background:#ff8888;">00 00 01 2B</span> <span style="background:#66dddd;">00 00 04 40</span> <span style="background:#88ffff;">00 00 00 1B</span> ..%À......9Ð.... | |||
'''00000020''' <span style="background:#66dd66;">00 00 04 60</span> <span style="background:#88ff88;">00 00 00 00</span> <span style="background:#dd66dd;">00 00 04 60</span> <span style="background:#ff88ff;">00 00 00 00</span> ..9ð......9ð.... | |||
'''00000030''' <span style="background:#6666dd;">00 00 04 60</span> <span style="background:#8888ff;">00 00 23 A0</span> <span style="background:#aee2ae;">00 00 00 00</span> <span style="background:#cef2ce;">00 00 00 00</span> ..9ð..@p........ | |||
{| class="wikitable" | |||
|- | |||
! Name !! Offset !! Size !! Example !! Remark | |||
|- | |||
| Magic || 0x00 || 0x04 || {{cellcolors|#666666|#ffffff}} 51 52 43 46 || 'QRCF' | |||
|- | |||
| Version || 0x04 || 0x04 || {{cellcolors|#888888|#ffffff}} 00 00 01 10 || | |||
|- | |||
| Tree Table Offset || 0x08 || 0x04 || {{cellcolors|#dddd66}} 00 00 00 40 || | |||
|- | |||
| Tree Table Size || 0x0C || 0x04 || {{cellcolors|#ffff88}} 00 00 02 CC || | |||
|- | |||
| ID Table Offset || 0x10 || 0x04 || {{cellcolors|#dd6666}} 00 00 03 10 || | |||
|- | |||
| ID Table Size || 0x14 || 0x04 || {{cellcolors|#ff8888}} 00 00 01 2B || | |||
|- | |||
| String Table Offset || 0x18 || 0x04 || {{cellcolors|#66dddd}} 00 00 04 40 || | |||
|- | |||
| String Table Size || 0x1C || 0x04 || {{cellcolors|#88ffff}} 00 00 00 1B || | |||
|- | |||
| Integer Array Offset || 0x20 || 0x04 || {{cellcolors|#66dd66}} 00 00 04 60 || Overlapped | |||
|- | |||
| Integer Array size || 0x24 || 0x04 || {{cellcolors|#88ff88}} 00 00 00 00 || Not used | |||
|- | |||
| Float Array Offset || 0x28 || 0x04 || {{cellcolors|#dd66dd}} 00 00 04 60 || Overlapped | |||
|- | |||
| Float Array Size || 0x2C || 0x04 || {{cellcolors|#ff88ff}} 00 00 00 00 || Not used | |||
|- | |||
| File Table Offset || 0x30 || 0x04 || {{cellcolors|#6666dd}} 00 00 04 60 || Overlaps the previous 2 tables | |||
|- | |||
| File Table Size || 0x34 || 0x04 || {{cellcolors|#8888ff}} 00 00 23 A0 || | |||
|- | |||
| ''Unknown Table Offset'' || 0x38 || 0x04 || {{cellcolors|#aee2ae}} 00 00 00 00 || Not present | |||
|- | |||
| ''Unknown Table Size'' || 0x3C || 0x04 || {{cellcolors|#cef2ce}} 00 00 00 00 || Not Used | |||
|- | |||
|} | |||
*Notes | |||
**The sizes doesnt includes the (posible) padding at the end of all tables | |||
====Tree Table==== | |||
Offset (without the 0x40 header in all qrc files) | |||
http://666kb.com/i/cib5c7q4y7rpcx9x1.gif | |||
Same on all QRC's till offset 0x70 | |||
{| class="wikitable" | |||
! Offset !! Size !! Example !! Remark | |||
|- | |||
| 0x00 || 0x08 || 00 00 00 00 00 00 00 00 || similar all qrc files | |||
|- | |||
| 0x08 || 0x08 || FF FF FF FF FF FF FF FF || similar all qrc files | |||
|- | |||
| 0x10 || 0x04 || FF FF FF FF || similar all qrc files | |||
|- | |||
| 0x14 || 0x04 || 00 00 00 1C || similar all qrc files | |||
|- | |||
| 0x18 || 0x04 || 00 00 00 1C || similar all qrc files | |||
|- | |||
| 0x1C || 0x04 || 00 00 00 04 || similar all qrc files | |||
|- | |||
| 0x20 || 0x08 || 00 00 00 00 00 00 00 00 || similar all qrc files | |||
|- | |||
| 0x28 || 0x08 || FF FF FF FF FF FF FF FF || similar all qrc files | |||
|- | |||
| 0x30 || 0x04 || 00 00 00 38 || similar all qrc files: start offset Tree Table | |||
|- | |||
| 0x34 || 0x04 || xx xx xx xx || size body Tree Table | |||
|- | |||
| 0x38 || 0x04 || 00 00 00 0F || similar all qrc files | |||
|- | |||
| 0x3C || 0x04 || 00 00 00 02 || 00 00 00 03 on icontex.qrc | |||
|- | |||
| 0x40 || 0x04 || 00 00 00 1C || similar all qrc files | |||
|- | |||
| 0x44 || 0x04 || FF FF FF FF || similar all qrc files | |||
|- | |||
| 0x48 || 0x04 || 00 00 00 74 || 00 00 00 84 on icontex.qrc : start offset of the Filename pointer entry inside ID Table | |||
|- | |||
| 0x4C || 0x08 || FF FF FF FF FF FF FF FF || similar all qrc files | |||
|- | |||
| 0x54 || 0x04 || 00 00 00 14 || similar all qrc files | |||
|- | |||
| 0x58 || 0x04 || 00 00 00 06 || similar all qrc files | |||
|- | |||
| 0x5C || 0x04 || 00 00 00 00 || offset of first File Data | |||
|- | |||
| 0x60 || 0x04 || 00 00 01 50 || size of first File Data | |||
|- | |||
| 0x64 || 0x04 || 00 00 00 18 || similar all qrc files | |||
|- | |||
| 0x68 || 0x04 || 00 00 00 07 || similar all qrc files | |||
|- | |||
| 0x6C || 0x04 || 00 00 00 00 || offset of first filename within the ID Table | |||
|- | |||
| 0x70 || 0x04 || 00 00 00 00 || on icontex here are additional 16 bytes | |||
|- | |||
| 0x74 || 0x04 || 00 00 00 0F || similar all qrc files | |||
|- | |||
| 0x78 || 0x04 || 00 00 00 02 || similar all qrc files | |||
|- | |||
| 0x7C || 0x04 || 00 00 00 1C || similar all qrc files | |||
|- | |||
| 0x80 || 0x04 || 00 00 00 38 || Filename pointer of the first file for the ID Table | |||
|- | |||
| 0x84 || 0x04 || 00 00 00 B0 || start offset of the next entry for the Filename pointer within the ID Table | |||
|- | |||
|} | |||
On icontex.qrc there are additional 16 bytes added on offset 0x70 within the '''Tree Table''' | |||
{| class="wikitable" | |||
! Offset !! Size !! Example !! Remark | |||
|- | |||
| 0x70 || 0x04 || 00 00 00 00 || on icontex.qrc | |||
|- | |||
| 0x74 || 0x04 || 00 00 00 1B || on icontex.qrc | |||
|- | |||
| 0x78 || 0x04 || 00 00 00 01 || on icontex.qrc | |||
|- | |||
| 0x7C || 0x04 || 00 01 55 D4 || on icontex.qrc (size of .dds uncompressed) | |||
|- | |||
| 0x80 || 0x04 || 00 00 00 00 || similar all qrc files | |||
|- | |||
| 0x84 || 0x04 || 00 00 00 0F || similar all qrc files | |||
|- | |||
| 0x88 || 0x04 || 00 00 00 02 || similar all qrc files | |||
|- | |||
| 0x8C || 0x04 || 00 00 00 1C || similar all qrc files | |||
|- | |||
| 0x90 || 0x04 || 00 00 00 38 || Filename pointer of the first file for the ID Table | |||
|- | |||
| 0x94 || 0x04 || 00 00 00 B0 || start offset of the next entry for the Filename pointer within the Tree Table | |||
|- | |||
|} | |||
====Filenames List==== | |||
This area is composed by a consecutive list of string entries that defines the names of the <file>'s inside <file-table> from the .xml file used to create the container | |||
Every <file> inside <file-table> has assigned 2 attributes in the xml used to create the container: "src" (includes full path + file name + file extension), and "id" (only file name), plus the attribute "size" in QRCF_2 that is added by the program that creates the container ("size" is not present in the original .xml but added automatically when the container is created, this only happens in QRCF_2 and themes and is related with the per-file compression) | |||
*For QRCF_1 containers only is stored the "src" (the file "id" is missing althougth can be deduced from the "src") | |||
*For QRCF_2 and P3T themes only is stored the "id" (the file "src" is missing so there is no way to read the original path or file extension from the container) | |||
{{Boxcode|content=<syntaxhighlight lang="xml"> | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<qrc> | |||
<file-table> | |||
<file src="lib/rhm/Clear.fpo" id="Clear"/> | |||
</file-table> | |||
</qrc> | |||
</syntaxhighlight>}} | |||
For QRCF_1 each entry is composed by: | |||
{| class="wikitable" | |||
|- | |||
! Offset !! Length !! Example !! Name !! Notes | |||
|- | |||
| 0x0 || 0x4 || 00000038 || '''Filename Table pointer''' || Same value than in the '''Tree Table''' | |||
|- | |||
| 0x4 || ''variable'' || lib/rhm/Clear.fpo || '''File name''' || stored in the .xml as '''"src"''' | |||
|- | |||
| ''variable'' || 0x1 || 00 || '''NULL byte''' || | |||
|} | |||
*Notes | |||
**For QRCF_2 and themes the structure of an entry is the same, but instead of storing: '''lib/rhm/Clear.fpo''' (the file "src"), it should store: '''Clear''' (the file "id") | |||
**The end of the table has a padding to align to 0x10 bytes | |||
**About the name of this area... for QRCF_1 what is stored is the "src" of the file so we can name it "File SRC table" or "File SRC List", but QRCF_2 and themes stores the "id" of the file so we could name it "File ID table" or "File ID List", but later will be needed to move all this explanations of the structure to a new page and include RAF that is a bit unknown by now if it uses some specific names for storage types inside specific tables. By now we can use a generic name for this area that includes all them like "Filenames List" and decide later if is needed to use specific names | |||
====String Table==== | |||
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 doesnt makes differences of the "directory hierarchy" of the tags neither is specifyed 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) | |||
In all the .qrc files (QRCF_1) except icontex.qrc (QRCF_2). The only difference is QRCF_2 adds the "size" to all the <file> elements (added by the container creator, related with the "per-file" compression) | |||
'''Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F''' | |||
'''00000440''' <span style="background:#ffff66;">71 72 63 00 66 69 6C 65 2D 74 61 62 6C 65 00 66</span> qrc file-table f | |||
'''00000450''' <span style="background:#ffff66;">69 6C 65 00 73 72 63 00 69 64 00 00</span> <span style="background:#ff6666;">00 00 00 00</span> ile src id...... | |||
In icontex.qrc only (QRCF_2). This is similar than themes with the difference that QRC uses a <file-table> containing 1 or more <file>, and themes uses a <icontable> containing 1 or more <icon> | |||
'''Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F''' | |||
'''00000440''' <span style="background:#ffff66;">71 72 63 00 66 69 6C 65 2D 74 61 62 6C 65 00 66</span> qrc file-table f | |||
'''00000450''' <span style="background:#ffff66;">69 6C 65 00 73 72 63 00 69 64 00 73 69 7A 65 00</span> ile src id size. | |||
*Notes: | |||
**yellow: used 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 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) | |||
====File Table==== | |||
The files are concatenated in the same order than in the '''Tree Table''' & '''ID Table''' | |||
===Summary=== | |||
====Table Description==== | |||
<span style="background:#66ff66;">First Element</span> (in root of xml) Points to a Offset within '''Tree Table''' which represents a string | |||
<span style="background:#e6ec8b;">Last Element</span> (in root of xml) Points to a Offset within '''Tree Table''' which represents a string | |||
<span style="background:#ccd815;">Element Pointer</span> Points to a Offset within '''String Table''' which represents a string | |||
<span style="background:#ffff66;">Previous Element</span> Points to a Offset within '''Tree Table''' which represents a string | |||
<span style="background:#ff6666;">Next Element</span> Points to a Offset within '''Tree Table''' which represents a string | |||
<span style="background:#66ff66;">First Element</span> | |||
<span style="background:#e6ec8b;">Last Element</span> | |||
<span style="background:#ccd815;">Element Pointer</span> | |||
<span style="background:#43BFC7;">Attribute Counter</span> Integer value which describe the amount of Attributes for the current processing Element | |||
<span style="background:#9AFEFF;">Parent</span> Points to a Offset within '''Tree Table''' which represents a string and describe the Parent Element | |||
<span style="background:#ffff66;">Previous Element</span> (also used as a 4 byte long value which points to a Filename within '''ID Table''') | |||
<span style="background:#ff6666;">Next Element</span> (also used as a 4 byte long value which points to a Filename within '''ID Table''') | |||
<span style="background:#cef2ce;">First Entry</span> Points to a Offsset within '''Tree Table''' which describe the first file of current processing Element | |||
<span style="background:#5CB3FF;">Last Entry</span> Points to a Offsset within '''Tree Table''' which describe the last file of current processing Element | |||
<span style="background:#ccd815;">Element Pointer</span> | |||
<span style="background:#FCDFFF;">Typ Descriptor</span> A Integer value which describe the Typ of the Attribute | |||
<span style="background:#6666ff;">Offset of Filedata</span> A Integer value, points to a Offset within '''File Table''' which describe the Start of a File to read from | |||
<span style="background:#2bffb3;">Size of Filedata</span> A Integer value which describe the Length of the File to read from '''File Table''' | |||
= | <span style="background:#ccd815;">Element Pointer</span> | ||
= | <span style="background:#FCDFFF;">Typ Descriptor</span> | ||
= | <span style="background:#00FFFF;">ID Offset</span> A Integer value which describe the Offset of a Filename within '''ID Table''' | ||
=== rhm. | ''' Tree Table of rhm.qrc ID Table of rhm.qrc''' | ||
''' 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 00 00 00 00 00 00 00 00 FF FF FF FF FF FF FF FF ........ÿÿÿÿÿÿÿÿ 00000000 <span style="background:#00FFFF;">00</span> <span style="background:#ffff66;">00 00 38</span> 6C 69 62 2F 72 68 6D 2F 43 6C 65 61 ...8lib/rhm/Clea''' | |||
''' 00000010 FF FF FF FF <span style="background:#66ff66;">00 00 00 1C</span> <span style="background:#e6ec8b;">00 00 00 1C</span> <span style="background:#ccd815;">00 00 00 04</span> ÿÿÿÿ............ 00000010 72 2E 66 70 6F 00 <span style="background:#00FFFF;">00</span> <span style="background:#ffff66;">00 00 74</span> 6C 69 62 2F 72 68 r.fpo....tlib/rh''' | |||
''' 00000020 00 00 00 00 00 00 00 00 <span style="background:#ffff66;">FF FF FF FF</span> <span style="background:#ff6666;">FF FF FF FF</span> ........ÿÿÿÿÿÿÿÿ 00000020 6D 2F 43 6C 65 61 72 2E 76 70 6F 00 <span style="background:#00FFFF;">00</span> <span style="background:#ffff66;">00 00 B0</span> m/Clear.vpo....°''' | |||
''' 00000030 <span style="background:#66ff66;">00 00 00 38</span> <span style="background:#e6ec8b;">00 00 02 90</span> <span style="background:#ccd815;">00 00 00 0F</span> <span style="background:#43BFC7;">00 00 00 02</span> ...8............ 00000030 6C 69 62 2F 72 68 6D 2F 43 6F 70 79 2E 66 70 6F lib/rhm/Copy.fpo''' | |||
''' 00000040 <span style="background:#9AFEFF;">00 00 00 1C</span> <span style="background:#ffff66;">FF FF FF FF</span> <span style="background:#ff6666;">00 00 00 74</span> <span style="background:#cef2ce;">FF FF FF FF</span> ....ÿÿÿÿ...tÿÿÿÿ 00000040 00 <span style="background:#00FFFF;">00</span> <span style="background:#ffff66;">00 00 EC</span> 6C 69 62 2F 72 68 6D 2F 64 65 66 ....ìlib/rhm/def''' | |||
''' 00000050 <span style="background:#5CB3FF;">FF FF FF FF</span> <span style="background:#ccd815;">00 00 00 14</span> <span style="background:#FCDFFF;">00 00 00 06</span> <span style="background:#6666ff;">00 00 00 00</span> ÿÿÿÿ............ 00000050 61 75 6C 74 2E 66 70 6F 00 <span style="background:#00FFFF;">00</span> <span style="background:#ffff66;">00 01 28</span> 6C 69 62 ault.fpo....(lib''' | |||
''' 00000060 <span style="background:#2bffb3;">00 00 01 50</span> <span style="background:#ccd815;">00 00 00 18</span> <span style="background:#FCDFFF;">00 00 00 07</span> <span style="background:#00FFFF;">00 00 00 00</span> ...P............ 00000060 2F 72 68 6D 2F 64 65 66 61 75 6C 74 2E 76 70 6F /rhm/default.vpo''' | |||
''' 00000070 00 00 00 00 <span style="background:#ccd815;">00 00 00 0F</span> <span style="background:#43BFC7;">00 00 00 02</span> <span style="background:#9AFEFF;">00 00 00 1C</span> ................ 00000070 00 <span style="background:#00FFFF;">00</span> <span style="background:#ffff66;">00 01 64</span> 6C 69 62 2F 67 6C 75 74 69 6C 73 ....dlib/glutils''' | |||
''' 00000080 <span style="background:#ffff66;">00 00 00 38</span> <span style="background:#ff6666;">00 00 00 B0</span> <span style="background:#cef2ce;">FF FF FF FF</span> <span style="background:#5CB3FF;">FF FF FF FF</span> ...8...°ÿÿÿÿÿÿÿÿ 00000080 2F 43 6F 6E 65 46 69 6C 74 65 72 2E 66 70 6F 00 /ConeFilter.fpo.''' | |||
''' 00000090 <span style="background:#ccd815;">00 00 00 14</span> <span style="background:#FCDFFF;">00 00 00 06</span> <span style="background:#6666ff;">00 00 01 50</span> <span style="background:#2bffb3;">00 00 00 E0</span> ...........P...à 00000090 <span style="background:#00FFFF;">00</span> <span style="background:#ffff66;">00 01 A0</span> 6C 69 62 2F 67 6C 75 74 69 6C 73 2F ....lib/glutils/''' | |||
''' 000000A0 <span style="background:#ccd815;">00 00 00 18</span> <span style="background:#FCDFFF;">00 00 00 07</span> <span style="background:#00FFFF;">00 00 00 16</span> 00 00 00 00 ................ 000000A0 43 6F 6E 65 46 69 6C 74 65 72 2E 76 70 6F 00 <span style="background:#00FFFF;">00</span> ConeFilter.vpo..''' | |||
''' 000000B0 <span style="background:#ccd815;">00 00 00 0F</span> <span style="background:#43BFC7;">00 00 00 02</span> <span style="background:#9AFEFF;">00 00 00 1C</span> <span style="background:#ffff66;">00 00 00 74</span> ...............t 000000B0 <span style="background:#ffff66;">00 01 DC</span> 6C 69 62 2F 67 6C 75 74 69 6C 73 2F 43 ..Ülib/glutils/C''' | |||
''' 000000C0 <span style="background:#ff6666;">00 00 00 EC</span> <span style="background:#cef2ce;">FF FF FF FF</span> <span style="background:#5CB3FF;">FF FF FF FF</span> <span style="background:#ccd815;">00 00 00 14</span> ...ìÿÿÿÿÿÿÿÿ.... 000000C0 6F 6E 65 46 69 6C 74 65 72 53 69 6D 70 6C 65 2E oneFilterSimple.''' | |||
''' 000000D0 <span style="background:#FCDFFF;">00 00 00 06</span> <span style="background:#6666ff;">00 00 02 30</span> <span style="background:#2bffb3;">00 00 01 20</span> <span style="background:#ccd815;">00 00 00 18</span> .......0........ 000000D0 66 70 6F 00 <span style="background:#00FFFF;">00</span> <span style="background:#ffff66;">00 02 18</span> 6C 69 62 2F 67 6C 75 74 fpo.....lib/glut''' | |||
''' 000000E0 <span style="background:#FCDFFF;">00 00 00 07</span> <span style="background:#00FFFF;">00 00 00 2C</span> 00 00 00 00 <span style="background:#ccd815;">00 00 00 0F</span> .......,........ 000000E0 69 6C 73 2F 53 63 72 65 65 6E 43 6F 70 79 2E 66 ils/ScreenCopy.f''' | |||
''' 000000F0 <span style="background:#43BFC7;">00 00 00 02</span> <span style="background:#9AFEFF;">00 00 00 1C</span> <span style="background:#ffff66;">00 00 00 B0</span> <span style="background:#ff6666;">00 00 01 28</span> ...........°...( 000000F0 70 6F 00 <span style="background:#00FFFF;">00</span> <span style="background:#ffff66;">00 02 54</span> 6C 69 62 2F 67 6C 75 74 69 po....Tlib/gluti''' | |||
''' 00000100 <span style="background:#cef2ce;">FF FF FF FF</span> <span style="background:#5CB3FF;">FF FF FF FF</span> <span style="background:#ccd815;">00 00 00 14</span> <span style="background:#FCDFFF;">00 00 00 06</span> ÿÿÿÿÿÿÿÿ........ 00000100 6C 73 2F 42 6C 75 72 32 2E 66 70 6F 00 <span style="background:#00FFFF;">00</span> 00 02 ls/Blur2.fpo....''' | |||
''' 00000110 <span style="background:#6666ff;">00 00 03 50</span> <span style="background:#2bffb3;">00 00 01 F0</span> <span style="background:#ccd815;">00 00 00 18</span> <span style="background:#FCDFFF;">00 00 00 07</span> ...P...ð........ 00000110 90 6C 69 62 2F 67 6C 75 74 69 6C 73 2F 42 6C 75 .lib/glutils/Blu''' | |||
''' 00000120 <span style="background:#00FFFF;">00 00 00 41</span> 00 00 00 00 <span style="background:#ccd815;">00 00 00 0F</span> <span style="background:#43BFC7;">00 00 00 02</span> ...A............ 00000120 72 32 4D 61 73 6B 2E 66 70 6F r2Mask.fpo''' | |||
''' 00000130 <span style="background:#9AFEFF;">00 00 00 1C</span> <span style="background:#ffff66;">00 00 00 EC</span> <span style="background:#ff6666;">00 00 01 64</span> <span style="background:#cef2ce;">FF FF FF FF</span> .......ì...dÿÿÿÿ''' | |||
''' 00000140 <span style="background:#5CB3FF;">FF FF FF FF</span> <span style="background:#ccd815;">00 00 00 14</span> <span style="background:#FCDFFF;">00 00 00 06</span> <span style="background:#6666ff;">00 00 05 40</span> ÿÿÿÿ...........@''' | |||
''' 00000150 <span style="background:#2bffb3;">00 00 08 10</span> <span style="background:#ccd815;">00 00 00 18</span> <span style="background:#FCDFFF;">00 00 00 07</span> <span style="background:#00FFFF;">00 00 00 59</span> ...............Y''' | |||
''' 00000160 00 00 00 00 <span style="background:#ccd815;">00 00 00 0F</span> <span style="background:#43BFC7;">00 00 00 02</span> <span style="background:#9AFEFF;">00 00 00 1C</span> ................''' | |||
''' 00000170 <span style="background:#ffff66;">00 00 01 28</span> <span style="background:#ff6666;">00 00 01 A0</span> <span style="background:#cef2ce;">FF FF FF FF</span> <span style="background:#5CB3FF;">FF FF FF FF</span> ...(....ÿÿÿÿÿÿÿÿ String Table of rhm.qrc''' | |||
''' 00000180 <span style="background:#ccd815;">00 00 00 14</span> <span style="background:#FCDFFF;">00 00 00 06</span> <span style="background:#6666ff;">00 00 0D 50</span> <span style="background:#2bffb3;">00 00 05 50</span> ...........P...P Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F''' | |||
''' 00000190 <span style="background:#ccd815;">00 00 00 18</span> <span style="background:#FCDFFF;">00 00 00 07</span> <span style="background:#00FFFF;">00 00 00 71</span> 00 00 00 00 ...........q.... 00000000 71 72 63 00 <span style="background:#ccd815;">66</span> 69 6C 65 2D 74 61 62 6C 65 00 <span style="background:#ccd815;">66</span> qrc file-table f''' | |||
''' 000001A0 <span style="background:#ccd815;">00 00 00 0F</span> <span style="background:#43BFC7;">00 00 00 02</span> <span style="background:#9AFEFF;">00 00 00 1C</span> <span style="background:#ffff66;">00 00 01 64</span> ...............d 00000010 69 6C 65 00 <span style="background:#ccd815;">73</span> 72 63 00 <span style="background:#ccd815;">69</span> 64 00 73 69 7A 65 00 ile src id size.''' | |||
''' 000001B0 <span style="background:#ff6666;">00 00 01 DC</span> <span style="background:#cef2ce;">FF FF FF FF</span> <span style="background:#5CB3FF;">FF FF FF FF</span> <span style="background:#ccd815;">00 00 00 14</span> ...Üÿÿÿÿÿÿÿÿ....''' | |||
''' 000001C0 <span style="background:#FCDFFF;">00 00 00 06</span> <span style="background:#6666ff;">00 00 12 A0</span> <span style="background:#2bffb3;">00 00 03 D0</span> <span style="background:#ccd815;">00 00 00 18</span> ...........Ð....''' | |||
''' 000001D0 <span style="background:#FCDFFF;">00 00 00 07</span> <span style="background:#00FFFF;">00 00 00 90</span> 00 00 00 00 <span style="background:#ccd815;">00 00 00 0F</span> ................''' | |||
''' 000001E0 <span style="background:#43BFC7;">00 00 00 02</span> <span style="background:#9AFEFF;">00 00 00 1C</span> <span style="background:#ffff66;">00 00 01 A0</span> <span style="background:#ff6666;">00 00 02 18</span> ................''' | |||
''' 000001F0 <span style="background:#cef2ce;">FF FF FF FF</span> <span style="background:#5CB3FF;">FF FF FF FF</span> <span style="background:#ccd815;">00 00 00 14</span> <span style="background:#FCDFFF;">00 00 00 06</span> ÿÿÿÿÿÿÿÿ........''' | |||
''' 00000200 <span style="background:#6666ff;">00 00 16 70</span> <span style="background:#2bffb3;">00 00 01 C0</span> <span style="background:#ccd815;">00 00 00 18</span> <span style="background:#FCDFFF;">00 00 00 07</span> ...p...À........''' | |||
''' 00000210 <span style="background:#00FFFF;">00 00 00 AF</span> 00 00 00 00 <span style="background:#ccd815;">00 00 00 0F</span> <span style="background:#43BFC7;">00 00 00 02</span> ...¯............''' | |||
''' 00000220 <span style="background:#9AFEFF;">00 00 00 1C</span> <span style="background:#ffff66;">00 00 01 DC</span> <span style="background:#ff6666;">00 00 02 54</span> <span style="background:#cef2ce;">FF FF FF FF</span> .......Ü...Tÿÿÿÿ''' | |||
''' 00000230 <span style="background:#5CB3FF;">FF FF FF FF</span> <span style="background:#ccd815;">00 00 00 14</span> <span style="background:#FCDFFF;">00 00 00 06</span> <span style="background:#6666ff;">00 00 18 30</span> ...............0''' | |||
''' 00000240 <span style="background:#2bffb3;">00 00 03 10</span> <span style="background:#ccd815;">00 00 00 18</span> <span style="background:#FCDFFF;">00 00 00 07</span> <span style="background:#00FFFF;">00 00 00 D4</span> ...............Ô''' | |||
''' 00000250 00 00 00 00 <span style="background:#ccd815;">00 00 00 0F</span> <span style="background:#43BFC7;">00 00 00 02</span> <span style="background:#9AFEFF;">00 00 00 1C</span> ................''' | |||
''' 00000260 <span style="background:#ffff66;">00 00 02 18</span> <span style="background:#ff6666;">00 00 02 90</span> <span style="background:#cef2ce;">FF FF FF FF</span> <span style="background:#5CB3FF;">FF FF FF FF</span> ........ÿÿÿÿÿÿÿÿ''' | |||
''' 00000270 <span style="background:#ccd815;">00 00 00 14</span> <span style="background:#FCDFFF;">00 00 00 06</span> <span style="background:#6666ff;">00 00 1B 40</span> <span style="background:#2bffb3;">00 00 04 20</span> ...........@....''' | |||
''' 00000280 <span style="background:#ccd815;">00 00 00 18</span> <span style="background:#FCDFFF;">00 00 00 07</span> <span style="background:#00FFFF;">00 00 00 F3</span> 00 00 00 00 ...........ó....''' | |||
''' 00000290 <span style="background:#ccd815;">00 00 00 0F</span> <span style="background:#43BFC7;">00 00 00 02</span> <span style="background:#9AFEFF;">00 00 00 1C</span> <span style="background:#ffff66;">00 00 02 54</span> ...............T''' | |||
''' 000002A0 <span style="background:#ff6666;">FF FF FF FF</span> <span style="background:#cef2ce;">FF FF FF FF</span> <span style="background:#5CB3FF;">FF FF FF FF</span> <span style="background:#ccd815;">00 00 00 14</span> ÿÿÿÿÿÿÿÿÿÿÿÿ....''' | |||
''' 000002B0 <span style="background:#FCDFFF;">00 00 00 06</span> <span style="background:#6666ff;">00 00 1F 60</span> <span style="background:#2bffb3;">00 00 04 40</span> <span style="background:#ccd815;">00 00 00 18</span> .......`...@....''' | |||
''' 000002C0 <span style="background:#FCDFFF;">00 00 00 07</span> <span style="background:#00FFFF;">00 00 01 0D</span> 00 00 00 00 ............''' | |||
=== | ====Typ Description==== | ||
{| class="wikitable" | |||
|- | |||
! Value !! Typ !! Notes | |||
|- | |||
| 0x00000006 || '''File''' || Composed of '''Offset''' and '''Size''' each 4 bytes long | |||
|- | |||
| 0x00000007 || '''ID''' || Composed of '''Offset''' and '''Size''' each 4 bytes long | |||
|- | |||
|} | |||
The Typ '''File''' is used to descripe two integer values, the Offset and Size for a File which will be readed from '''File Table'''. The Typ '''ID''' is used to descripe the Offset of a Filename within the '''ID Table'''. The Size value from '''ID'''' seems not to be used in Containers. | |||
== | == Tools == | ||
===ZLIB archivers=== | |||
QRC files are compressed in ZLIB, and has 8 bytes added at the start of the file. To be able to use a generic zlib archiver is needed to remove this 8 bytes (and is needed to add them in the last step when rebuilding the QRC file) | |||
====SimplyZip==== | |||
Windows archiver able to extract and create zlib files. http://www.paehl.de/cms/simplyzip | |||
*Usage: | |||
**Open the program and click in the tab at top: [External progs] ---> [ZLIB (pack/unpack)] | |||
**A window opens where you can select the file | |||
**Choose [Decompress] or [Compress], then click in [Start] | |||
=== | ==== QGL converter ==== | ||
This tool can decompress a QRCC to QRCF and compress a QRCF to QRCC (it crops/generates the first 8 bytes and manages the zlib decompression/compression) | |||
https://raw.github.com/wargio/ps3tools/master/QGL.c (just run make to compile it) | |||
=== QRC Extractors === | === QRC Extractors === | ||
After the ZLIB decompression (needed for all .qrc files except icontex.qrc) the contents can be extracted individually using different tools | After the ZLIB decompression (needed for all .qrc files except icontex.qrc) the contents can be extracted individually using different tools | ||
* | *Notes | ||
**Some of the images are inverted vertically (only .dds?) | |||
==== P3Textractor ==== | |||
Is posible to use a theme extractor to extract the contents from .qrc files, but first is needed to replace the characters '''/''' by '''_''' of the text strings inside the '''Name table''' with a hexeditor (e.g: the string '''override/black/ICONS.mnu''' needs to be replaced by '''override_black_ICONS.mnu''') | |||
This patching of the text strings can be automated by selecting the whole '''Name table''' in hexeditor and the function "replace string" (replacing the text string '''/''' by '''_''' automatically only in the selected area) | |||
P3Textractor manual: http://www.psdevwiki.com/ps3/Themes_(.p3t)#P3Textractor | |||
*Notes | |||
**P3Textractor renames .dds file extensions to .gim in the extraction process... so is needed to change back the file extensions manually to .dds for further edits in other programs | |||
**This same trick with P3Textractor can be used with .raf files | |||
=== Raw extractors === | |||
==== Generic Tiny little extractor ==== | |||
Theses generic tiny little tools extract '''blindly''' (they just don t want to stop) & embedded (and so, output bigger files when it s not) files and are means to be tiny and independent. Extremely Heavily based on an [http://www.ps3devwiki.com/wiki/Talk:Content_Information_Files MPO splitter] by Christian Steinruecken. Formats supported DDS/MNU/JPG/MPO/PNG (and virtually any other by modifying the source code) | |||
http://rghost.net/49340892 (include Code-Compile-Credit. Drag and drop your file into them) & | |||
mirror links: http://mir.cr/0R78ED3U | |||
=== QRC Compilers === | === QRC Compilers === | ||
There are no .qrc | There are no compilers for .qrc files, the commonly used method consist in patching settings values in text strings (or to inject the modded files) with a hexeditor over the original .qrc file | ||
This limits the mods to patches than never exceeeds the size of the original data... in the case of patching an area with an smaller patch is recommended to fill the original "trash" data with zeroes | |||
==== Patching strings in hexeditor ==== | |||
Mostly used with the settings inside .mnu files | |||
First extract the files with some of the extractor tool, open the .mnu files in notepad++ to be able to read the settings in a easy way | |||
Select the string you want to modify and "copy" his name | |||
Open the .qrc file in hexeditor (after ZLIB decompression if needed) and use the search funtion to locate the string you copyed previously | |||
*Notes | |||
**Most of the settings inside .mnu files are repeated several times inside the .qrc file because are used in several .mnu files... be sure to patch the correct .mnu file by comparing the rest of the data at his side | |||
==== Injecting files in hexeditor ==== | |||
Similar than patching a text string, but with a bigger chunk of data | |||
* | == Files inside QRC containers == | ||
** | *File formats inside QRC containers: (See [[Multimedia Formats and Tools]] page for a general description of DDS, GTF, BMP, TGA, and JPEG image formats) | ||
** | **ELF (Executable and Linkable Format) See Specifications here: [http://www.sco.com/developers/gabi/latest/ch4.eheader.html ELF Header] and [http://www.openwatcom.com/ftp/devel/docs/elf-64-gen.pdf ELF-64 Object File Format] | ||
** | **BIN (Binary) | ||
** | **MNU ? | ||
** | **FPO (Fragment program objects) | ||
*** | **VPO (Vertex program objects) | ||
**PATH (Camera path) | |||
**DUMP ? | |||
**TXT ? | |||
**INI ? | |||
**DDS (Direct Draw Surface) | |||
**GTF (Graphics Texture Format) | |||
**BMP (Bitmap) | |||
**TGA (Targa) | |||
**JPEG (Joint Photographic Experts Group) | |||
* | *ps3 standalone visualizer app released by "Q games" (responsibles of XMB design): http://blog.us.playstation.com/2013/08/08/new-ps3-visualizer-app-from-q-games-out-tuesday/ and http://www.ps3hax.net/2013/08/q-games-releases-new-visualizer-music-app-for-ps3-high/ | ||
*QRC related modules in '''dev_flashvsh/modules/''': | |||
*QRC | **qglbase.sprx <--- generic | ||
** | **qgl_gaia_app.sprx <--- earth animation inside music player | ||
**qgl_canyon_app.sprx <--- abstract animation inside music player | |||
**Indirectly related: raf.sprx <--- generic animations | |||
===lines.qrc=== | |||
{{lines.qrc}} | |||
===icons.qrc & icontex.qrc=== | |||
{{icons.qrc}} | |||
{{icontex.qrc}} | |||
===rhm.qrc & raf.qrc=== | |||
{{rhm.qrc}} | |||
{{raf.qrc}} | |||
===canyon.qrc & earth.qrc=== | |||
Music player visualizers | |||
*note1: the other music player visualizer available is a modification of the [[XMB]] wave/sparks animation, and is stored inside [[lines.qrc]] using specific .MNU settings in path: '''override/music_1/''') | |||
{{canyon.qrc}} | |||
{{earth.qrc}} | |||
===store.qrc=== | |||
{{store.qrc}} | |||
{{File Formats}}<noinclude>[[Category:Main]]</noinclude> | {{File Formats}}<noinclude>[[Category:Main]]</noinclude> |