PS3 PS3 In-Game Menu 0.2

This plugin have already been done by Mysis in VSH but it shows you can make a menu during gameplay.

  1. 20
    7
    3
    OsirisX

    OsirisX Developer

    Joined:
    Jun 5, 2015
    Messages:
    20
    Likes Received:
    7
    Trophy Points:
    3
    [​IMG]

    I took a small break from ps3xpad and decided to create an in-game menu. This is more of a POC for an in-game menu. Most of the features of this plugin have already been done by Mysis in VSH but it shows you can make a menu during gameplay. It can also lead to in-game trainers and such. You will need firmware with PS3MAPI enabled and a debug eboot of your game. You can either use webMAN-mod or using the supplied VSH plugin. The VSH plugin will automatically detect if a game has been booted and will attach the game menu plugin to it.

    Game Menu Features:
    - In game music player (music from hdd only)
    - In game screenshots (saved to /dev_hdd0/tmp/ folder)
    - In game recording (saved to /dev_hdd0/tmp/ folder)

    VSH Menu Features:
    - Auto detect and attach game menu plugin (may be disabled/enabled)
    - XMB screenshots

    2 requirements needed for loading and displaying the game menu.
    1. 4MB free memory (if your game uses most of the 256MB of memory, the plugin will not work or will not display the menu until 4MB is free)
    2. Game needs to run gcm (most games do)
    You can tell if a game uses gcm by looking at the modules loaded during gameplay.
    This can be done by using webMAN-mod and selecting your game proc from PS3MAPI interface. It will have libgcm listed as one of the modules loaded.

    Installation:
    1. Copy the plugins folder to /dev_hdd0/. You should have the directory /dev_hdd0/plugins/ps3_menu/ with ps3_vsh_menu.sprx and ps3_game_menu.sprx in it.
    2. Add this line to plugins.txt if you're using PRX Loader or to boot_plugins.txt if you're using Cobra:
    /dev_hdd0/plugins/ps3_menu/ps3_vsh_menu.sprx
    3. Boot up a game and the game menu should automatically be loaded once it starts.
    (Alternatively you may load ps3_game_plugin.sprx directly to the game using webMAN-mod PS3MAPI interface)

    Notes:
    - Unlike VSH where RSX buffer pointers are at the same address, these buffers are dynamic in games.
    Fortunatley libgcm allows us to obtain them in game and giving us the ability to do blitting.
    - Blitting in game follows the same procedure as VSH where we pause RSX and disable pad data for VSH to process.
    The only difference is I'm using a hook instead of getting pad object from memory due to it being dynamic when switching from game to game.
    - Be careful when programming game plugins. Unlike VSH where the same modules are loaded for every system, not all games will load the same modules and you will have to load them manually.
    - Remember to change font and background constants in blitting.h if you want them custom and also enable their compiler flags.
    - Make sure to pass the -B flag when compiling both vsh and game menu plugins concurrently. Shared objects need to be recompiled for each individually.
    (make -B all)

    Credits:
    3141card for the VSH menu framework
    littlebalup and Orion for providing their source code of their VSH menu plugins
    Masterzorag for keeping an up to date template provided in github
    therifboy for his explanation on hooking methods
    Mysis for his POC plugin

    UPDATE 0.2:
    Just a minor memory optimization. The 16MB requirement is for canvas size of 1920x1080. I was using the same memory size as the orignal VSH menu plugin and overlooked for a canvas size of 720x400 as shown in the picture. The memory limit is now dynamic and depends on canvase width and height (the smaller they are, the lower memory requirement).

    ps3_menu_0.1+src.zip
    ps3_menu_0.2+src.zip
     
    Last edited: Oct 3, 2015
    STLcardsWS likes this.
  2. 92
    87
    18
    3141card

    3141card Developer

    Joined:
    Oct 13, 2014
    Messages:
    92
    Likes Received:
    87
    Trophy Points:
    18
    Location:
    Germany
    Great work [MENTION=9178]OsirisX[/MENTION] :)

    A few months ago I wrote a inGame menu based on my vsh_menu_plugin.
    But there was one problem which could not be tackled by me.

    I wrote temp implementations of sys_dbg_read_process_memory(), sys_dbg_write_process_memory(),
    sys_dbg_stop_process() and sys_dbg_continue_process on CEX, so I don't need things like CCAPI.
    Syscalls exist only the short time she are needed, relatively non-invasive and FW independent.

    The local memory offset for the current showed game display buffer can be easy obtained.
    and so its easy to write to this buffer over game process space.

    I am able to pause and continue a game without trouble, all works fine, no bugs.
    A real pause-game, perfect for a menu. Because the paused game process, there is no need
    for pausing RSX fifo and my implementation of sys_dbg_read_write_process_memory()
    skip the usage of kernel space and read/write direct from/to the vsh menu buffer.
    I can "blit" 3 MB in around 10 msec, that is excellent for blitting.

    My problem is, there is something f****d up after the first pause, some sysutil, event-loop,
    everything s**t. Because, when I press the PS button to enter inGameXMB, the PS3 freeze.
    I was not able to fix that problem and give up. :(

    THX for sharing your PoC. :)
     
    Last edited: Oct 2, 2015
  3. 5,866
    3,364
    123
    STLcardsWS

    STLcardsWS Administrator

    Joined:
    Sep 18, 2014
    Messages:
    5,866
    Likes Received:
    3,364
    Trophy Points:
    123
    Very nice work [MENTION=9178]OsirisX[/MENTION] .. will get this up as news ASAP..
     
  4. 334
    18
    28
    Orion

    Orion Gamesonic Developer

    Joined:
    Oct 11, 2014
    Messages:
    334
    Likes Received:
    18
    Trophy Points:
    28
    Location:
    /dev_hdd0/game/GMANAGER9
    This is a very masterpiece
    Congratulations [MENTION=9178]OsirisX[/MENTION]
     
  5. 65
    38
    18
    LizZo

    LizZo Member

    Joined:
    May 17, 2015
    Messages:
    65
    Likes Received:
    38
    Trophy Points:
    18
    Location:
    Rome
    Very nice work! I was waiting for something like that :)
    I' ve tried this in-game menù with Black Ops2 and Gta5.
    Black Ops 2 freeze at loading. Maybe doesen't use libgcm.
    Gta 5 load the In-game Plugin but it won't open..!
    Both Games are equipped with a Debug Eboot.
    Any Idea for GTA5?? What's the problem?
    I' ve tried with Auto load game plugin and also with plugin disable and enable it with WebMAN or combo. Nothing, it won' t open..!

    Rebug 4.75.3 Rex Converted on DEX, if this Info can help!
     
    Last edited: Oct 2, 2015
  6. 20
    7
    3
    OsirisX

    OsirisX Developer

    Joined:
    Jun 5, 2015
    Messages:
    20
    Likes Received:
    7
    Trophy Points:
    3
    Hmm maybe this could lead to an in-game menu processed from VSH side. This would get rid of the debug EBOOT requirement and offer more game compatbility (not all games will accept external plugins even when converted to debug).

    I can't say for Black Ops 2 but GTA5 (and most Rockstart games) already exhausts most of the PS3 memory while running. I found that only 3MB is free while the plugin requires 16MB. The plugin most likely attached to the game but won't display the menu due to the memory limitation. You can try pressing (SELCT+START+R2) to verify that the plugin is indeed running.

    Possible solutions include reducing the size of the menu to save as much memory as possible or somehow do the processing from VSH proc.
     
  7. 4,808
    2,617
    123
    kozarovv

    kozarovv Super Moderator

    Joined:
    Nov 8, 2014
    Messages:
    4,808
    Likes Received:
    2,617
    Trophy Points:
    123
    Home Page:
    We are reaching that point in PS3 developement like few years ago on PS2. Memory (iop in PS2 case) is starting to be problem.
     
  8. 128
    3
    28
    epicboy

    epicboy Member

    Joined:
    Feb 24, 2015
    Messages:
    128
    Likes Received:
    3
    Trophy Points:
    28
    Glad to see some new stuff for the ps3. Also I'm glad to see metal gear solid in the screenshot.
    You say 16MB of memory needs to be free. Howw? Every game I run, even xmb, I have < 3 MB free....
     
  9. 92
    87
    18
    3141card

    3141card Developer

    Joined:
    Oct 13, 2014
    Messages:
    92
    Likes Received:
    87
    Trophy Points:
    18
    Location:
    Germany
    Yes, that was the intention. I search the old sample and load it up, maybe you can use some of it.

    EDIT:

    source_debug_syscalls

    Found only a old version, look in main while. If you press select a black buffer is blitted into the game display buffer.

    Test it even with GTA IV, works fine. Problem, 3MB are to big for a 720p game, in Multiman and full hd it looks better.
    But you see how it work, e.g. how you can obtain the game buffer ea.

    If you press start, the game process is paused for 5 seconds and than continued. After doing this, PS3 will freeze if you
    press PS button, the game make no trouble, you can pause/continue as often as you wish.
    How I say, somthing between vsh process and game process is f****d up.

    My debug output, u see the fast write speed for the 3 MB, even if the game process is not paused and do his job.
    Code:
    programstart:
    write: 6.776msec
    write: 4.326msec
    write: 4.562msec
    write: 10.643msec
    write: 4.527msec
    write: 4.525msec
    write: 4.514msec
    write: 12.437msec
    write: 6.390msec
    write: 10.805msec
    write: 4.914msec
    write: 4.760msec
    lv2_sys_dbg_stop_processes() ret(0x00000000)
    my_continue_process() ret(0x00000000)
    lv2_sys_dbg_stop_processes() ret(0x00000000)
    my_continue_process() ret(0x00000000)
    
     
    Last edited: Oct 2, 2015
  10. 20
    7
    3
    OsirisX

    OsirisX Developer

    Joined:
    Jun 5, 2015
    Messages:
    20
    Likes Received:
    7
    Trophy Points:
    3
    Thanks for sharing this. I'll definitely find something useful in there. For some reason though while running a game, my ps3 freezes after pressing select but I haven't ran much tests with it yet.
     
  11. 92
    87
    18
    3141card

    3141card Developer

    Joined:
    Oct 13, 2014
    Messages:
    92
    Likes Received:
    87
    Trophy Points:
    18
    Location:
    Germany
    Yes, its a very simple test based on the old plugin. And to this time I was more interested in lv2 reversing, threads, processes and such things.
    Its only tested on rebug 4.46 CEX and mostly with multiman, GTA IV and Dead Space 3. Fine if you can need some of it.
     
  12. 65
    38
    18
    LizZo

    LizZo Member

    Joined:
    May 17, 2015
    Messages:
    65
    Likes Received:
    38
    Trophy Points:
    18
    Location:
    Rome
    Nice work! Keep it up!
    But the new v0.2 still doesen't work with all my Games, GTA V, COD Black Ops, COD Black Ops 2, COD Ghosts, Naruto UNS Revolution, COD MW3.. :bangdesk:
     
  13. 4,808
    2,617
    123
    kozarovv

    kozarovv Super Moderator

    Joined:
    Nov 8, 2014
    Messages:
    4,808
    Likes Received:
    2,617
    Trophy Points:
    123
    Home Page:
    kozarovv updated PS3 In-Game Menu with a new update entry:

    PS3 In-Game Menu 0.2

    Read the rest of this update entry...
     
    3141card likes this.
  14. 4,808
    2,617
    123
    kozarovv

    kozarovv Super Moderator

    Joined:
    Nov 8, 2014
    Messages:
    4,808
    Likes Received:
    2,617
    Trophy Points:
    123
    Home Page:
    Thread merged with resource. FYI @OsirisX ,added download in right-upper corner + some info in resource overview (tabs above first post.)
     
    STLcardsWS likes this.

Share This Page