Open PHTNCx64 opened 3 years ago
Thank you for your feedback. I thought the same when I checked the code. That double check was implemented by NzV (the developer that introduced PS3MAPI in Cobra/Mamba payload).
I agree with you that your code is more efficent. However, that double check is working and I don't want to break it in case there is some condition that NzV considered that we are not taking in count.
Anyway that code does not affect the performance. And the code overhead is minimal.
While I do agree that the correction does not really affect performance, it makes the code look much cleaner than the original form. I'll try compiling Mamba with my correction and see how it affects the function. Since it's basic LV2 Peek Poke, I don't think there's gonna be a difference between my and his code. I'll also check if any other Mamba/Cobra function that makes usage of this check, is behaving differently than it should.
Have you tried contacting NzV and asked him about the double check of the function? I'd like to do it, but can't find any contact to him, he also hasn't been online since 5 years on PSX-Place.. :/
No, I haven't contacted NzV. He is retired from PS3 scene. He also removed his repository from github long time ago.
If you have good results in your test, please report back here.
I've tested this now and I haven't noticed any differences while checking through activated and deactivated syscalls on Rebug 4.84 D-REX Mamba (Cobra was deactivated). PRX Loader beeped once which indicates that everything executed and installed flawlessly. In my opinion, it's safe to change the code.
Thank you for your feedback. I just implemented the change in the repository.
I'm not quite sure if this was done on purpose, or by accident, but I've noticed that in ps3mapi_core.c in the function int ps3mapi_check_syscall(int num) that MAMBA (and also Cobra) does check the availability for the specified syscall twice... I don't know what purpose it serves to do the same task twice, so my suggestion is changing it from:
to: