PS3 RCOMAGE Mod 1.9 - Proper & Automated GIM to PNG conversion, Dump & Compile Files.

Discussion in 'Developer Tools' started by RandomDude, Mar 6, 2019.

  1. 388
    211
    97
    RandomDude

    RandomDude Member

    Joined:
    Dec 24, 2018
    Messages:
    388
    Likes Received:
    211
    Trophy Points:
    97
    Gender:
    Male
    Original RCO's have paddings when you recompile them they loose that padding, probably that causes a small loss in file size and non-identical hashes between original and recompiled rco's and combine that with header compression you can see a small difference in file size, that's nothing to worry about.

    I'm also pretty sure, a while back I've also found a glitch in rcomage using your sysconf.rco, Probably @sandungas might remember that

    Link to thread which I've found rcomage bug: https://www.psx-place.com/threads/rco-mage-dumping-rcos.21367/page-2#post-150676
     
    Last edited: Jan 4, 2020
  2. 7,525
    7,012
    797
    sandungas

    sandungas Moderator Developer

    Joined:
    Dec 31, 2014
    Messages:
    7,525
    Likes Received:
    7,012
    Trophy Points:
    797
    Location:
    Babylon 20xxE series
    You never explained well how it did look, but by reading what i said time ago in that thread...
    It seems you are talking about some "codes" that are used as standard characters, but loads an icon from inside the file imagefont.bin

    In the XML file generated by rcomage you are going to see them like an empty space, or an square that represents a missing character (usually called tofu)
    The PS3 firmware takes that codes and displays an icon, but in PC we cant display them like that
     
    DeViL303 and RandomDude like this.
  3. 388
    211
    97
    RandomDude

    RandomDude Member

    Joined:
    Dec 24, 2018
    Messages:
    388
    Likes Received:
    211
    Trophy Points:
    97
    Gender:
    Male
    Yes but I have tested a replica of those spaces in the rco as I've uploaded screenshot in that post and the PS3 didn't display anything and crashed. If I replaced that with any other character it works
     
  4. 7,525
    7,012
    797
    sandungas

    sandungas Moderator Developer

    Joined:
    Dec 31, 2014
    Messages:
    7,525
    Likes Received:
    7,012
    Trophy Points:
    797
    Location:
    Babylon 20xxE series
    Rcomage doesnt makes any conversion with that codes, are just treated as a text string and works fine
    Are used in the rco's from OFW and rcomage converts that rco's without problems (doesnt breaks that codes)
     
  5. 19
    0
    30
    template

    template Member

    Joined:
    Mar 26, 2016
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    30
    A solution to take into consideration the added images?
    I am trying to add an image but it is not included in the .rco after compilation.
     
  6. 7,525
    7,012
    797
    sandungas

    sandungas Moderator Developer

    Joined:
    Dec 31, 2014
    Messages:
    7,525
    Likes Received:
    7,012
    Trophy Points:
    797
    Location:
    Babylon 20xxE series
    You need to add a line for it in the main xml control file, under <imageTree>
     
  7. 19
    0
    30
    template

    template Member

    Joined:
    Mar 26, 2016
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    30
    Ah yes i forgot, thank you very much

    By cons i meet another concern: the image is good in .rco but displays a white square
    Here's what i did:

    Under <imageTree>:
    Code:
    <Image name="tex_ps3black" src="C:\Users\XXXXX\Desktop\Folder Test\images\tex_controller.gim" format="gim" compression="zlib" unknownByte="0" />
    Under <ObjectTree>:
    Code:
    <Plane name="impose_back_color" positionX="0" positionY="0" positionZ="0" colorScaleR="1" colorScaleG="1" colorScaleB="1" colorScaleA="1" sizeX="0" sizeY="0" sizeZ="0" sizeScaleX="0.6" sizeScaleY="0.6" sizeScaleZ="0.6" anchorMode="0x0" onInit="nothing" positionOverrideX="0xea010100" positionOverrideY="0x5000100" positionOverrideZ="0x0" sizeOverrideX="0x77030000" sizeOverrideY="0xaf000000" sizeOverrideZ="0x0" planeImage="image:tex_controller" planeResizeMode="0x0"></Plane>
    Unable to find a solution for hours of research
    The name of the image is correct as well as the directory but i still have a white square that appears
     
  8. 7,525
    7,012
    797
    sandungas

    sandungas Moderator Developer

    Joined:
    Dec 31, 2014
    Messages:
    7,525
    Likes Received:
    7,012
    Trophy Points:
    797
    Location:
    Babylon 20xxE series
    The images displayed in opaque white usually are caused because the settings you used to convert the image from PNG to GIM format

    The GIM format allows to use many different settings, in total there are 14 different ways to create a GIM file for PS3
    Just to show you an example... in this post i uploaded a "dummy collection" with the 14 GIM formats
    https://www.psx-place.com/threads/research-rcomage-psdevwiki-mod.17958/#post-170597

    Usually the first thing you need to do is to identify the GIM settings from the official GIM file you want to replace (and after that you create the custom image with the same GIM settings), this way you are 100% sure the GIM is correct and the firmware is going to load it fine, i wrote a tutorial about how to identify GIM settings here:
    https://www.psx-place.com/threads/research-rcomage-psdevwiki-mod.17958/#post-123800



    ------------------------------
    In this case it seems you are not replacing a official image (so there is no official GIM file to identify his settings)
    You are adding a new GIM... so you should use the GIM settings more frequently used in official firmware... you can achieve this by using the format -ps3rgba8888
     
    Last edited: Apr 16, 2020
    Berion and Algol like this.
  9. 19
    0
    30
    template

    template Member

    Joined:
    Mar 26, 2016
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    30
    I have read everything that has been said. Unfortunately i think i will make a mistake when switching from PNG to GIM. I put the corresponding file with -ps3rgba8888 but it is still white. I have absolutely no idea what it might have caused this problem. I specify that it is an image coming from an old .rco which I try to convert back into more recent .rco to make it compatible with the last CFW.

    I'm lost ...
     
  10. 7,525
    7,012
    797
    sandungas

    sandungas Moderator Developer

    Joined:
    Dec 31, 2014
    Messages:
    7,525
    Likes Received:
    7,012
    Trophy Points:
    797
    Location:
    Babylon 20xxE series
    Incase -ps3rgba8888 doesnt works you should try with -ps3dxt5... just because is the second more frequent GIM format used in official firmware

    And incase -ps3dxt5 doesnt works... well... you can continue trying with the other GIM settings (up to 14 GIM formats), but this is not going to assure you that at least one of them is going to work

    There are some special cases where it seems the .sprx associated with the .rco is adding some restrictions
    We dont know why it happens, one of the theories is the .sprx is reserving an specific size in the PS3 RAM... and when we add more images (or replace images by others with bigger size) we are exceeding the RAM size dedicated for that .rco and the result are white images

    Btw, the white images means that the real image has not been loaded at all... is actually a polygon (not an image) defined by the size and position used in the <plane> object

    This happens in impose_plugin.rco btw... not sure if this is the .rco file you are trying to modify ?
    There is a forum thread where we was talking a lot about this problem in impose_plugin.rco
    I dont remember the link right now though
     
    Last edited: Apr 16, 2020
  11. 19
    0
    30
    template

    template Member

    Joined:
    Mar 26, 2016
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    30
    Okay thank you for the clarification
    Suddenly i had a change: the image appears correctly but now it is the other images that appear in white only on the XMB. On the other hand if I launch a game or an application the images appear
     
  12. 7,525
    7,012
    797
    sandungas

    sandungas Moderator Developer

    Joined:
    Dec 31, 2014
    Messages:
    7,525
    Likes Received:
    7,012
    Trophy Points:
    797
    Location:
    Babylon 20xxE series
  13. 7,525
    7,012
    797
    sandungas

    sandungas Moderator Developer

    Joined:
    Dec 31, 2014
    Messages:
    7,525
    Likes Received:
    7,012
    Trophy Points:
    797
    Location:
    Babylon 20xxE series
    Yeah, that was one of the weird problems we was having too
    And is weird, if you change the order of the lines under <ImageTree> the results are very confusing... as far i remember the images that fails are others but is a bit random and not directly related with his position in the <ImageTree>
    Maybe is because his sizes... dunno... at that point we was too much confused and we could not imagine what was happening exactly :rolleyes:
     
  14. 19
    0
    30
    template

    template Member

    Joined:
    Mar 26, 2016
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    30
    I tried to change the order but nothing helped, it is either my image which is white or then it is the others :(
     
  15. 7,525
    7,012
    797
    sandungas

    sandungas Moderator Developer

    Joined:
    Dec 31, 2014
    Messages:
    7,525
    Likes Received:
    7,012
    Trophy Points:
    797
    Location:
    Babylon 20xxE series
    The only thing we deduced about changing the order under <ImageTree> is the results are different
    Some images that was displayed fine becomes white. And the other images that was white are displayed fine
    In plain words... changing the order "breaks" some images and "fixes" other images

    This is very important because if we find the reason why is happening maybe we could deduce the rules needed to follow when reordering them to prevent "breaking" other images
    But we dont know which rules applyes to this reordering, is very confusing
    If you start making tests using different orders and you find some rule that makes sense please tell

    One of the things you could do (theoretically... to free some RAM and to help with the reordering) is to delete the shadow images, there are 4
    I dont remember if someone tryed it though... maybe deleting this shadows is not going to change anything... so not sure
    Code:
    <Image name="tex_battery_shadow" src="Images\tex_battery_shadow.gim" format="gim" compression="zlib" unknownByte="0" />
    <Image name="tex_charge_arrow_shadow" src="Images\tex_charge_arrow_shadow.gim" format="gim" compression="zlib" unknownByte="0" />
    <Image name="tex_controller_shadow" src="Images\tex_controller_shadow.gim" format="gim" compression="zlib" unknownByte="0" />
    <Image name="tex_error_batsu_shadow" src="Images\tex_error_batsu_shadow.gim" format="gim" compression="zlib" unknownByte="0" />
    
    Code:
    <Plane name="impose_pad_battery_notice_icon_shadow"
    <Plane name="impose_pad_battery_notice_arrow_shadow"
    <Plane name="impose_pad_battery_notice_padicon_shadow"
    <Plane name="impose_pad_battery_notice_error_shadow"
    
     
    Last edited: Apr 16, 2020
  16. 19
    0
    30
    template

    template Member

    Joined:
    Mar 26, 2016
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    30
    Removing the shadows freeze when a simple press on the PS button
     
  17. 7,525
    7,012
    797
    sandungas

    sandungas Moderator Developer

    Joined:
    Dec 31, 2014
    Messages:
    7,525
    Likes Received:
    7,012
    Trophy Points:
    797
    Location:
    Babylon 20xxE series
    Hmmm, i just had another idea... is the kind of thing that im not so sure if is genious or stupid
    The idea is to add a dummy in between the images under <ImageTree>
    This is the official <ImageTree> of impose_plugin.rco
    Code:
    <ImageTree>
    	<Image name="tex_battery" src="Images\tex_battery.gim" format="gim" compression="zlib" unknownByte="0" />
    	<Image name="tex_battery_shadow" src="Images\tex_battery_shadow.gim" format="gim" compression="zlib" unknownByte="0" />
    	<Image name="tex_charge_arrow" src="Images\tex_charge_arrow.gim" format="gim" compression="zlib" unknownByte="0" />
    	<Image name="tex_charge_arrow_shadow" src="Images\tex_charge_arrow_shadow.gim" format="gim" compression="zlib" unknownByte="0" />
    	<Image name="tex_controller" src="Images\tex_controller.gim" format="gim" compression="zlib" unknownByte="0" />
    	<Image name="tex_controller_shadow" src="Images\tex_controller_shadow.gim" format="gim" compression="zlib" unknownByte="0" />
    	<Image name="tex_error_batsu" src="Images\tex_error_batsu.gim" format="gim" compression="zlib" unknownByte="0" />
    	<Image name="tex_error_batsu_shadow" src="Images\tex_error_batsu_shadow.gim" format="gim" compression="zlib" unknownByte="0" />
    	<Image name="tex_controller_number" src="Images\tex_controller_number.gim" format="gim" compression="zlib" unknownByte="0" />
    	<Image name="tex_red" src="Images\tex_red.gim" format="gim" compression="zlib" unknownByte="0" />
    </ImageTree>
    
    And im suggesting to do this (note the dummy.gim is the same file for rcomage, but is added to the rco several times with different names
    Code:
    <ImageTree>
    	<Image name="dummy00" src="Images\dummy.gim" format="gim" compression="zlib" unknownByte="0" />
    	<Image name="tex_battery" src="Images\tex_battery.gim" format="gim" compression="zlib" unknownByte="0" />
    	<Image name="dummy01" src="Images\dummy.gim" format="gim" compression="zlib" unknownByte="0" />
    	<Image name="tex_battery_shadow" src="Images\tex_battery_shadow.gim" format="gim" compression="zlib" unknownByte="0" />
    	<Image name="dummy02" src="Images\dummy.gim" format="gim" compression="zlib" unknownByte="0" />
    	<Image name="tex_charge_arrow" src="Images\tex_charge_arrow.gim" format="gim" compression="zlib" unknownByte="0" />
    	<Image name="dummy03" src="Images\dummy.gim" format="gim" compression="zlib" unknownByte="0" />
    	<Image name="tex_charge_arrow_shadow" src="Images\tex_charge_arrow_shadow.gim" format="gim" compression="zlib" unknownByte="0" />
    	<Image name="dummy04" src="Images\dummy.gim" format="gim" compression="zlib" unknownByte="0" />
    	<Image name="tex_controller" src="Images\tex_controller.gim" format="gim" compression="zlib" unknownByte="0" />
    	<Image name="dummy05" src="Images\dummy.gim" format="gim" compression="zlib" unknownByte="0" />
    	<Image name="tex_controller_shadow" src="Images\tex_controller_shadow.gim" format="gim" compression="zlib" unknownByte="0" />
    	<Image name="dummy06" src="Images\dummy.gim" format="gim" compression="zlib" unknownByte="0" />
    	<Image name="tex_error_batsu" src="Images\tex_error_batsu.gim" format="gim" compression="zlib" unknownByte="0" />
    	<Image name="dummy07" src="Images\dummy.gim" format="gim" compression="zlib" unknownByte="0" />
    	<Image name="tex_error_batsu_shadow" src="Images\tex_error_batsu_shadow.gim" format="gim" compression="zlib" unknownByte="0" />
    	<Image name="dummy08" src="Images\dummy.gim" format="gim" compression="zlib" unknownByte="0" />
    	<Image name="tex_controller_number" src="Images\tex_controller_number.gim" format="gim" compression="zlib" unknownByte="0" />
    	<Image name="dummy09" src="Images\dummy.gim" format="gim" compression="zlib" unknownByte="0" />
    	<Image name="tex_red" src="Images\tex_red.gim" format="gim" compression="zlib" unknownByte="0" />
    	<Image name="dummy10" src="Images\dummy.gim" format="gim" compression="zlib" unknownByte="0" />
    </ImageTree>
    
     
    jeka26 likes this.
  18. 19
    0
    30
    template

    template Member

    Joined:
    Mar 26, 2016
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    30
    I don't know if that can help you but PS3 Pro Mod manages it very well
    I just need to keep the PS3 image in black, no need for the other modified images
     

    Attached Files:

  19. 7,525
    7,012
    797
    sandungas

    sandungas Moderator Developer

    Joined:
    Dec 31, 2014
    Messages:
    7,525
    Likes Received:
    7,012
    Trophy Points:
    797
    Location:
    Babylon 20xxE series
    As far i remember @LuanTeles replaced some shadow images by dummies, and eventually the way how he was reordering them under <ImageTree> displayed all them fine
    But he didnt mentioned any rule we can follow... it looks he was using classic "test and error" approach
     
  20. 7,525
    7,012
    797
    sandungas

    sandungas Moderator Developer

    Joined:
    Dec 31, 2014
    Messages:
    7,525
    Likes Received:
    7,012
    Trophy Points:
    797
    Location:
    Babylon 20xxE series
    I think i know why it happened, a lot of the .sprx (or maybe all them, not sure) have the structure of <ObjectTree> from the .rco hardcoded inside the .sprx
    In plain words... the .sprx is going to search inside the .rco for the objects under <ObjectTree> in his original positions
    We can add objects (always at bottom to dont displace the officials) but we cant reorder, delete, or rename the officials

    What broke the rco in that test was deleting the <plane> objects... is needed to keep them... but we can make then to load a dummy from <ImageTree>
    And we can replace in the <plane> the value responsible to load the <Image> from <ImageTree> so it will be displayed as a polygon (without image) by using planeImage="nothing"
    And we can "hide" the polygon created by the <plane> too by changing the "color" (the value of alpha channel)
     
    Last edited: Apr 16, 2020

Share This Page