GimConv: Difference between revisions

From PS3 Developer wiki
Jump to navigation Jump to search
(reordered)
mNo edit summary
Line 7: Line 7:
*Other notes:
*Other notes:
**[http://us.playstation.com/support/manuals/psp/pspguides/ PSP Custom Theme Toolbox] admits .GIM files as input, but doesnt includes a gim converter
**[http://us.playstation.com/support/manuals/psp/pspguides/ PSP Custom Theme Toolbox] admits .GIM files as input, but doesnt includes a gim converter
**Note the option '''-viewer (start gimview.exe when process ends)''' in the config file points to an official gim viewer that doesnt exists in the public release
**The option '''-viewer (start gimview.exe when process ends)''' in the config file points to an official gim viewer that doesnt exists in the public release
**Speculation about animated images support http://endlessparadigm.com/forum/showthread.php?tid=5054
**Speculation about animated images support http://endlessparadigm.com/forum/showthread.php?tid=5054


Line 13: Line 13:


==GimConv.exe==
==GimConv.exe==
By specifying a group of options from command line (using the names that appears in the help screen or using the names that appears inside the GimConv.cfg file)
By specifying a group of options from command line (using the names that appears in the help screen, or using the names that appears inside the GimConv.cfg file)
{{Keyboard|content='''gimconv.exe tex_psn.png -o tex_psn.gim --DXT'''}}
{{Keyboard|content='''gimconv.exe tex_psn.png -o tex_psn.gim --DXT'''}}


Line 277: Line 277:


===Custom configurations===
===Custom configurations===
The configuration file allows to modify the ''help'' screen of the command line, and to add your own options that can be conposed of groups of settings, there is no need at all to do this (because doesnt really enables any new funcionallity) but is good to keep a record of the most common used formats for a console, also because allows to use cutom names for the options is posible to label them
The configuration file allows to modify the ''help'' screen of the command line, and to add your own options that can be conposed of groups of settings, there is no need at all to do this (because doesnt really enables any new funcionallity) but is good to keep a record of the most common used formats for a console, also because allows to use cutom names so is posible to label them with an intuitive name that defines his format


The config file supplyed by rcomage contains some custom options for the formats used in PSP, it also had some default settings changed (that doesnt really affects much to the usage for PS3), and it also had one group of options added for PS3 (labeled '''-ps3''' at this time) but this group seems to use wrong options
The config file supplyed by rcomage contains some custom options for the formats used in PSP, some default settings changed that was common for PSP (that doesnt really affects much to the usage for PS3), and it also had one group of options added for PS3 (labeled '''-ps3''' at this time) but this group seems to use wrong options


This wiki section proposes some new groups with new label names (to be able to use a new modifyed config file without breaking the compatibility of other tools that uses rcomage as a dependency)
This wiki section proposes some new groups with new label names (to be able to use a new modifyed config file without breaking the compatibility of other tools that uses rcomage as a dependency)


The label names doesnt makes sense at this point, feel free to add more groups of settings following this same method and use any label name, also add some info
The label names doesnt makes sense at this point, feel free to add more groups of settings with any label name following this same method, also add some info abot how many images uses this format (if posible)


*The images inside [[explore_plugin]]_full.rco from firmware 4.70 has been made by using this 3 options (only verifyed for tex_psn.gim)
*The images inside [[explore_plugin]]_full.rco from firmware 4.70 has been made by using this 3 options (only verifyed for tex_psn.gim)
Line 303: Line 303:
=How to identify GIM settings=
=How to identify GIM settings=
*To identify the settings that was used to build a GIM file:
*To identify the settings that was used to build a GIM file:
**Use rcomage to make an extraction of the contents '''without''' conversion of images (this way the GIM are extracted raw)
**Use rcomagegui to make an extraction of the contents '''without''' conversion of images (this way the GIM are extracted raw)
**Use rcomage to make another extraction of the contents '''with''' conversion of images (this way the images are converted to PNG when extracted)
**Use rcomagegui to make another extraction of the contents '''with''' conversion of images (this way the images are converted to PNG when extracted)
**Use gimconv to convert the PNG ---to---> GIM by the old method of test-error by trying some of the options availables that appears in gimonv.cfg
**Use gimconv to convert a PNG ---to---> GIM by the old method of test-error by trying some of the options availables that appears in gimonv.cfg
**Use a hexeditor to compare the original GIM extracted in step 1 with the rebuilt GIM from your test, there is no need to make accurate comparisons, just an overview of how the data is ordered
**Use a hexeditor to compare the original GIM extracted in step 1 with the rebuilt GIM from your test, there is no need to make accurate comparisons, just an overview of the first 0x80 bytes of the header, and how the pixel data is ordered starting at offset 0x80
**When the data seems similar, make a hash comparison of both, original and rebuild should be exactly the same data (is posible to create a GIM exactly like the original)
**When the header and pixel data seems similar make a hash comparison, original GIM and rebuild GIM should be exactly the same hash (is posible to create a GIM exactly like the original)


=GIM formats used in PS3=
=GIM formats used in PS3=
Has been said [http://endlessparadigm.com/forum/showthread.php?tid=19501&pid=350611#pid350611 here] that PS3 uses at least 2 types of GIM images, both included inside rco's, and in some cases both types in the same rco
Has been said [http://endlessparadigm.com/forum/showthread.php?tid=19501&pid=350611#pid350611 here] that PS3 uses at least 2 types of GIM images, both included inside rco's, and in some cases both types in the same rco


If an rco contains 2 or more images that was created with different gim settings... it means is not posible to compile this .rco with rcomage by using .png images as source (because rcomage.exe needs to pass some gim settings to gimconv.exe and this settings are applyed to all png images when doing the png--->gim conversion)
If an rco contains 2 or more images that was created with different gim settings... it means is not posible to compile this .rco with rcomage by using .png images as source (because rcomage.exe needs to pass some gim settings to gimconv.exe to make the png--->gim conversion and this settings are applyed to all png)


In other words, the only way to compile this rco's is in 2 steps, first is needed to make the different gim conversions with comconv.exe (and all the other conversions in case exists vag audio or a vsmx script), and then is needed to compile the .rco with rcomage.exe by using the gims as source
In other words, the only way to compile this rco's is in 2 steps, first is needed to make the different gim conversions with comconv.exe (and all the other conversions in case exists vag audio or a vsmx script), and then is needed to compile the .rco with rcomage.exe by using the gims as source
Line 328: Line 328:


==Speculation==
==Speculation==
Initially... it seems the gim format depends of who is the responsible of displaying them (as an example, in the link above it seems the images reported as "rare" belongs to "tex_indi_***" (are textures for the "indicator", is the information bar at top-right of xmb, are the tiny icons that appears eventually when you receive an email, etc..). Note also is posible to group them based in how his names starts (all "tex_indi" belongs to indicator so should share the same gim format, even if there are more "tex_indi" inside other rco's)
Initially... it seems the gim format depends of who is the responsible of displaying them (as an example, in the link above it seems the images reported as "rare" belongs to "tex_indi_***" (are textures for the "indicator", is the information bar at top-right of xmb, are the tiny icons that appears eventually when you receive a message, etc..)
 
Note is posible to group them based in how his names starts, all "tex_indi" belongs to indicator so should share the same gim format, even if there are more "tex_indi" inside other rco's, doesnt matters in wich .rco are located what matters is his purpose is the same (to be displayed inside the indicator)
 
{{File Formats}}
<noinclude>[[Category:Main]]</noinclude>

Revision as of 02:00, 4 March 2015

Description

GimConv v1.20h was released with p3tcompiler v2.00 as part of the PS3 Custom Theme Toolbox

It manages the GIM image conversions to use inside Resource Container (RCO) files, PlayStation 3 Theme (P3T) files, etc...

Usage

GimConv.exe

By specifying a group of options from command line (using the names that appears in the help screen, or using the names that appears inside the GimConv.cfg file)

Type This
'''gimconv.exe tex_psn.png -o tex_psn.gim --DXT'''

By specifying the options strictly from command line (using the names that appears inside the GimConv.cfg file) This is the most accurate way to specify options

Type This
'''gimconv.exe tex_psn.png -o tex_psn.gim --format_style psp --format_endian big --pixel_order normal'''

By passing GIM settings from rcomage.exe ---to---> gimconv.exe when compiling the .rco (see the "compile" help in rcomage page). There are 2 options in rcomage specific for this task, named: --gimconv-cmd and --gimconv-flags

Type This
rcomage.exe ...

GimConv.cfg

This is the original configuration file not modifyed, for more info about the modifications made in the config file supplyed with rcomage see the differences in the Discussion page

Code Sample

Custom configurations

The configuration file allows to modify the help screen of the command line, and to add your own options that can be conposed of groups of settings, there is no need at all to do this (because doesnt really enables any new funcionallity) but is good to keep a record of the most common used formats for a console, also because allows to use cutom names so is posible to label them with an intuitive name that defines his format

The config file supplyed by rcomage contains some custom options for the formats used in PSP, some default settings changed that was common for PSP (that doesnt really affects much to the usage for PS3), and it also had one group of options added for PS3 (labeled -ps3 at this time) but this group seems to use wrong options

This wiki section proposes some new groups with new label names (to be able to use a new modifyed config file without breaking the compatibility of other tools that uses rcomage as a dependency)

The label names doesnt makes sense at this point, feel free to add more groups of settings with any label name following this same method, also add some info abot how many images uses this format (if posible)

  • The images inside explore_plugin_full.rco from firmware 4.70 has been made by using this 3 options (only verifyed for tex_psn.gim)
Code Sample
  • Any other
Code Sample

How to identify GIM settings

  • To identify the settings that was used to build a GIM file:
    • Use rcomagegui to make an extraction of the contents without conversion of images (this way the GIM are extracted raw)
    • Use rcomagegui to make another extraction of the contents with conversion of images (this way the images are converted to PNG when extracted)
    • Use gimconv to convert a PNG ---to---> GIM by the old method of test-error by trying some of the options availables that appears in gimonv.cfg
    • Use a hexeditor to compare the original GIM extracted in step 1 with the rebuilt GIM from your test, there is no need to make accurate comparisons, just an overview of the first 0x80 bytes of the header, and how the pixel data is ordered starting at offset 0x80
    • When the header and pixel data seems similar make a hash comparison, original GIM and rebuild GIM should be exactly the same hash (is posible to create a GIM exactly like the original)

GIM formats used in PS3

Has been said here that PS3 uses at least 2 types of GIM images, both included inside rco's, and in some cases both types in the same rco

If an rco contains 2 or more images that was created with different gim settings... it means is not posible to compile this .rco with rcomage by using .png images as source (because rcomage.exe needs to pass some gim settings to gimconv.exe to make the png--->gim conversion and this settings are applyed to all png)

In other words, the only way to compile this rco's is in 2 steps, first is needed to make the different gim conversions with comconv.exe (and all the other conversions in case exists vag audio or a vsmx script), and then is needed to compile the .rco with rcomage.exe by using the gims as source

Also means we have a big problem to document in wiki wich settings are used for each image (there are thousands of images so initially seems not posible), but probably they follows a rule, so the solution is to deduce or imagine the real reason of why the ps3 is using different gim formats inside the .rco's

image group or rco gim settings notes
explore_plugin_full.rco (and other explore_plugin_***.rco ?) --format_style psp --format_endian big --pixel_order normal candidate to "standard" gim format for main xmb images
xmb_plugin_normal.rco (and other xmb_***.rco ?) ? uses some variant of dxt5 ?

Speculation

Initially... it seems the gim format depends of who is the responsible of displaying them (as an example, in the link above it seems the images reported as "rare" belongs to "tex_indi_***" (are textures for the "indicator", is the information bar at top-right of xmb, are the tiny icons that appears eventually when you receive a message, etc..)

Note is posible to group them based in how his names starts, all "tex_indi" belongs to indicator so should share the same gim format, even if there are more "tex_indi" inside other rco's, doesnt matters in wich .rco are located what matters is his purpose is the same (to be displayed inside the indicator)