I want to write prx code execute homebrew(fw1.50) in emulating mode(fw 2.xx).
So, my testing code following....
PSP_MODULE_INFO("ExecuteHB", 0x1000, 1, 1);
PSP_MAIN_THREAD_ATTR(0);
.........
ercd = sceKernelLoadExec(homebrewpath, NULL);
.........
But Error ocurs 0x80020149 which is SCE_KERNEL_ERROR_ILLEGAL_PERM_CALL
What is problem?
( I think this code in kernel mode. but behavior is not in --.)
Let me know please....
SecKernelLoadExec in PRX with devhook(FW2.xx)?
Correct me if I'm wrong, but I thought homebrew voor 2xx (using Devhook) was only in user mode.
nice to hear that I'm not the only one who tries to load 1.50 homebrew in 2.71 firmware (devhook or not, but expecialy for native 2.71 TA-82 users). I'm stucked at the point to emulate the 1.50 firmware to execute the 1.50 homebrew :p
nice to hear that I'm not the only one who tries to load 1.50 homebrew in 2.71 firmware (devhook or not, but expecialy for native 2.71 TA-82 users). I'm stucked at the point to emulate the 1.50 firmware to execute the 1.50 homebrew :p
I think, no exists any restriction in prx because prx is a part of kernel.etenia wrote:Correct me if I'm wrong, but I thought homebrew voor 2xx (using Devhook) was only in user mode.
nice to hear that I'm not the only one who tries to load 1.50 homebrew in 2.71 firmware (devhook or not, but expecialy for native 2.71 TA-82 users). I'm stucked at the point to emulate the 1.50 firmware to execute the 1.50 homebrew :p
If not, there is a cause or problem.
Let me know this.
With HEN enabled, you can load other (kernel mode) modules trough a usermode module. HEN is also avaible for devhook
HEN is made by Dark_Alex and should be good to find. I thought Moonlight (from this forum) and Dark_Alex were the same :p
Edit: I made a Module Extender (a prx loader) for SE-A/B, but it only works on Devhook, because you can't load modules from a memorystick from SE (atm).
But what I want to say is that my Module Extender is in user mode. So it should be possible (but I will test my own code to make sure I'm not lying :p )
where line is the module path.
I should mention that this a module wich loads other modules, so it's not in eboot format
HEN is made by Dark_Alex and should be good to find. I thought Moonlight (from this forum) and Dark_Alex were the same :p
Edit: I made a Module Extender (a prx loader) for SE-A/B, but it only works on Devhook, because you can't load modules from a memorystick from SE (atm).
But what I want to say is that my Module Extender is in user mode. So it should be possible (but I will test my own code to make sure I'm not lying :p )
Code: Select all
PSP_MODULE_INFO("SE_ME", 0, 1, 1);
PSP_MAIN_THREAD_ATTR(PSP_THREAD_ATTR_USER);
Code: Select all
SceUID mod = pspSdkLoadStartModule(line, PSP_MEMORY_PARTITION_KERNEL);
if (mod < 0 )
{
fprintf(strout,"Loading module: '%s' failed (%x)\n", line, mod);
errorsCount++;
}
I should mention that this a module wich loads other modules, so it's not in eboot format
You can't loadexec anything from kernel mode in 2.XX, the function sceKernelLoadExec in LoadExecForKernel doesn't exit anymore, and the function for LoadExecForUser gives the error illegal perm call when called from a vsh or kernel thread.
Of course in kernel mode you can patch everything. Looking at the asm code, you only have to patch a couple of conditionals to get rid of the illegal permanent call error.
Using user functions in kernel prx's is not a good idea in 2.XX. In fact, in 2.8X it is prohibited and a kernel prx with user imports doesn't load anymore...
Of course in kernel mode you can patch everything. Looking at the asm code, you only have to patch a couple of conditionals to get rid of the illegal permanent call error.
Using user functions in kernel prx's is not a good idea in 2.XX. In fact, in 2.8X it is prohibited and a kernel prx with user imports doesn't load anymore...
Thanks for your answer.moonlight wrote:You can't loadexec anything from kernel mode in 2.XX, the function sceKernelLoadExec in LoadExecForKernel doesn't exit anymore, and the function for LoadExecForUser gives the error illegal perm call when called from a vsh or kernel thread.
Of course in kernel mode you can patch everything. Looking at the asm code, you only have to patch a couple of conditionals to get rid of the illegal permanent call error.
Using user functions in kernel prx's is not a good idea in 2.XX. In fact, in 2.8X it is prohibited and a kernel prx with user imports doesn't load anymore...
I already found it from your prx document home.
So, I try to another and have a question.
Why can't use pspsdk's libc in kernel mode?
(same reason above?)