PS3 [IDEA] Using the Photo grid layout to mount games

Discussion in 'Homebrew Development' started by DeViL303, Apr 24, 2019.

  1. 6,252
    7,150
    797
    DeViL303

    DeViL303 Developer PSX-Place Supporter

    Joined:
    Jan 23, 2016
    Messages:
    6,252
    Likes Received:
    7,150
    Trophy Points:
    797
    Occupation:
    Part-Time XMB Modder
    Location:
    Ireland


    I think this deserves its own thread, as the more I think about it, the more I think we need to do this. There are so many advantages and I can not think of any disadvantages except it would mean other photos showing in the game category if you had any on there. Its possible this can be solved somehow too.

    The idea is simple, we have folders or albums full of JPG covers for games, all named with the content ID of a game on HDD, then somehow this output is watched for this specific pattern of access with the chosen game mounted. Here you can see I accessed 2 covers in a row, pressing circle in between.

    upload_2019-4-24_3-39-0.png

    The first content ID on the list is always the one that was chosen. The others are just the surrounding JPGs being cached, alternating , 1st on right, side, 1st on left side, 2nd on right side, 2nd on left side etc. Anyway, the first one is the one we need to grab and use.

    Some of the many advantages.
    • A very nice view that can utilize full resolution covers.
    • All icons always in correct proportions.
    • These can be "ran" from USB or from HDD.
    • It allows fast browsing of lots of files with its 5 rows across, 500% quicker browsing.
    • No actual manager is really needed if this method is used.
    • I'm not even sure if webman is required, Cobra could maybe do it all based on just detecting the info above. If not, a simple plugin could do this, webman mod would be overkill almost but perfect at the same time.
    • No xml generation required! This uses the system database files like official games.
    • The game list will be updated dynamically based on existing covers!!
    • This is massive, a new cover can be added to a folder on HDD or USB, and instantly its available for mounting. So you can ftp in a new game, and new cover, and boom, ready to go, no rebooting required.
    • When a game gets ripped, the cover can get added to the folder so it appears.
    • This most likely uses LESS RAM, as i can browse over 11,000 cover with no issues. not possible with normal xml XMB items. (See video)
    • Albums can be made on the console easily by just moving images around.
    • Albums can be made on PC easily by just filling folders with JPGs and using USB "display all"
    • Thousands of files can be shown with great performance, see my video of over 10,000 covers.
    • We can add comments to the files.
    • We can change the displayed names, without changing the file names.
    • We can copy and paste these covers from USB to HDD etc, full control.
    • The sorting/grouping method mode can be changed
    • Not only that, but set differently to the normal game grouping.
    • You can even view a slideshow of your game collection while you try to decide what to play.
    • Other functions could be added just by adding other images. Like a album or folder called settings. In that folder every item could trigger a settings change.
    • Maybe we could even have it so copying was linked to the images? So if you copied an image from usb to dev_hdd0, it would actually copy the game too, not sure if that is possible, might be if we can read that log.


    As you can see in the video, I browsed over 11,000 covers in one session, No RAM issues at all, decent performance really considering. Slight lag when entering PS3 folder, but that has 7953 images, so its not bad. I think this method could reduce the memory footprint of webman a lot as it would no longer need to generate xmls in theory or do lots of stuff that it currently needs to.
     
    Last edited: Apr 24, 2019
    n00b, T.A.U, Algol and 11 others like this.
  2. 6,252
    7,150
    797
    DeViL303

    DeViL303 Developer PSX-Place Supporter

    Joined:
    Jan 23, 2016
    Messages:
    6,252
    Likes Received:
    7,150
    Trophy Points:
    797
    Occupation:
    Part-Time XMB Modder
    Location:
    Ireland
    I think it might be possible to use this to trigger game copying too.

    See the output when I copy a JPG from USB to dev_hdd0. You can see devices and file names.

    If copying to USB, you can see the source device is dev_hdd0, and the destination device is usb001, and the file name, what more do we need? :)

    upload_2019-4-24_12-21-31.png
     
    Last edited: Apr 24, 2019
    n00b, T.A.U, Algol and 1 other person like this.
  3. 702
    235
    72
    ISAK.M

    ISAK.M Member

    Joined:
    May 3, 2018
    Messages:
    702
    Likes Received:
    235
    Trophy Points:
    72
    Gender:
    Male
    Occupation:
    Well, School
    Location:
    Sweden
    Webman Launchpad?, or what I don't get it.
     
  4. 6,252
    7,150
    797
    DeViL303

    DeViL303 Developer PSX-Place Supporter

    Joined:
    Jan 23, 2016
    Messages:
    6,252
    Likes Received:
    7,150
    Trophy Points:
    797
    Occupation:
    Part-Time XMB Modder
    Location:
    Ireland
    No, its not webman launchpad, check again ;)

    See list of advantages and see how many of those boxes that WMLP ticks... :) The answer is none really.
     
    n00b, T.A.U and LuanTeles like this.
  5. 165
    55
    57
    Ulquiorra-Sama

    Ulquiorra-Sama Member

    Joined:
    Dec 18, 2017
    Messages:
    165
    Likes Received:
    55
    Trophy Points:
    57
    Gender:
    Male
    Just to be sure..works in OFW?? Bexause it's very cool!!!
     
    DeViL303 likes this.
  6. 6,252
    7,150
    797
    DeViL303

    DeViL303 Developer PSX-Place Supporter

    Joined:
    Jan 23, 2016
    Messages:
    6,252
    Likes Received:
    7,150
    Trophy Points:
    797
    Occupation:
    Part-Time XMB Modder
    Location:
    Ireland
    I will explain a little more the differences, as not everyone has used webman launchpad and know its limitations.

    Disadvantages to WMLP:
    • Requires xml to be generated to see game list
    • Only has 3 rows
    • Allows for no sorting of games
    • Requires covers be hosted online or on a webserver
    • Covers don't cache, so are very slow to load, every time.
    • Max's out at about 1000 items with RAM issues
    • Requires a reboot to see changes, or cache clear and refresh which takes even longer
    • Requires sprx mods, so it is FW dependent
    • Has none of the advantages of the photo method which are many.
    • I am not sure of anything that WMLP can do better really.
    I will assume you are joking. :)
     
    Last edited: Apr 24, 2019
    n00b, T.A.U, jacobsson and 2 others like this.
  7. 338
    128
    97
    Yugonibblit

    Yugonibblit PSX-Place Supporter

    Joined:
    Jan 25, 2017
    Messages:
    338
    Likes Received:
    128
    Trophy Points:
    97
    Gender:
    Male
    Occupation:
    Mechanic
    Location:
    Uranus
    this is great! i used to change file extensions to copy large game files then change the extension back. GREAT WORK!
     
  8. 6,252
    7,150
    797
    DeViL303

    DeViL303 Developer PSX-Place Supporter

    Joined:
    Jan 23, 2016
    Messages:
    6,252
    Likes Received:
    7,150
    Trophy Points:
    797
    Occupation:
    Part-Time XMB Modder
    Location:
    Ireland
    Spot the difference:

    upload_2019-4-24_19-18-11.png

    upload_2019-4-24_19-19-48.png

    upload_2019-4-24_19-20-21.png


    1. Changed "Images" to "Games".
    2. Changed photo loading icon to a game icon.
    3. Changed "View" to "Mount"
     
    n00b, T.A.U, Algol and 10 others like this.
  9. 6,252
    7,150
    797
    DeViL303

    DeViL303 Developer PSX-Place Supporter

    Joined:
    Jan 23, 2016
    Messages:
    6,252
    Likes Received:
    7,150
    Trophy Points:
    797
    Occupation:
    Part-Time XMB Modder
    Location:
    Ireland
    So, if this ever gets working I have some more ideas. I think i should change the "Images" to "Files" in the RCO, then its universal and not just linked to photos , or games.

    Also here is a POC for simple settings menu that could be "built" using just a folder of images. I need to figure out to remove the import date from the thumbnails, but that should be easy enough.



    Example of debug output when clicking on the Enable dev_blind thumbnail, surely this can be used to trigger the function?

    upload_2019-4-25_16-10-40.png


    Also, I was thinking, we could even have it so we use some rare image format for all functions. This way all png and jpg operations could be ignored.
     
    Last edited: Apr 25, 2019
    n00b, T.A.U and STLcardsWS like this.
  10. 6,252
    7,150
    797
    DeViL303

    DeViL303 Developer PSX-Place Supporter

    Joined:
    Jan 23, 2016
    Messages:
    6,252
    Likes Received:
    7,150
    Trophy Points:
    797
    Occupation:
    Part-Time XMB Modder
    Location:
    Ireland
    Few more ideas.

    This entry is the one to watch for:
    upload_2019-4-25_18-44-50.png

    Its always after that when the actual selected image comes up in the log.

    Also I was thinking, we could make it so it only uses photos in a certain date folder as a trigger. So for example, we change system date to 30/3/2019, and then we import all our covers. Then we set date back to normal.

    Then, if ever the line open_path /dev_hdd0/photo/2019/03/30/x.png comes up after the line in the red square above, it treats that as a trigger. This will mean that all other image operations are left untouched.

    Also, if webMAN MOD was able to do this, then maybe it could have a "Photo Trigger Only" Mode. Where no xmls are generated, and it used this method exclusively to mount games.
     
    n00b, T.A.U, Algol and 1 other person like this.
  11. 3,098
    4,972
    372
    aldostools

    aldostools Developer Developer

    Joined:
    Oct 30, 2014
    Messages:
    3,098
    Likes Received:
    4,972
    Trophy Points:
    372
    I don't think we need a rare image photo or use specific date. I would be enough to use a prefix (or sufix) in the file name. (e.g. wm~BLES12345.JPG or wm~settings.png)

    I have been thinking of different alternatives to implement this idea, here are the possible methods that I have been considering:
    1- Using a custom version of MAMBA 3.x or Cobra 8.1 that create a request file /dev_hdd0/tmp/wm_request in the open_path hook of mappath.c (the same one that produce the debug output). The wm_request file would be created after /dev_flash/vsh/module/photoviewer_plugin.sprx is detected (or lilbft2d.sprx) then an image with prefix is found. The file name would be the content of the wm_request file. webMAN polls the request file when it's on XMB and can process the commands inside.

    2- The second alternative that I have been considering is a MITM attack using a sprx proxy that intercepts the parameters received by photoviewer_plugin, then call photoviewer_plugin to continue the normal flow of XMB. This method is more hacky and I need to find the interfaces used to receive the parameter and call photoviewer_plugin.

    3- The third method is more complex: it requires to create a telnet service that connect to debug port 18194 and receive all the debug messages sent by the debug payload of Cobra. Then filter the messages and interpret them like you are doing ;)

    IMO the first method is the route to follow... I will experiment with MAMBA first. If I get good results maybe Joonie could include the changes into Rebug's Cobra.
     
  12. 154
    85
    57
    jacobsson

    jacobsson Member

    Joined:
    Aug 11, 2017
    Messages:
    154
    Likes Received:
    85
    Trophy Points:
    57
    Gender:
    Male
    Can this be used to replicate and replace the original listing but with the benefits of faster rendering and less ram usage? Awesome find as usual!
     
    T.A.U, LuanTeles and DeViL303 like this.
  13. 6,252
    7,150
    797
    DeViL303

    DeViL303 Developer PSX-Place Supporter

    Joined:
    Jan 23, 2016
    Messages:
    6,252
    Likes Received:
    7,150
    Trophy Points:
    797
    Occupation:
    Part-Time XMB Modder
    Location:
    Ireland
    That's cool, using standard images and all dates is simpler. but I suppose if we can use covers with standard names that's even better, otherwise everyone needs another set of covers renamed, not a big deal I suppose.

    For functions, I was thinking you could have it so the same commands work from image names as from the browser. Like:

    So an image called restart.ps3.png detected in the debug output (or any other way) trigger the same as http://127.0.0.1/restart.ps3 , this could keep the code simpler and reuse lots of existing stuff.

    Yeah, they all sound good. So I'll leave that to you as it's above me. I suppose the method that gives as much control and detail on whats happening is the best, but also simplest to code.

    Ideally we would have access to the full log like we do on PC, and I would be able to write custom commands myself like

    Code:
    if log =
    open_path /dev_flash.sys/internal/libft2d.sprx
    open_path /dev_hdd0/photo/201*/**/**/devil303.png
    
    then =
    delete dev_hdd0/tmp/devil303.sprx
    If you can do that, it would be amazing :D
     
    Last edited: Apr 25, 2019
    n00b, T.A.U, LuanTeles and 1 other person like this.
  14. 3,098
    4,972
    372
    aldostools

    aldostools Developer Developer

    Joined:
    Oct 30, 2014
    Messages:
    3,098
    Likes Received:
    4,972
    Trophy Points:
    372
    I don't want to speculate too much until I get a PoC working, but I think initially we could use the following protocol:

    *TITLEID*.JPG -> (case sensitive) Seek the game path for that title id an XML or TXT generated at Refresh XML
    *filename*.iso.jpg -> (case insensitive) Seek the game path in the standard folders (/PS3ISO, /PSXISO, /PS2ISO, /PSPISO, /BDISO, /DVDISO)
    wm~*web-command*.jpg -> Execute the *web-command* expressed in the file name (use url notation %xx for special characters). e.g. /setup.ps3.jpg or /mount.ps3%2F%dev_hdd0%2FPS3ISO%2Fmovian.iso.jpg

    Later we can expand the protocol for additional functions... but first we need to get this working ;)

    *EDIT*
    If the /dev_usb000/PICTURES exists (and a flag is enabled) I could copy to that folder the covers of the games found during the refresh XML.
     
    Last edited: Apr 25, 2019
    T.A.U, LuanTeles, jacobsson and 2 others like this.
  15. 6,252
    7,150
    797
    DeViL303

    DeViL303 Developer PSX-Place Supporter

    Joined:
    Jan 23, 2016
    Messages:
    6,252
    Likes Received:
    7,150
    Trophy Points:
    797
    Occupation:
    Part-Time XMB Modder
    Location:
    Ireland
    That would be cool.

    Can we mount a completely fake dev_usb008 or something with the covers in, so a real stick and port i snot needed/wasted for this? We do have more control over images on USB, BUT we dont get the nice 5 row view on USB, so really on dev_hdd0/ is best. I suppose you can add files to a USB stick, and then the user can import the whole folder as an album.

    So when you add stuff to a folder on USB, you could make ps1 folder, ps2 folder, ps3 folder, settings folder etc. Then the user can import all of those to dev_hdd0 as separate albums for the nice 5 row view, or run them from USB with a normal view.
     
    n00b, T.A.U, LuanTeles and 2 others like this.
  16. 3,098
    4,972
    372
    aldostools

    aldostools Developer Developer

    Joined:
    Oct 30, 2014
    Messages:
    3,098
    Likes Received:
    4,972
    Trophy Points:
    372
    Yes that the main reason of have the pictures copied to /dev_usb000; I think the pictures in /dev_hdd0/photo need to be in the database to be shown in XMB. So having them in USB they can be copied to /dev_hdd0/photo easily. The sub-folders is not difficult to do.
     
    T.A.U, LuanTeles and DeViL303 like this.
  17. 4,634
    4,149
    372
    sandungas

    sandungas Moderator Developer

    Joined:
    Dec 31, 2014
    Messages:
    4,634
    Likes Received:
    4,149
    Trophy Points:
    372
    Location:
    Babylon 20xxE series
    Yep, all that images has been indexed in the hdd database (metadata_db_hdd), with lot of info for each (up to 30 or 40 values for an image), included paths, names, width, height, codec, and several timestamps for timecreated, timeimported, timemodifyed, etc...
    Also, for every real image the firmware creates a "thumbnail" image (which info is also stored in the database) that is a reduced version of the real image... and this feature is pretty cool actually because it seems to preserve the aspect ratio of the original :D

    Anyway... that humbnail images is what you are showing in all your screenshots @DeViL303 i guess most of you realized about it but what i mean is what can be seen in the screen is not the real image, but a thumbnail of it
    Im just mentioning it because maybe this could be used to your advantage, also it implyes some important details:
    -there is some plugin that is creating the thumbnails and doing the image conversions (and it should be one that appears in your debug logs)
    -initially you dont need the real images, it could be enought with the thumbnails... the problem is how to create that thumbnails without the real images ?... well, lol, never minds, just brainstorming
    -i know the format used by that timestamps inside the database, are easy and safe to delete (by default are full of zeroes, and there is not any checkum protecting them), but i guess the database is going to add them again after deleting them, either imediatly or incase the user does a "rebuild database"



    Edit:
    The thumbnails are created in path:
    dev_hdd0/mms/thumbnails/dev_hdd0/photo/imagename.png
    The image format used for the thumbnails is picky, and it seems to follow some "obscure" rules, with this i mean... the codec used to create the thumbnail is decided by the .sprx
     
    T.A.U and Algol like this.
  18. 6,252
    7,150
    797
    DeViL303

    DeViL303 Developer PSX-Place Supporter

    Joined:
    Jan 23, 2016
    Messages:
    6,252
    Likes Received:
    7,150
    Trophy Points:
    797
    Occupation:
    Part-Time XMB Modder
    Location:
    Ireland
    Yeah, I can see all the thumbnail access and creation etc, but its not really useful for what we need, it just loads them all when you open the folder. We need to grab the actual file selected from the log, So that will always be the actual file name we are looking for, and not the thumbnail.

    upload_2019-4-25_22-43-4.png

    I'm trying to find out if the PS3 will read images from any hardcoded folders other than dev_hdd0/photo/xxxx/xx/xx/ . I suspect it can somehow.
     
    Last edited: Apr 25, 2019
    n00b, T.A.U and LuanTeles like this.
  19. 6,252
    7,150
    797
    DeViL303

    DeViL303 Developer PSX-Place Supporter

    Joined:
    Jan 23, 2016
    Messages:
    6,252
    Likes Received:
    7,150
    Trophy Points:
    797
    Occupation:
    Part-Time XMB Modder
    Location:
    Ireland
    I'm trying to find the entry for this date to remove it as its a bit untidy and useless to have on all functions and games, if anyone knows, save me some time looking and tell me please. :)

    upload_2019-4-25_22-52-19.png
     
    n00b, T.A.U, LuanTeles and 1 other person like this.
  20. 4,634
    4,149
    372
    sandungas

    sandungas Moderator Developer

    Joined:
    Dec 31, 2014
    Messages:
    4,634
    Likes Received:
    4,149
    Trophy Points:
    372
    Location:
    Babylon 20xxE series
    Just an idea i was thinking about related with that thumbnails...
    The thumbnails are loaded when you "open" that photo preview screen, even before you move the cursor of the dualshock

    Lets say... if we know the order of how the thumbnails are displayed inside the "photo preview screen" (i guess is from left to right and top to bottom) then we know:
    -the exact position of the cursor (over top left cover)
    -the location of all covers

    Also, you can scan the dualshock outputs inmediatly after the .sprx is loaded (a bit inspired in what you drawed over the debug screen in one of your previous posts)
    So... 1 click to right takes you to cover 2... another click to cover 3... ect...

    Dunno, but i guess webman could monitor the loading of all that thumbnails and create a code array of 2D (rows x heights) in 5x5 with them
    Then monitor the dualshock outputs to deduce where is located the cursor :D

    Not sure if it would work though, and not sure if it could be accurate enought though, but initially i think it could be a way to do it
    I guess it could be easyer to monitor the loading of all that thumbnails, also there is code to capture dualshock outputs
     
    T.A.U likes this.

Share This Page