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.25k stars 177 forks source link

[Question] Unmapping files #1065

Closed LuanTeles closed 2 months ago

LuanTeles commented 2 months ago

Aldo, i'm having some problem with the latest version

I'm using

/remap.ps3/dev_flash/vsh/resource/system_plugin.rco&to=/dev_flash/vsh/resource/AAA/system_plugin.rco

via boot_init and onxmb.bat, it is working good

and i'm unmapping it via ingame.bat

/unmap.ps3/dev_flash/vsh/resource/system_plugin.rco

but when i exit the game, the system goes to the recovery menu

any idea?

aldostools commented 2 months ago

Does this issue only happen with the latest version?

Is this an issue in HEN or CFW? Latest HEN is known to have issues with mappings.

system_plugin.rco is accessed frequently by GameOS.

Recently a mapping to that file was causing me all kind of random bugs and freeze in Evilnat until I found that it was caused by a mapping to random RCOs in /dev_hdd0/tmp/system_plugin

I recommend that avoid unmapping that file. If you need to change it, do it manually or in a moment when the file is not accessed.

LuanTeles commented 2 months ago

Does this issue only happen with the latest version?

Is this an issue in HEN or CFW? Latest HEN is known to have issues with mappings.

system_plugin.rco is accessed frequently by GameOS.

Recently a mapping to that file was causing me all kind of random bugs and freeze in Evilnat until I found that it was caused by a mapping to random RCOs in /dev_hdd0/tmp/system_plugin

I recommend that avoid unmapping that file. If you need to change it, do it manually or in a moment when the file is not accessed.

I just reverted back webMAN to .45, the same issue is happening, yesterday it was working, but on an older version of 4.91.2 and webman mod.

I'll revert back the Firmware to see if it is something related to the new beta builds

LuanTeles commented 2 months ago

I recommend that avoid unmapping that file. If you need to change it, do it manually or in a moment when the file is not accessed.

I'm mapping and unmapping it because my system_plugin has a transparent background and some animations that not fit the in-game trophies icons

So i am using the custom ones in vsh and in-game i'm reverting back to the default one with black background and no animations.

aldostools commented 2 months ago

Maybe it didn't happen because system_plugin.rco was not being accessed at the moment of the unmapping.

It's hard to control that unless you do it at kernel level within Cobra payload using mutex.

LuanTeles commented 2 months ago

i went back to the firmware i was and same webman, and same thing, haha

I'm still trying to figure out what i did yesterday that worked, i tried several times and all of them it succedded.

LuanTeles commented 2 months ago

@aldostools i found why it worked yesterday, my command was wrong, so it was just reading /remap.ps3 instead of thw whole command that is meant to unmap only my system_plugin.

The only issue is that /remap.ps3 removes other mapped files, i didn't realize that because my onxmb.bat and ingame.bat reapplies all my mappings again,

But it's curious why unmapping a specific file kicks to recovery and unmapping all the mappings works. can it be fixed?

LuanTeles commented 2 months ago

By the way, I have another question as well.

The PS3 Mod utilizes two XML files to toggle options between XAI commands and Webman commands. By default, the mod reads the XAI XML to display the options using xai commands when WebMAN is disabled.

When WebMAN is enabled, the following command is executed during boot_init:

/remap.ps3/dev_hdd0/game/PS34KPROL/USRDIR/toolbox/xmls/Features_Switch_Xai_Plugin.xml&to=/dev_flash/vsh/resource/explore/xmb/pro.xml

/remap.ps3/dev_hdd0/game/PS34KPROL/USRDIR/toolbox/remaps/Features_Switch_Webman_Plugin.xml&to=/dev_hdd0/game/PS34KPROL/USRDIR/toolbox/xmls/Features_Switch_Webman_Plugin.xml

This unmaps the XAI XML and enables the Webman one. However, this doesn't always work, resulting in duplicated items because the XMB reads the two xmls.

Interestingly, a funny thing happened, by mistake, I copied the command incorrectly:

/remap.ps3/dev_hdd0/game/PS34KPROL/USRDIR/toolbox/xmls/Features_Switch_Xai_Plugin.xml&to=/dev_flash/vsh/resource/explore/xmb/pro.xml&to=/dev_flash/vsh/resource/explore/xmb/pro.xml

Surprisingly, this works about 95% of the time. Occasionally, in some systems, the unmapping isn't executed in time (before the XMB loads), but most of the time, it does.

Do you have an idea why a wrong command is executed faster than the right one?

aldostools commented 2 months ago

The code is the same for both paths. Maybe XMB was doing something in background when you executed the right command.

Using /remap_ps3 may be a little faster due it doesn't check if the file or folder in the 2nd parameter exists.

If the first or second path don't exist, it can be slower due wMM verifies the path in serveral locations to check if it's an alias.

In regards to /remap.ps3 you can prevent that some paths are unmapped using /./ as prefix in the 2nd path.

Example: /remap.ps3/dev_flash/sys/external/libaudio.sprx&to=/./dev_hdd0/tmp/libaudio.sprx

LuanTeles commented 2 months ago

In regards to /remap.ps3 you can prevent that some paths are unmapped using /./ as prefix in the 2nd path.

Example: /remap.ps3/dev_flash/sys/external/libaudio.sprx&to=/./dev_hdd0/tmp/libaudio.sprx

Thank you aldo, i'll use it and /remap.ps3 to unload my system_plugin.rco, do you know why it happens? i mean unmapping the specific path gives errors (no matter if i'm in-game or remote play, i can use the command and wait minutes, same issue) and removing all no

aldostools commented 2 months ago

I already told you that it could be a coincidence that the file was in use when it was unmapped due system_plugin.rco is accessed very often by XMB.

The general unmap and the path specific unmap, both call the same function in mappath.c of Cobra.