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

[Question] DEX detection #1128

Closed LuanTeles closed 1 month ago

LuanTeles commented 1 month ago

Aldo, I haven't tested it yet, but I suspect that if I use 'if DEX,' it doesn't work if the firmware is PEX in DEX mode or D-PEX. I realized this because some of my scripts are not working on these conditions. (i still need to do more tests, but only on the weekend)

Edit: Maybe i'm using "if CEX" too, it is not listed in the script examples, is it supported?

aldostools commented 1 month ago

webMAN MOD detects CEX or DEX checking some tags at the LV2 memory. PEX is not a real mode.

It detects 4.91 CEX if lv2_peek(0x2ED818) == CEX (0x4345580000000000) and timestamp at 0x2FCB58 is 2024/02/ It detects 4.91 DEX if lv2_peek(0x30F3B0) == DEX (0x4445580000000000) and timestamp at 0x2FCB58 is 2024/02/

if the firmware is not detected, webMAN uses the syscall 387 to get system version and syscall 985 to get the kernel type (CEX or DEX).

Indeed I could leave only the failover method. But checking the tags is more accurate.

LuanTeles commented 1 month ago

I found the issue.

When switching from DEX to CEX via Evilnat's CEX2DEX options, the kernel doesn't change, which is why the script isn't identifying it as DEX.

To be honest, I'm not sure why Evilnat's CEX to DEX switch only changes the TargetID and not the kernel, requiring the user to manually select the option and switch kernels after the first reboot, which makes the console reboot for the second time. Additionally, if the user wants to connect to PSN, the option to fake the TargetID is also needed, resulting in a third reboot.

I also found out that this is what's preventing my fork of the ip_text plugin by @jordywastaken from working in this situation.