Editing Graphic Image Map (GIM)

Jump to navigation Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

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 2: Line 2:


=Description=
=Description=
'''G'''raphic '''I'''mage '''M'''ap ? ('''GIM''') is an image format that allows for lot of different settings that results in lot of different GIM files that are structurally different, strictly speaking the GIM format is always the same, but generally speaking it can be said that this different GIM files are "GIM formats", the amount of GIM formats supported by PlayStation consoles is limited though (restricted by the graphic enviroment, libraries, etc...). GIM files was found in PSP and PS3 firmwares inside [[Resource Container (RCO)]] files, [[PlayStation 3 Theme (P3T)]] files, etc... See [[GimConv]] and [[Multimedia Formats and Tools#GIM]]
'''G'''raphic '''I'''mage '''M'''ap ? ('''GIM''') is an image format, allows for tenths of different storage settings and by combining settings results in hundreds (or thousands) of different GIM files that are structurally different, to simplify concepts people is naming this different GIM files as "GIM formats" but strictly speaking the GIM format is always the same, the amount of GIM formats used in PlayStation consoles is limited though (restricted by the graphic enviroment, libraries, etc...). GIM files was found used in PSP and PS3 firmwares inside [[Resource Container (RCO)]] files, [[PlayStation 3 Theme (P3T)]] files, etc... See [[GimConv]] and [[Multimedia Formats and Tools#GIM]]


The meaning of the "GIM" acronym used in this wiki ('''G'''raphic '''I'''mage '''M'''ap) is an speculative unnofficial name based in how the data is stored in the internal GIM structure, if someone finds the official codename please report back and we will change it<!-- no luck on facebook https://www.facebook.com/hhhhhyuk? -->
The acronym of GIM used in this wiki ('''G'''raphic '''I'''mage '''M'''ap) is an speculative unnofficial name based in how the data is stored in the internal GIM structure, if someone finds the official codename somewhere please report back and we will change it <!-- no luck on facebook https://www.facebook.com/hhhhhyuk? -->


=Structure=
=Structure=
*Overview (4 unknown values left, marked in intense red)
*Overview (4 unknown values left, marked in red color)
  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
   
   
Line 17: Line 17:
  00000050  <span style="background:#b49aed;">00 01</span> <span style="background:#FF4444;">00 02</span> <span style="background:#FF4444;">00 00 00 00</span> <span style="background:#CA2691;">00 00 00 30</span> <span style="background:#CA2691;">00 00 00 40</span>  ...........0...@              <- Block 0x04 Data
  00000050  <span style="background:#b49aed;">00 01</span> <span style="background:#FF4444;">00 02</span> <span style="background:#FF4444;">00 00 00 00</span> <span style="background:#CA2691;">00 00 00 30</span> <span style="background:#CA2691;">00 00 00 40</span>  ...........0...@              <- Block 0x04 Data
  00000060  <span style="background:#CA2691;">00 00 00 60</span> <span style="background:#009933;">00 00 00 00</span> <span style="background:#33cc33; color:#ffffff;">00 01</span> <span style="background:#33cc33;">00 01</span> <span style="background:#4dff4d; color:#ffffff;">00 03</span> <span style="background:#4dff4d;">00 01</span>  ...`............              <- Block 0x04 Data
  00000060  <span style="background:#CA2691;">00 00 00 60</span> <span style="background:#009933;">00 00 00 00</span> <span style="background:#33cc33; color:#ffffff;">00 01</span> <span style="background:#33cc33;">00 01</span> <span style="background:#4dff4d; color:#ffffff;">00 03</span> <span style="background:#4dff4d;">00 01</span>  ...`............              <- Block 0x04 Data
  00000070  <span style="background:#555555; color:#ffffff;">00 00 00 40</span> <span style="background:#D3D3D3;">00 00 00 00 00 00 00 00 00 00 00 00</span>  ...@............              <- Block 0x04 Index
  00000070  <span style="background:#666666; color:#ffffff;">00 00 00 40</span> <span style="background:#aaaaaa;">00 00 00 00 00 00 00 00 00 00 00 00</span>  ...@............              <- Block 0x04 Index
  00000080  <span style="background:#CA5E24;">CA 5E 11 00 CA 5E 12 00 CA 5E 13 00 CA 5E 14 00</span>  Ê^..Ê^..Ê^..Ê^..                <- Block 0x04 Frame
  00000080  <span style="background:#CA5E24;">CA 5E 11 00 CA 5E 12 00 CA 5E 13 00 CA 5E 14 00</span>  Ê^..Ê^..Ê^..Ê^..                <- Block 0x04 Frame
  00000090  <span style="background:#CA5E24;">CA 5E 21 00 CA 5E 22 00 CA 5E 23 00 CA 5E 24 00</span>  Ê^!.Ê^".Ê^#.Ê^$.                <- Block 0x04 Frame
  00000090  <span style="background:#CA5E24;">CA 5E 21 00 CA 5E 22 00 CA 5E 23 00 CA 5E 24 00</span>  Ê^!.Ê^".Ê^#.Ê^$.                <- Block 0x04 Frame
Line 25: Line 25:
  000000D0  <span style="background:#ddbb99;">74 6F 72 00</span> <span style="background:#eeccaa;">53 75 6E 20 41 70 72 20 31 35 20 30</span>  tor.Sun Apr 15 0          <- Block 0xFF Strings
  000000D0  <span style="background:#ddbb99;">74 6F 72 00</span> <span style="background:#eeccaa;">53 75 6E 20 41 70 72 20 31 35 20 30</span>  tor.Sun Apr 15 0          <- Block 0xFF Strings
  000000E0  <span style="background:#eeccaa;">31 3A 32 35 3A 30 32 20 32 30 31 38 00</span> <span style="background:#ffddbb;">47 69 6D</span>  1:25:02 2018.Gim          <- Block 0xFF Strings
  000000E0  <span style="background:#eeccaa;">31 3A 32 35 3A 30 32 20 32 30 31 38 00</span> <span style="background:#ffddbb;">47 69 6D</span>  1:25:02 2018.Gim          <- Block 0xFF Strings
  000000F0  <span style="background:#ffddbb;">43 6F 6E 76 20 31 2E 32 30 68 00</span> <span style="background:#D3D3D3;">00</span>              Conv 1.20h..              <- Block 0xFF Strings
  000000F0  <span style="background:#ffddbb;">43 6F 6E 76 20 31 2E 32 30 68 00</span> <span style="background:#aaaaaa;">00</span>              Conv 1.20h..              <- Block 0xFF Strings


==GIM header==
==GIM header==
Line 66: Line 66:
===0x03 (Picture)===
===0x03 (Picture)===
Is the parent of block 0x04 (Image) and block 0x05 (Palette)
Is the parent of block 0x04 (Image) and block 0x05 (Palette)
*Experimental notes
*Experimental notes
**This block is repeated when using the option '''merge_mode''' = picture
**This block is repeated when using the option '''merge_mode''' = picture
Line 71: Line 72:
===0x04 (Image)===
===0x04 (Image)===
The image block contains some info about the image, and the pixel color info at bottom stored as '''levels''' or '''frames'''
The image block contains some info about the image, and the pixel color info at bottom stored as '''levels''' or '''frames'''
*Experimental notes
*Experimental notes
**This block is repeated when using the option '''merge_mode''' = image
**This block is repeated when using the option '''merge_mode''' = image
Line 96: Line 98:
| 0x0A || 0x02 || 00 02 || {{cellcolors|#6144c7}} '''height''' || Image/palette height in pixels || Restricted by '''limit_image_height''' in [[GimConv]].cfg<br>'''Height''' in the GIS
| 0x0A || 0x02 || 00 02 || {{cellcolors|#6144c7}} '''height''' || Image/palette height in pixels || Restricted by '''limit_image_height''' in [[GimConv]].cfg<br>'''Height''' in the GIS
|-
|-
| 0x0C || 0x02 || 00 20 || {{cellcolors|#826ad5}} '''bpp_align''' || Image/palette <abbr title="RSX memory alignment ?. This value is used to navigate the GIM structure, doesnt represents the color depth of the image, for indexed colors is used as a counter to know how many color ID there are in the palette">alignment BPP</abbr> ||  
| 0x0C || 0x02 || 00 20 || {{cellcolors|#826ad5}} '''bpp_align''' || Image/palette bits per pixel <abbr title="this value is used tto navigate the GIM structure, doesnt represents the color depth of the image, for indexed colors is used as a counter to know how many color ID there are in the palette">alignment</abbr> ||  
|-
|-
| 0x0E || 0x02 || 00 10 || {{cellcolors|#b49aed}} '''pitch_align''' || Image/palette <abbr title="RSX memory alignment ?">alignment X</abbr> || '''PitchAlign''' in the GIS
| 0x0E || 0x02 || 00 10 || {{cellcolors|#b49aed}} '''pitch_align''' || Image/palette X alignment || '''PitchAlign''' in the GIS
|-
|-
| 0x10 || 0x02 || 00 01 || {{cellcolors|#b49aed}} '''height_align''' || Image/palette <abbr title="RSX memory alignment ?">alignment Y</abbr> || '''HeightAlign''' in the GIS
| 0x10 || 0x02 || 00 01 || {{cellcolors|#b49aed}} '''height_align''' || Image/palette Y alignment || '''HeightAlign''' in the GIS
|-
|-
| 0x12 || 0x02 || 00 02 || {{cellcolors|#FF4444}} <abbr title="block 0x04 and 0x05 unknown 2">''b45_unk2''</abbr> || ? || <abbr title="Filling this area with 0xFF doesnt causes any change">Ignored ?</abbr>
| 0x12 || 0x02 || 00 02 || {{cellcolors|#FF4444}} <abbr title="block 0x04 and 0x05 unknown 2">''b45_unk2''</abbr> || ? || <abbr title="Filling this area with 0xFF doesnt causes any change">Ignored ?</abbr>
Line 128: Line 130:
| 0x30 || <abbr title="max lenght not verifyed">''any''</abbr> || {{cellcolors|lightgrey|#000000|center}} ''N/A'' || {{cellcolors|#aa8866}} '''user_data''' || Optional User Data area || Enabled by '''update_userdata = on''' in [[GimConv]].cfg. Stores the contents of '''<filename>.dat'''
| 0x30 || <abbr title="max lenght not verifyed">''any''</abbr> || {{cellcolors|lightgrey|#000000|center}} ''N/A'' || {{cellcolors|#aa8866}} '''user_data''' || Optional User Data area || Enabled by '''update_userdata = on''' in [[GimConv]].cfg. Stores the contents of '''<filename>.dat'''
|-
|-
| <abbr title="block_data_leght + user_data length">''varies''</abbr> || <abbr title="0 up to 3">''varies''</abbr> || {{cellcolors|lightgrey|#000000|center}} ''N/A'' || {{cellcolors|#D3D3D3}} ''padding''  || Optional padding || To align '''user_data''' to 4 bytes
| <abbr title="block_data_leght + user_data length">''varies''</abbr> || <abbr title="0 up to 3">''varies''</abbr> || {{cellcolors|lightgrey|#000000|center}} ''N/A'' || {{cellcolors|#aaaaaa}} ''padding''  || Optional padding || To align '''user_data''' to 4 bytes
|}
|}


  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
   
   
  00000070  <span style="background:#555555; color:#ffffff;">00 00 00 40</span> <span style="background:#D3D3D3;">00 00 00 00 00 00 00 00 00 00 00 00</span>  ...@............
  00000070  <span style="background:#666666; color:#ffffff;">00 00 00 40</span> <span style="background:#aaaaaa;">00 00 00 00 00 00 00 00 00 00 00 00</span>  ...@............


{| class="wikitable" style="font-size:small;"
{| class="wikitable" style="font-size:small;"
Line 139: Line 141:
! Offset !! Length !! Example !! Name !! Description !! Notes
! Offset !! Length !! Example !! Name !! Description !! Notes
|-
|-
| 0x30 || 0x04 || 00 00 00 40 || {{cellcolors|#555555|#ffffff}} '''frame_n_offset''' || Where <n> is the frame number || This entry is repeated one time for every '''level_count''' or '''frame_count'''
| 0x30 || 0x04 || 00 00 00 40 || {{cellcolors|#666666|#ffffff}} '''frame_n_offset''' || Where <n> is the frame number || This entry is repeated one time for every '''level_count''' or '''frame_count'''
|-
|-
| <abbr title="block data size + userdata size + userdata padding + (index n entries * 4)">0x34</abbr> || <abbr title="0 up to 0x0C">0x0C</abbr> || <abbr title="00 00 00 00 00 00 00 00 00 00 00 00">00 00 00 ...</abbr> || {{cellcolors|#D3D3D3}} ''padding''  || Optional padding || To align the block to 16 bytes
| <abbr title="block data size + userdata size + userdata padding + (index n entries * 4)">0x34</abbr> || <abbr title="0 up to 0x0C">0x0C</abbr> || <abbr title="00 00 00 00 00 00 00 00 00 00 00 00">00 00 00 ...</abbr> || {{cellcolors|#aaaaaa}} ''padding''  || Optional padding || To align the block to 16 bytes
|}
|}


After this index comes the planes/levels/frames (the bytes with pixels color info), are one or several images concatenated, for experimental purposes can be added manually by using [[GimConv]].cfg setting '''merge_mode''' with values '''frame''' and '''level''', and probably '''plane''' too, see {{talk}} page
After this index comes the planes/levels/frames (the bytes with pixels color info), are one or several images concatenated, for experimental purposes can be added manually by using [[GimConv]].cfg setting '''merge_mode''' with values '''frame''' and '''level''', and probably '''plane''' too


  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
Line 150: Line 152:
  00000080  <span style="background:#CA5E24;">CA 5E 11 00 CA 5E 12 00 CA 5E 13 00 CA 5E 14 00</span>  Ê^..Ê^..Ê^..Ê^..
  00000080  <span style="background:#CA5E24;">CA 5E 11 00 CA 5E 12 00 CA 5E 13 00 CA 5E 14 00</span>  Ê^..Ê^..Ê^..Ê^..
  00000090  <span style="background:#CA5E24;">CA 5E 21 00 CA 5E 22 00 CA 5E 23 00 CA 5E 24 00</span>  Ê^!.Ê^".Ê^#.Ê^$.
  00000090  <span style="background:#CA5E24;">CA 5E 21 00 CA 5E 22 00 CA 5E 23 00 CA 5E 24 00</span>  Ê^!.Ê^".Ê^#.Ê^$.
IMAGE_INDEX
IMAGE_PLANE
IMAGE_LEVEL
IMAGE_FRAME
PALETTE_INDEX
PALETTE_LEVEL
PALETTE_FRAME


===0x05 (Palette)===
===0x05 (Palette)===
Line 173: Line 184:
  000000D0  <span style="background:#ddbb99;">74 6F 72 00</span> <span style="background:#eeccaa;">53 75 6E 20 41 70 72 20 31 35 20 30</span>  tor.Sun Apr 15 0
  000000D0  <span style="background:#ddbb99;">74 6F 72 00</span> <span style="background:#eeccaa;">53 75 6E 20 41 70 72 20 31 35 20 30</span>  tor.Sun Apr 15 0
  000000E0  <span style="background:#eeccaa;">31 3A 32 35 3A 30 32 20 32 30 31 38 00</span> <span style="background:#ffddbb;">47 69 6D</span>  1:25:02 2018.Gim
  000000E0  <span style="background:#eeccaa;">31 3A 32 35 3A 30 32 20 32 30 31 38 00</span> <span style="background:#ffddbb;">47 69 6D</span>  1:25:02 2018.Gim
  000000F0  <span style="background:#ffddbb;">43 6F 6E 76 20 31 2E 32 30 68 00</span> <span style="background:#D3D3D3;">00</span>              Conv 1.20h..
  000000F0  <span style="background:#ffddbb;">43 6F 6E 76 20 31 2E 32 30 68 00</span> <span style="background:#aaaaaa;">00</span>              Conv 1.20h..


{| class="wikitable" style="font-size:small;"
{| class="wikitable" style="font-size:small;"
Line 186: Line 197:
|-
|-
| 0x3D || 0x0E || GimConv 1.20h || {{cellcolors|#ffddbb}} '''originator''' || GimConv version || '''Originator''' in the GIS
| 0x3D || 0x0E || GimConv 1.20h || {{cellcolors|#ffddbb}} '''originator''' || GimConv version || '''Originator''' in the GIS
|-
|-{{cellcolors|lightgrey}}
| 0x4B || <abbr title="0 up to 3">0x01</abbr> || 00 || {{cellcolors|#D3D3D3}} ''padding'' || Optional padding || To align '''fileinfo''' block to 4 bytes
| 0x4B || 0x01 || 00 || {{cellcolors|#aaaaaa}} ''padding'' || Optional padding to align the block to 4 bytes ||
|}
|}


Please note that all contributions to PS3 Developer wiki are considered to be released under the GNU Free Documentation License 1.2 (see PS3 Developer wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To protect the wiki against automated edit spam, we kindly ask you to solve the following hCaptcha:

Cancel Editing help (opens in new window)