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: | ||
== Description == | == Description == | ||
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]]. 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] | ||
*QRC related firmware modules in '''dev_flashvsh/modules/''': | *QRC related firmware modules in '''dev_flashvsh/modules/''': | ||
Line 14: | Line 12: | ||
**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/ | **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 | ==QRC structure== | ||
See: [[CXML Containers]] page | |||
== Tools == | |||
===ZLIB archivers=== | |||
QRC files are compressed in [[Template:Zlib Header|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 === | |||
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 === | |||
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 == | |||
*QRC files from firmware version 1.00 up and including 4.50 : http://mir.cr/TSR5E8PM (32078 KB RAR / unpacked size 243425713 bytes) | |||
**MD5 hashes generated with quickSFV http://pastebin.com/raw.php?i=ATvKyMRC | |||
**CRC32 hashes generated with quickSFV http://pastebin.com/raw.php?i=40h6iMCA | |||
===lines.qrc=== | |||
{{lines.qrc}} | |||
===icons.qrc & icontex.qrc=== | |||
{{icons.qrc}} | {{icons.qrc}} | ||
{{icontex.qrc}} | {{icontex.qrc}} | ||
===rhm.qrc & raf.qrc=== | |||
=== rhm.qrc & raf.qrc === | |||
{{rhm.qrc}} | {{rhm.qrc}} | ||
{{raf.qrc}} | {{raf.qrc}} | ||
=== canyon.qrc & earth.qrc === | ===canyon.qrc & earth.qrc=== | ||
Music player visualizers (a.k.a. 'valley' and 'gaia') | |||
*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}} | {{canyon.qrc}} | ||
{{earth.qrc}} | {{earth.qrc}} | ||
=== store.qrc === | ===store.qrc=== | ||
{{store.qrc}} | {{store.qrc}} | ||
== QRC | ==File formats inside QRC containers== | ||
See [[Multimedia Formats and Tools]] page for a general description of DDS, GTF, BMP, TGA, | 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] | *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] | ||
Line 55: | Line 118: | ||
*TGA (Targa) | *TGA (Targa) | ||
*JPEG (Joint Photographic Experts Group) | *JPEG (Joint Photographic Experts Group) | ||
===FPO & VPO=== | |||
*FPO (Fragment Program Objects) | *FPO (Fragment Program Objects) | ||
*VPO (Vertex Program Objects) | *VPO (Vertex Program Objects) | ||
This files are [https://en.wikipedia.org/wiki/Cg_(programming_language) Cg shaders] created by the Cg compiler ('''sce-cgc.exe'''), and are compatible with the Cg disassembler ('''sce-cgcdisasm.exe''') from [[SCEI PS3 SDK]] | |||
See: [http://games.soc.napier.ac.uk/resources/ps3/ps3_tutorial_004.pdf Introduction to GCM and PS3 graphics] (pages 4 and 5), and [https://arxiv.org/ftp/cs/papers/0302/0302013.pdf Cg in Two Pages] | |||
*''' | *The compiler acepts 2 arguments: | ||
*''' | **'''-p''': For the PS3 RSX is needed to use the profiles: '''sce_fp_rsx''' (to compile a fragment shader and create a FPO file), or '''sce_vp_rsx''' (to compile a vertex shader and create a VPO file) | ||
**'''-o''': the output filename | |||
== | {{Boxcode|content=<syntaxhighlight lang="c"> | ||
// input_fshader.cg | |||
void main | |||
( | |||
float4 color_in : COLOR, | |||
out float4 color_out : COLOR | |||
) | |||
{ | |||
color_out = color_in; | |||
} | |||
</syntaxhighlight>}} | |||
{{keyboard|content=C:\usr\local\cell\host-win32\Cg\bin\sce-cgc.exe -p sce_fp_rsx -o OUTPUT.FPO input_fshader.cg}} | |||
== | {{Boxcode|content=<syntaxhighlight lang="c"> | ||
// input_vshader.cg | |||
void main | |||
( | |||
float4 position : POSITION, | |||
float4 color : COLOR, | |||
uniform float4x4 modelViewProj, | |||
out float4 oPosition : POSITION, | |||
out float4 oColor : COLOR | |||
) | |||
{ | |||
oPosition = position; | |||
oColor = color; | |||
} | |||
</syntaxhighlight>}} | |||
{{keyboard|content=C:\usr\local\cell\host-win32\Cg\bin\sce-cgc.exe -p sce_vp_rsx -o OUTPUT.VPO input_vshader.cg}} | |||
*''' | *Notes/speculation | ||
**The PS3 RSX Cg profiles ('''sce_fp_rsx''' & '''sce_vp_rsx''') probably are custom, but based in the [https://developer.nvidia.com/cg-profiles standard profiles] | |||
== External Links == | ==External Links== | ||
*QRC modding by eustolio: http://www.scenespain.net/foro/tutoriales-ps3/tutorial-xmb-custom-cambia-el-color-e-iconos-base-del-xmb/ (2011 may 29) | *QRC modding by eustolio: http://www.scenespain.net/foro/tutoriales-ps3/tutorial-xmb-custom-cambia-el-color-e-iconos-base-del-xmb/ (2011 may 29) | ||
**Corrections: None :) | **Corrections: None :) |