PS3 Extended Theme kernel plugin

Discussion in 'PS3 Plugins (sprx)' started by Berion, Apr 3, 2019.

  1. 2,111
    1,998
    272
    Berion

    Berion Developer

    Joined:
    Feb 3, 2015
    Messages:
    2,111
    Likes Received:
    1,998
    Trophy Points:
    272
    Gender:
    Male
    Location:
    rom0:/
    So, since we have kernel modules support similar to Vita, and since we know much more about XMB XML/RCO/QTF maybe it is now possible to write plugin, which could redirect all calls to i.e RCO to other place like i.e dev_hdd0? PS3 support not only *.gim but also normal and easy to make/modify *.png, and even by default from outside flash. So this comes to my mind, that we (well, You dear reader :D) could create a plugin which somehow replace crippled P3T by something which could replace ALL system icons on the fly, including add ones ready to use by XML mods etc. icons (for HAN, CFW Toolbox, WMM and so on).

    Such themes would be easily distributed in PKG form, installed always in "dev_hdd0/theme_custom/" or always in "dev_hdd0/game/CUSTOMTHM/" to give user very easy way to uninstall it from XMB and install it by any method.

    All XMB mods should then point to one of those locations, and file names must be always the same (if we do not want add additional code for config file parser, enlarging plugin).

    Most benefit from it gain users which no longer needs to download/keeping large packages, and they could safe even some time.
     
  2. 3,089
    3,077
    372
    Joonie

    Joonie Developer

    Joined:
    Oct 15, 2014
    Messages:
    3,089
    Likes Received:
    3,077
    Trophy Points:
    372
    Location:
    Southwest US
    map_path (sc35) maybe doable what do you think @aldostools ?
     
    Berion and kozarovv like this.
  3. 6,695
    7,833
    797
    DeViL303

    DeViL303 Developer PSX-Place Supporter

    Joined:
    Jan 23, 2016
    Messages:
    6,695
    Likes Received:
    7,833
    Trophy Points:
    797
    Occupation:
    Part-Time XMB Modder
    Location:
    Ireland
    I like it a lot.

    I actually have included all 240 metalification icons in my latest Rebug Mod. They are inside dev_flash/vsh/resource/explore/icon/ , the official place. I think they should just be standard. Usable by every application. And like you say, if they were standard, every other package released could be smaller.
     
    kozarovv likes this.
  4. 5,417
    4,960
    472
    sandungas

    sandungas Moderator Developer

    Joined:
    Dec 31, 2014
    Messages:
    5,417
    Likes Received:
    4,960
    Trophy Points:
    472
    Location:
    Babylon 20xxE series
    I remember in one of the mysis plugins there is an option to load dev_flash contents from usb
    I think it was doing it with the whole dev_flash contents, but i guess it would be better by doing it with only a few files, also it should include some kind of protection
    Incase the file doesnt exists in unnofficial path then load file from official path

    This way we could "remap" only a few files
     
    Berion, kozarovv and DeViL303 like this.
  5. 6,695
    7,833
    797
    DeViL303

    DeViL303 Developer PSX-Place Supporter

    Joined:
    Jan 23, 2016
    Messages:
    6,695
    Likes Received:
    7,833
    Trophy Points:
    797
    Occupation:
    Part-Time XMB Modder
    Location:
    Ireland
    A RCO editor with GUI would be really nice. that shows all icons, and makes them easy to replace or add new ones etc. Now we have gim to png pretty much sorted that should be possible.

    So like a theme editor for ps3, but without a theme at all. :)

    I would also like to be able to drag an icon onto rco in windows and have it all added and converted and working. should be doable. Wish i code these things..
     
  6. 2,111
    1,998
    272
    Berion

    Berion Developer

    Joined:
    Feb 3, 2015
    Messages:
    2,111
    Likes Received:
    1,998
    Trophy Points:
    272
    Gender:
    Male
    Location:
    rom0:/
    RCO is just junk, and items inside are only (?) GIMs - so we not only loosing quality but also makes hard control it (from creator point of view). PS3 can read PNG, even 32bit from any location so maybe we can somehow use this possibility to have true skinning and very easy system. But if this is impossible to implement, of course even RCO is better than nothing. ^^
     
  7. 6,695
    7,833
    797
    DeViL303

    DeViL303 Developer PSX-Place Supporter

    Joined:
    Jan 23, 2016
    Messages:
    6,695
    Likes Received:
    7,833
    Trophy Points:
    797
    Occupation:
    Part-Time XMB Modder
    Location:
    Ireland
    If we could do that, I would love it if usb000 was checked for category xmls first and loaded from there if they exist. Would make modding nice and easy. And could have like a "XMB toggle" between 2 states just by pulling USB stick :) So all the porn only shows up when you have special USB stick in for example. :D

    Or all debug options and important settings only work when special USB "key" is in usb000, that way you just pull the usb stick, and its safe for kids, update icon blocked, settings category etc.

    Cooool. :) if we could make it so every call to a gim, was redirected to a external png, that would be awesome altogether.
     
  8. 2,111
    1,998
    272
    Berion

    Berion Developer

    Joined:
    Feb 3, 2015
    Messages:
    2,111
    Likes Received:
    1,998
    Trophy Points:
    272
    Gender:
    Male
    Location:
    rom0:/
    That's would be mainly functionality of such plugin. Other could be i.e replacing ICON0 on the fly (should be possible not touching databases and rebdb as it is sufficient to reload XMB to take effects on changed icons) and of course for storing homebrew/xml additional icons (like i.e all for XMBM+ etc.).

    I don't know how memory abuse this, but as I remember, in game even official theming system doesn't work so we could do the same to "put sleep it" until user going back to XMB.

    About failsafe: plugin could check on start the icons location, and then load all from it (if some missing, those wouldn't be replaced and read from official path). This would give end user softbrick free solution, and easy way to get rid of theme on next boot.
     
    Last edited: Apr 3, 2019
    DeViL303 likes this.
  9. 6,695
    7,833
    797
    DeViL303

    DeViL303 Developer PSX-Place Supporter

    Joined:
    Jan 23, 2016
    Messages:
    6,695
    Likes Received:
    7,833
    Trophy Points:
    797
    Occupation:
    Part-Time XMB Modder
    Location:
    Ireland
    Its a cool plan. in a way maybe "simple" for a Cobra/plugin dev. I don't know, but compared to some things they have done it sounds simple ish that's all, on the bigger scale.

    Big icon set, few thousand icons i think. :) They could be stored in folders named like the rcos maybe, to make it easier for system
     
  10. 2,111
    1,998
    272
    Berion

    Berion Developer

    Joined:
    Feb 3, 2015
    Messages:
    2,111
    Likes Received:
    1,998
    Trophy Points:
    272
    Gender:
    Male
    Location:
    rom0:/
    I'm thinking about keeping them without any containers to be used easy for all, not only for plugin from the topic. I don't know how many of them are in RCO as I never dig in it, but those which are in use are few (less than 50 for sure). I mean, those which user see every day like i.e PSS icon, album icons, platform icons, disc icons etc.

    Let's say we could group them in folders:
    • "dev_hdd0/game/CUSTOMTHM/system/*.png" (those from flash and containers)
    • "dev_hdd0/game/CUSTOMTHM/apps/<GameID>/*.png" (ICON0 etc. resources but I'm not sure if this wouldn't slow down boot to much)
    • "dev_hdd0/game/CUSTOMTHM/mods/*.png" (for all XML mods etc. which will not be read by plugin replacer but each "mods" by itself i.e XMBM+ or even WMM could read icons from this path)
    If there is place to additional code for read config file, then we could extend it to something like this:
    • "dev_hdd0/game/CUSTOMTHM/Metalification/"
    • "dev_hdd0/game/CUSTOMTHM/theme.txt"
     
  11. 5,417
    4,960
    472
    sandungas

    sandungas Moderator Developer

    Joined:
    Dec 31, 2014
    Messages:
    5,417
    Likes Received:
    4,960
    Trophy Points:
    472
    Location:
    Babylon 20xxE series
    I was thinking in using a "for" loop that scans the contents of custom path (lets say usb), and for every file it does:
    -check if exists in official path
    -if exist, remap path, else do nothing

    This way the loop only happens 1 time for every file so is efficient, and allows to remap... everything ? (except the ps2 emus i guess), anyway we dont need to remap everything for themes

    The difference with the other methods used before (jaicrab, rebug, mysis) is they was remaping devices (flash to usb) and what im saying is to remap files (to a different device, or to the same device but different path)
    Not sure how tricky could be to achieve it though :D

    ------------------
    For what you are saying aboout using plain .png files in the custom path... this is even more tricky
    For this to work is needed to "hook" the function that loads the image file into memory, the process is going to be something like this
    -the sprx is loaded either automatically when PS3 boots, or initiated by the user
    -the sprx loads the rco contents
    -zlib extraction
    -gim pixel data copyed to memory

    Thats the point where we need to replace the pixel data of the gim with the pixel data of our image "on the fly"

    -----------------
    The conversion of gim ---to--->png can be made lot of time ago, since sony released the official GimConv.exe as part of the PSP theme tools... but only works for windows (not PS3 and not linux)
    The RCO format allows to store images inside in plain PNG, BMP, and JPG (not converted to GIM, neither zlib compressed), you need to change some settings for it in the maim rcoxml and most probably XMB is going to refuse to load some of them, but the RCO format allows it (and official firmware contains a few of this kind)
    The GIMs using image format rgba8888 are "lossless" when compared with PNG, most of the images in the firmware are this way so there is no difference in the pixel data in this case (can be copypasted to memory directly), but the others are a bit more special

    The point is not posible to have all the custom images in the custom pah in png 32 bits and convert all them "on the fly" to the correct pixel data required for every specific image of an specific rco
    So you are going to need to prepare them very well to allow them to be copyed to memory with a simple "copypaste" of pixel data
     
    Last edited: Apr 3, 2019
  12. 2,111
    1,998
    272
    Berion

    Berion Developer

    Joined:
    Feb 3, 2015
    Messages:
    2,111
    Likes Received:
    1,998
    Trophy Points:
    272
    Gender:
    Male
    Location:
    rom0:/
    I was thinking about hacking something different in different way. I'm not sure to if I using proper terminology, but I have in mind "redirecting" XML strings by this hypothetical plugin, which loads from RCO to string points to HDD as I was done in XMBM+ 2K17.
     
  13. 6,695
    7,833
    797
    DeViL303

    DeViL303 Developer PSX-Place Supporter

    Joined:
    Jan 23, 2016
    Messages:
    6,695
    Likes Received:
    7,833
    Trophy Points:
    797
    Occupation:
    Part-Time XMB Modder
    Location:
    Ireland
    I think it will have to be a lower level than that, lots of the icons are not called from the xmls, if it was just a matter of redirecting xml links, then it might be simpler to redirect to custom xmls with the icon links included.
     
  14. 2,111
    1,998
    272
    Berion

    Berion Developer

    Joined:
    Feb 3, 2015
    Messages:
    2,111
    Likes Received:
    1,998
    Trophy Points:
    272
    Gender:
    Male
    Location:
    rom0:/
    Example of the idea. I don't know if this is possible but IMHO should be more easier and less time consuming/buggy than managing video memory (yet still harder than RCO redireting):

    Code:
    <Pair key="icon_rsc"><String>tex_album_icon</String></Pair>
    Code:
    <Pair key="icon"><String>/dev_hdd0/game/CUSTOMTHM/system/tex_album_icon.png</String></Pair>
    - - -

    Oh, didn't know that. :( Damned Sony and their mess.
     
    DeViL303 likes this.
  15. 5,417
    4,960
    472
    sandungas

    sandungas Moderator Developer

    Joined:
    Dec 31, 2014
    Messages:
    5,417
    Likes Received:
    4,960
    Trophy Points:
    472
    Location:
    Babylon 20xxE series
    Well, this should work for the image names that appears in the XMLs of path dev_flash\vsh\resource\explore\xmb
    As far i remember officially are not much official images loaded this way, but most custom mods uses them

    The other images inside rco are loaded by different means, sometimes the name appears inside the rcoxml file (the main xml when you extract rco contents), and i guess some image names could be hardcoded inside the sprx
    I guess by doing it this way every type needs his tricks

    But the way i said is more "brute" because we are "intercepting and replacing" the pixel data in the step inmediatly before is copyed to memory
     
  16. 6,695
    7,833
    797
    DeViL303

    DeViL303 Developer PSX-Place Supporter

    Joined:
    Jan 23, 2016
    Messages:
    6,695
    Likes Received:
    7,833
    Trophy Points:
    797
    Occupation:
    Part-Time XMB Modder
    Location:
    Ireland
    One thing you could do @Berion, is release some icontex.qrc files, these change all the main icons of the XMB without a theme or an rco mod, and i think they should work on all recent CFW, as far i know the format has not changed since they added the tv category.
     
    citra mulia and mizio90 like this.
  17. 271
    199
    72
    Casavult

    Casavult Member

    Joined:
    Oct 28, 2016
    Messages:
    271
    Likes Received:
    199
    Trophy Points:
    72
    Location:
    London, United Kingdom
    This reminds me of ZeroVSH Patcher for the PSP by NightStar3 and codestation. Redirecting XMB prx and rco to custom ones to change the XMB icons, ect. It was REALLY cool, didn't need to build a theme, just drag and drop the custom prx and rco into zerovsh folder and upon reboot, the changes were made to the XMB.

    I would really love to see this! Great work @Berion
     
    Berion and DeViL303 like this.
  18. 3,179
    5,137
    522
    aldostools

    aldostools Developer Developer

    Joined:
    Oct 30, 2014
    Messages:
    3,179
    Likes Received:
    5,137
    Trophy Points:
    522
    Have you tried this web command: /install.ps3<theme-path-and-filename>.p3t ?
    https://github.com/aldostools/webMA...98148302c4b0a7bde8/include/pkg_handler.h#L200

    Multiple web commands can be executed from .bat script files (/play.ps3<script-path-and-filename>.bat)

    The script files allow to execute until 100 commands, like remap, copy, ren, /install.ps3, /mount_ps3, etc.
    It also supports basic conditional execution (e.g. If exist, if not exist, cancel if exist, if L1, if R1)

    You could use /dev_hdd0/autoexec.bat (it executes like /boot_init.txt but after the http and web services have been started).
     
    Last edited: Apr 4, 2019
    citra mulia and Berion like this.
  19. 3,179
    5,137
    522
    aldostools

    aldostools Developer Developer

    Joined:
    Oct 30, 2014
    Messages:
    3,179
    Likes Received:
    5,137
    Trophy Points:
    522
    /dev_hdd0/boot_init.txt allows to add remap commands even before the video is initialized when the system boots.

    An I idea that comes to my mind is to have a full copy of /dev_flash in hdd0 or usb0 (e.g. /dev_hdd0/tmp/dev_flash or /dev_usb000/dev_flash) and redirect the /dev_flash folder to point that other folder which can be customized easily.

    TBH I don't know if that idea would really work but someone with a flasher could try it. The last time I tried to redirected some folders in /dev_flash I got the following error screen and had to use recovery.

    [​IMG]
     
    Berion and mizio90 like this.
  20. 6,695
    7,833
    797
    DeViL303

    DeViL303 Developer PSX-Place Supporter

    Joined:
    Jan 23, 2016
    Messages:
    6,695
    Likes Received:
    7,833
    Trophy Points:
    797
    Occupation:
    Part-Time XMB Modder
    Location:
    Ireland
    For berions idea, if we could just redirect the resource folder, that would cover everything really.
     
    aldostools likes this.

Share This Page