aldostools / webMAN-MOD

Extended services for PS3 console (web server, ftp server, netiso, ntfs, ps3mapi, etc.)
https://aldostools.github.io/webMAN-MOD/
GNU General Public License v3.0
1.32k stars 175 forks source link

webMAN-MOD sprx plugin is bloated #636

Closed TheRouletteBoi closed 2 years ago

TheRouletteBoi commented 2 years ago

The sprx plugin is so big that it is difficult to run when having multiple vsh plugins at the same time, It has everything and that is a good thing and bad thing. I believe the main issue is the memory limit on ps3, I'm not sure how exactly we can tackle this issue, but we can maybe start by removing legacy features. I love the plugin and I use it a lot.

You maybe ask "Why don't you modify the source for your own needs?" I could but what if I want to use another plugin or release my plugin own to the public and most ps3 users have web man installed, so they will have issues when loading multiple vsh plugins at the same time.

"Why don't you use web man LITE?". Well web man full doesn't have the ability to load games which is the main thing people use it for. Another thing to consider when using LITE that will require users that would want to use an extra plugin to install webman LITE

Masamune3210 commented 2 years ago

Are there many plugins people want to load at once? Honestly haven't seen many people load anything other than webman

aldostools commented 2 years ago

@TheRouletteBoi Thank you for your feedback.

The issue that you mention is in fact a design goal of wMM: to have an AIO plugin to manage everything in the system. So other plugins are rarely needed.

I'm aware of the memory restrictions and that's why I dedicate hundreds of hours optimizing the code, reusing functions, reducing strings, etc. And that's the main reason why the LITE edition exists.

The memory usage is divided in these types:

To reduce the memory footprint I give the option to install the LITE edition when the user needs a lot of free memory. I also give the option to unload the plugin.

The stack memory could be improved a bit, but it requires a lot of trial/error to find the minimum stack memory.

The heap memory is normally taken from the memory containers and they are used only when specific tasks are done (scan for content, ftp transfer, web access, etc). I recommend to select the background memory container in /setup.ps3.

Some features like video recording, rawseciso, netiso, slaunch, vsh menu are loaded into memory dynamically from external plugins. So they don't consume memory unless they are used.

Possible modules that could be moved to dynamic plugins are:

Well web man full doesn't have the ability to load games which is the main thing people use it for. Another thing to consider when using LITE that will require users that would want to use an extra plugin to install webman LITE

I didn't understand what you mean. wMM main feature is load games. If you have a specific feature that you want added or removed, please let me know.

PS3-4K-Pro commented 2 years ago

The sprx plugin is so big that it is difficult to run when having multiple vsh plugins at the same time, It has everything and that is a good thing and bad thing. I believe the main issue is the memory limit on ps3, I'm not sure how exactly we can tackle this issue, but we can maybe start by removing legacy features. I love the plugin and I use it a lot.

You maybe ask "Why don't you modify the source for your own needs?" I could but what if I want to use another plugin or release my plugin own to the public and most ps3 users have web man installed, so they will have issues when loading multiple vsh plugins at the same time.

"Why don't you use web man LITE?". Well web man full doesn't have the ability to load games which is the main thing people use it for. Another thing to consider when using LITE that will require users that would want to use an extra plugin to install webman LITE

My system has 9 plugins running together without any problems.

Btw i liked your vsh menu, could the FPS counter be released as a standalone pluguin?

aldostools commented 2 years ago

Btw i liked your vsh menu, could the FPS counter be released as a standalone pluguin?

That FPS counter would be interesting if it could be used with this CFW modded by zecoxao https://twitter.com/notzecoxao/status/1505561287291506690

TheRouletteBoi commented 2 years ago

Well web man full doesn't have the ability to load games which is the main thing people use it for. Another thing to consider when using LITE that will require users that would want to use an extra plugin to install webman LITE

I didn't understand what you mean. wMM main feature is load games. If you have a specific feature that you want added or removed, please let me know.

I meant web man lite doesn't have the ability to load games

aldostools commented 2 years ago

It can mount games and start them from XMB. I still don't understand your point.

If it isn't mounting games then it could be some bug that haven't been reported.

TheRouletteBoi commented 2 years ago

My system has 9 plugins running together without any problems.

can you tell me the 9 plugins you use I would like to test and run this while loading a AAA game like GTAV or GOW3. Most of the time when I having multiple plugins with a AAA game I either get a black screen or get prompted to reinstall FW

Btw i liked your vsh menu, could the FPS counter be released as a standalone pluguin?

I made a standalone FPS plugin for you to test. VshFpsCounter.sprx

PS3-4K-Pro commented 2 years ago

My system has 9 plugins running together without any problems.

can you tell me the 9 plugins you use I would like to test and run this while loading a AAA game like GTAV or GOW3. Most of the time when I having multiple plugins with a AAA game I either get a black screen or get prompted to reinstall FW

Btw i liked your vsh menu, could the FPS counter be released as a standalone pluguin?

I made a standalone FPS plugin for you to test. VshFpsCounter.sprx

Working really good, can you move it to upper left corner , or its due to the other resolutions?

Btw if your vsh plugin is enabled it will freeze the system, removing /dev_hdd0/plugins/RouLetteVshMenu.sprx works.

I'm using; /dev_hdd0/plugins/EBOOTLoader.sprx /dev_hdd0/plugins/PS3Lock/ps3lock_vsh.sprx /dev_hdd0/plugins/gameboot_cycle.sprx /dev_hdd0/plugins/ps3_menu/ps3_vsh_menu.sprx /dev_hdd0/plugins/ps3xpad/xpad_vsh.sprx /dev_hdd0/plugins/psnpatch.sprx (not necessary anymore, i don't know why i keep this) /dev_hdd0/plugins/rainbow_xmb.sprx /dev_hdd0/plugins/slaunch.sprx /dev_hdd0/plugins/RouLetteVshMenu.sprx /dev_hdd0/plugins/webftp_server.sprx

I never had any problems with games

aldostools commented 2 years ago

@LuanTeles You don't need /dev_hdd0/plugins/slaunch.sprx either. It's loaded on demand from /dev_hdd0/tmp/wm_res

PS3-4K-Pro commented 2 years ago

@LuanTeles You don't need /dev_hdd0/plugins/slaunch.sprx either. It's loaded on demand from /dev_hdd0/tmp/wm_res

I know, I just keep it there because my Plugin Manager XMBML menu has the option to disable webman and if user wants to disable webman for some reason and keep slaunch he can, it never gave me any problems, so I kept it :P

but normally only the following is enabled. /dev_hdd0/plugins/PS3Lock/ps3lock_vsh.sprx /dev_hdd0/plugins/ps3_menu/ps3_vsh_menu.sprx (for in game music controls) /dev_hdd0/plugins/ps3xpad/xpad_vsh.sprx /dev_hdd0/plugins/webftp_server.sprx

Edit: The only thing I hear from people is that sometimes artemis doesn't work with webman, system crashes or goes to recovery screen to restore fw (easily bypassed by start+select), but i don't usually play on PS3 so i don't know.

Edit 2: I've never tried mod menus, but on second thought I remember some friends always unloading/switching to webMAN MOD lite version to run GTAV sprxs, but it isn't a problem anymore as the online server is down

aldostools commented 2 years ago

@TheRouletteBoi Your VshFpsCounter.sprx is working great, except that it stays in memory when I unload it through PS3MAPI web interface in wMM.

TheRouletteBoi commented 2 years ago

Working really good, can you move it to upper left corner , or its due to the other resolutions?

Yes, that is due to resolutions and it can be fixed once I figure out how to get active screen resolution.

Btw if your vsh plugin is enabled it will freeze the system, removing /dev_hdd0/plugins/RouLetteVshMenu.sprx works.

This actually makes sense since both of my sprx's are hooking the same function to render text. I would recommend either unloading one of them using webman or, like you explained by removing it from boot plugins

TheRouletteBoi commented 2 years ago

@TheRouletteBoi Your VshFpsCounter.sprx is working great, except that it stays in memory when I unload it through PS3MAPI web interface in wMM.

I use the same method used with webman plugin. Perhaps I'm doing something wrong. unloading

aldostools commented 2 years ago

Use the exit method in VSH menu or slaunch project. They work fine. https://github.com/aldostools/webMAN-MOD/tree/master/_Projects_/slaunch https://github.com/aldostools/webMAN-MOD/tree/master/_Projects_/vsh_menu

Check these lines of code: https://github.com/aldostools/webMAN-MOD/blob/master/_Projects_/vsh_menu/main.c#L1656-L1706

Also slaunch has a function that detects the current resolution using: disp_w = getDisplayWidth(); disp_h = getDisplayHeight();

extern u32 paf_F476E8AA(void); // u32 get_display_width

define getDisplayWidth paf_F476E8AA

extern u32 paf_AC984A12(void); // u32 get_display_height

define getDisplayHeight paf_AC984A12

For the paf functions you can use the libpaf_export_stub.a or use getNIDfunc("paf", 0xF476E8AA, 0);

TheRouletteBoi commented 2 years ago

Use the exit method in VSH menu or slaunch project. They work fine. https://github.com/aldostools/webMAN-MOD/tree/master/_Projects_/slaunch https://github.com/aldostools/webMAN-MOD/tree/master/_Projects_/vsh_menu

Check these lines of code: https://github.com/aldostools/webMAN-MOD/blob/master/_Projects_/vsh_menu/main.c#L1656-L1706

Also slaunch has a function that detects the current resolution using: disp_w = getDisplayWidth(); disp_h = getDisplayHeight();

extern u32 paf_F476E8AA(void); // u32 get_display_width #define getDisplayWidth paf_F476E8AA

extern u32 paf_AC984A12(void); // u32 get_display_height #define getDisplayHeight paf_AC984A12

For the paf functions you can use the libpaf_export_stub.a or use getNIDfunc("paf", 0xF476E8AA, 0);

Unloading works great now thanks to you, All this time I've been unloading incorrectly smh 🤦‍♂️

As for resolution detection I already use paf_F476E8AA & paf_AC984A12 width and height

aldostools commented 2 years ago

Unloading works great now thanks to you, All this time I've been unloading incorrectly smh 🤦‍♂️

That's great... I love your FPS plugin.

As for resolution detection I already use paf_F476E8AA & paf_AC984A12

Then you only have to adjust the x, y coordinates when screenHeight is 1080, 720, 576 or 480.

Some ideas / suggestions:

LouisGarry commented 2 years ago

My suggestions:

  1. sprx uses the 3.55 key to support HEN
  2. Maybe it's better positioned at the bottom right of the screen, above the "Connected From:" (DEX CFW/ DEX XMB Plugin), because the top left clashes with the GTA V MOD Menu.

Thanks.

TheRouletteBoi commented 2 years ago

My suggestions:

  1. sprx uses the 3.55 key to support HEN
  2. Maybe it's better positioned at the bottom right of the screen, above the "Connected From:" (DEX CFW/ DEX XMB Plugin), because the top left clashes with the GTA V MOD Menu.

Thanks.

The current VshFpsCounter.sprx is already signed with 3.55 keys so it should work on HEN.

As for the suggestions by you and Aldos there is a new version is comming with a full fledged vsh menu Akari provided by @Jordy-Nateur. The sprx will be here posted once all tests are good.

ghost commented 2 years ago

The sprx will be here posted once all tests are good.

Here it is: https://github.com/Jordy-Nateur/Akari/releases/tag/v1.1.0

LouisGarry commented 2 years ago

Use the exit method in VSH menu or slaunch project. They work fine. https://github.com/aldostools/webMAN-MOD/tree/master/_Projects_/slaunch https://github.com/aldostools/webMAN-MOD/tree/master/_Projects_/vsh_menu Check these lines of code: https://github.com/aldostools/webMAN-MOD/blob/master/_Projects_/vsh_menu/main.c#L1656-L1706 Also slaunch has a function that detects the current resolution using: disp_w = getDisplayWidth(); disp_h = getDisplayHeight(); extern u32 paf_F476E8AA(void); // u32 get_display_width #define getDisplayWidth paf_F476E8AA extern u32 paf_AC984A12(void); // u32 get_display_height #define getDisplayHeight paf_AC984A12 For the paf functions you can use the libpaf_export_stub.a or use getNIDfunc("paf", 0xF476E8AA, 0);

Unloading works great now thanks to you, All this time I've been unloading incorrectly smh man_facepalming

As for resolution detection I already use paf_F476E8AA & paf_AC984A12 width and height

Hello master can you share this fixed binary file? if I may request, the position of the "FPS" is in the top center. I prefer standalone plugins because they use less memory. Thank you.

aldostools commented 2 years ago

The sprx will be here posted once all tests are good.

Here it is: https://github.com/Jordy-Nateur/Akari/releases/tag/v1.1.0

Today I was testing your VSH Menu and I should say that I'm very impressed with your menu.

The plugin is great as it is now. I have some small cosmetic suggestions:

Additional options that could be included to the menu in a future release;

LouisGarry commented 2 years ago

Use the exit method in VSH menu or slaunch project. They work fine. https://github.com/aldostools/webMAN-MOD/tree/master/_Projects_/slaunch https://github.com/aldostools/webMAN-MOD/tree/master/_Projects_/vsh_menu Check these lines of code: https://github.com/aldostools/webMAN-MOD/blob/master/_Projects_/vsh_menu/main.c#L1656-L1706 Also slaunch has a function that detects the current resolution using: disp_w = getDisplayWidth(); disp_h = getDisplayHeight(); extern u32 paf_F476E8AA(void); // u32 get_display_width #define getDisplayWidth paf_F476E8AA extern u32 paf_AC984A12(void); // u32 get_display_height #define getDisplayHeight paf_AC984A12 For the paf functions you can use the libpaf_export_stub.a or use getNIDfunc("paf", 0xF476E8AA, 0);

Unloading works great now thanks to you, All this time I've been unloading incorrectly smh man_facepalming As for resolution detection I already use paf_F476E8AA & paf_AC984A12 width and height

Hello master can you share this fixed binary file? if I may request, the position of the "FPS" is in the top center. I prefer standalone plugins because they use less memory. Thank you.

Please master @TheRouletteBoi 🙏🏻

TheRouletteBoi commented 2 years ago

Use the exit method in VSH menu or slaunch project. They work fine. https://github.com/aldostools/webMAN-MOD/tree/master/_Projects_/slaunch https://github.com/aldostools/webMAN-MOD/tree/master/_Projects_/vsh_menu Check these lines of code: https://github.com/aldostools/webMAN-MOD/blob/master/_Projects_/vsh_menu/main.c#L1656-L1706 Also slaunch has a function that detects the current resolution using: disp_w = getDisplayWidth(); disp_h = getDisplayHeight(); extern u32 paf_F476E8AA(void); // u32 get_display_width #define getDisplayWidth paf_F476E8AA extern u32 paf_AC984A12(void); // u32 get_display_height #define getDisplayHeight paf_AC984A12 For the paf functions you can use the libpaf_export_stub.a or use getNIDfunc("paf", 0xF476E8AA, 0);

Unloading works great now thanks to you, All this time I've been unloading incorrectly smh man_facepalming As for resolution detection I already use paf_F476E8AA & paf_AC984A12 width and height

Hello master can you share this fixed binary file? if I may request, the position of the "FPS" is in the top center. I prefer standalone plugins because they use less memory. Thank you.

Please master @TheRouletteBoi 🙏🏻

@LouisGarry https://github.com/TheRouletteBoi/RouLetteVshMenu/releases/tag/fps-counter-2.0

aldostools commented 2 years ago

https://github.com/TheRouletteBoi/RouLetteVshMenu/releases/tag/fps-counter-2.0

Thank you for the overlay-only plugin. Now we can have the FPS + temp + RAM without freeze using sLaunch or VSH menu for wMM.

I have some small requests:

LouisGarry commented 2 years ago

@LouisGarry https://github.com/TheRouletteBoi/RouLetteVshMenu/releases/tag/fps-counter-2.0

Thank you master.

TheRouletteBoi commented 2 years ago

https://github.com/TheRouletteBoi/RouLetteVshMenu/releases/tag/fps-counter-2.0

Thank you for the overlay-only plugin. Now we can have the FPS + temp + RAM without freeze using sLaunch or VSH menu for wMM.

I have some small requests:

  • The label "Firmware: " is redundant. 4.88 CEX Cobra 8.30
  • It would be nice to have the temperatures in Celcius (maybe you can show F and C every few seconds).
  • Fan speed could be moved above RAM (not really important, you can leave it below RAM if you prefer).
  • It would be cool if the plugin monitor some memory address in LV2 and show text when the string has some value. It can be used to display messages, progress, additional info, etc. from other homebrews.

Would you happen to know how to get application version? At the moment it only retrieves the tittle name and tittle id

As for the LV2 to text, we need to agree on an offset that can be compatible with multiple firmwares and wound't it be better if done with a syscall? Let me know what you think

LouisGarry commented 2 years ago

Master @TheRouletteBoi , if you have time maybe you can add hold SELECT for unload?

Thanks.

aldostools commented 2 years ago

I'm reading the APP_VER from PARAM.SFO I check the path in dev_hdd0 and dev_bdvd Probably that information is found in memory, but I haven't found where.

The offset for the text can be any that you decide. The we could implement a Cobra opcode to set the value with a ps3mapi syscall.

It would be cool if your plugin read the config created by Akari. It could use the same combo for unload it.

TheRouletteBoi commented 2 years ago

The problem with using button binding/combos in VshFpsCounter.sprx is that it will crash the system when using sLauncher or VSH menu by wMM

aldostools commented 2 years ago

Ok, that's not a problem. The plugin can be unloaded with a custom combo in wMM, using PS3MAPI gui or through custom XML sending a web command 🙄

LouisGarry commented 2 years ago

Ok, that's not a problem. The plugin can be unloaded with a custom combo in wMM,

Great master @aldostools , maybe in another update you can add the L3+R3 combo to unload VshFpsCounter.sprx.

Thanks.

LouisGarry commented 2 years ago

Master @TheRouletteBoi, I tried to replace wm_vsh_menu.sprx with VshFpsCounter.sprx, there's something strange, if you hold down SELECT to load the plugin it will load VshFpsCounter.sprx over and over, so the FPS output becomes double.

Thanks.

aldostools commented 2 years ago

Do not need to make such kind of changes, I will include VshFpsCounter.sprx in the next update.

aldostools commented 2 years ago

@LouisGarry You can update to get FPS counter. Remove the plugin from boot_plugins.txt if you're loading it.

LouisGarry commented 2 years ago

Thanks master @aldostools, it works.

LouisGarry commented 2 years ago

Master @TheRouletteBoi, after trying to play PSN PS3 games (I am trying GTA V, 1942, Bomberman), when Quit Game, PS3 becomes no signal (image) on the monitor. Had to hold the power button 20 seconds to turn it off. JB games, ISO PS3, can be played and Quit Game normally.

It didn't happen in the previous plugin.

Thanks.

TheRouletteBoi commented 2 years ago

Master @TheRouletteBoi, after trying to play PSN PS3 games (I am trying GTA V, 1942, Bomberman), when Quit Game, PS3 becomes no signal (image) on the monitor. Had to hold the power button 20 seconds to turn it off. JB games, ISO PS3, can be played and Quit Game normally.

It didn't happen in the previous plugin.

Thanks.

Has this happened to you multiple times or just once?

LouisGarry commented 2 years ago

Multiple times