Qt Resource Container (QRC): Difference between revisions

From PS3 Developer wiki
Jump to navigation Jump to search
m (Sandungas moved page QGL modding to Qt Resource Container (QRC) without leaving a redirect: QRC is the file extension, and we are also documenting the original files/structure not just mods of them)
(No difference)

Revision as of 09:07, 28 October 2013

location: /dev_flash/vsh/resource/qgl

General format

QGL (Qt Graphics Library) based in Qt framework and OpenGL

QRCC

QRCC (Qt Resources Container Compressed)

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  51 52 43 43 00 00 28 00                          QRCC..z`
Name Offset Size Example Remark
Magic header 0x00 0x04 51 52 43 43 'QRCC'
size of ZLIB unpacked (QRCF) file 0x04 0x04 00 00 28 00

QRCF

QRCF (Qt Resources Container F?)

QRC "container" with an structure similar than themes .p3t

Main Header

  • 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  51 52 43 46  00 00 01 10  00 00 00 40  00 00 02 CC  QRCF.......@..%|
00000010  00 00 03 10  00 00 01 2B  00 00 04 40  00 00 00 1B  ..%À......9Ð....
00000020  00 00 04 60  00 00 00 00  00 00 04 60  00 00 00 00  ..9ð......9ð....
00000030  00 00 04 60  00 00 23 A0  00 00 00 00  00 00 00 00..9ð..@p........
Name Offset Size Example Remark
Magic 0x00 0x04 51 52 43 46 'QRCF'
Version 0x04 0x04 00 00 01 10
Data table start offset 0x08 0x04 00 00 00 40
Data table size 0x0C 0x04 00 00 02 CC
Filename table start offset 0x10 0x04 00 00 03 10
Filename table size 0x14 0x04 00 00 01 2B without the padding at the end
File table header start offset 0x18 0x04 00 00 04 40
File table header size 0x1C 0x04 00 00 00 1B without the padding at the end
File table start offset 0x20 0x04 00 00 04 60
Not used 0x24 0x04 00 00 00 00
File table start offset 0x28 0x04 00 00 04 60
Not used 0x2C 0x04 00 00 00 00
File table start offset 0x30 0x04 00 00 04 60
File table size 0x34 0x04 00 00 23 A0
Not used 0x38 0x04 00 00 00 00
Not used 0x3C 0x04 00 00 00 00

Data Table

Default entry size is 60 bytes (0x3C) but the first and last entries has a different size

Offset (without the 0x40 header in all qrc files) http://666kb.com/i/cib5c7q4y7rpcx9x1.gif

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: first entrance?
0x34 0x04 00 00 02 90 size body data table
0x38 0x04 00 00 00 0F similar all qrc files
0x3F 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: : second entrance?
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 similar all qrc files
0x5C 0x04 00 00 00 00 similar all qrc files
0x60 0x04 00 00 01 50 size of first file without padding
0x64 0x04 00 00 00 18 similar all qrc files
0x68 0x04 00 00 00 07 similar all qrc files
0x6C 0x08 00 00 00 00 00 00 00 00 similar all qrc files
0x74 0x04 00 00 00 0F 00 00 00 1B on icontex.qrc

Filename Table

Each entry is composed by:

Offset Length Example Name Notes
0x0 0x4 00000038 Data Table entry offset Same value than in the Data Table
0x4 variable lib/rhm/Clear.fpo File name
variable 0x1 00 NULL byte
  • The end of the table has a padding to align to 0x10 bytes

File Table

The table starts with 0x20 bytes, are always present in all the .qrc files

Offset(h) 00 01 02 03  04 05 06 07  08 09 0A 0B  0C 0D 0E 0F
00000440  71 72 63 00  66 69 6C 65  2D 74 61 62  6C 65 00 66  qrc.file-table.f
00000450  69 6C 65 00  73 72 63 00  69 64 00 00  00 00 00 00  ile.src.id......
  • Marked in red: padding to align to 0x10 bytes

After this, the files are concatenated in the same order than in the Filename Table

Mods

canyon.qrc

earth.qrc

icons.qrc

icontex.qrc

lines.qrc

raf.qrc

rhm.qrc

store.qrc

Tools

QGL

  • this tool can decompress a QRCC to QRCF and compress a QRCF to QRCC

https://raw.github.com/wargio/ps3tools/master/QGL.c (just run make to compile it)

Generic Tiny little extractor embedded DDS/MNU/JPG/MPO/PNG

  • Theses generic tiny little tools extract blindly & embedded files and are means to be tiny and independent. Heavily based on an MPO splitter by Christian Steinruecken.

http://rghost.net/49340892 (include Code-Compile-Credit. Drag and drop your file into them) & mirror links: http://mir.cr/0R78ED3U