1. I make a kernel prx as plugin.
2. In my prx, I patched the scereg module: find the string "flash1:", change it to "ms0:". scereg will use this string to open registry file.
3. In another user mode prx, I want open registry file on ms0 using sceRegOpenRegistry, but it return fail. I trace this call:
-> sceRegOpenRegistry(...)
->sceIoGetstat("ms0:/registry", &stat);
The sceIoGetstat return 0x80010016, Invalid argument?
4. If I do not patch scereg in step 2, no problem found.
If prx run as kernel mode in step 3, no problem found.
Why sceIoGetstat return 80010016?
help about scereg and sceIoGetstat
Kernel mode can't call the getstat of memory stick driver in 2.XX-3.71.
I think it is a bug, and that Sony didn't do it on purpose, as doesn't happen in the 3.80 new driver.
If you are in the vsh, you are lucky, because M33 vsh core patches the issue, if you are in other mode, then not.
Tell me the firmware you are using, and I will tell you the patch to apply.
I think it is a bug, and that Sony didn't do it on purpose, as doesn't happen in the 3.80 new driver.
If you are in the vsh, you are lucky, because M33 vsh core patches the issue, if you are in other mode, then not.
Tell me the firmware you are using, and I will tell you the patch to apply.
Call this code in a kernel prx:
But notice that that code would be 3.71 dependant.
Also i must warn you that your registry redirection may not work totally if registry.prx uses ioctl codes to flush the flash, that are not available in the memory stick driver (therefore, sceIoIoctl would return an error). In that case, the best would be to dummy the calls that registry does to sceIoIoctl to make them return 0.
Code: Select all
u32 *mod = (u32 *)sceKernelFindModuleByName("sceMSFAT_Driver");
u32 text_addr = *(mod +27);
_sw(0, text_addr+0x22D8);
sceKernelDcacheWritebackAll();
sceKernelIcacheClearAll();
Also i must warn you that your registry redirection may not work totally if registry.prx uses ioctl codes to flush the flash, that are not available in the memory stick driver (therefore, sceIoIoctl would return an error). In that case, the best would be to dummy the calls that registry does to sceIoIoctl to make them return 0.