Loading PRX in user mode???

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
R2k
Posts: 16
Joined: Fri Mar 17, 2006 10:49 am
Location: México

Loading PRX in user mode???

Post by R2k »

hi i'm using FW 2.6 and i'm trying to load a PRX i need to be in kernel mode to load it ?

i need to call pspSdkInstallNoPlainModuleCheckPatch() ????
placasoft
Posts: 53
Joined: Mon Mar 28, 2005 10:53 am

Post by placasoft »

Well for pspSdkInstallNoPlainModuleCheckPatch() you need kernel mode, so there is noway of loading a prx in usermode =/

nice day,
placa
User avatar
groepaz
Posts: 305
Joined: Thu Sep 01, 2005 7:44 am
Contact:

Post by groepaz »

except you implement your own prx loader :) (which isnt that hard afterall, just a bit of work)
hubevolution
Posts: 32
Joined: Wed Mar 17, 2004 6:59 pm

Post by hubevolution »

well that's true but actually the main reason for someone asking how can prx be loaded is because he wants to use system prx to access kernel-only features ... so a loader wouldn't do the trick in this case I guess :)
R2k
Posts: 16
Joined: Fri Mar 17, 2006 10:49 am
Location: México

Post by R2k »

hmm not exactly i'm trying to make custom-made PRXes i will try to figure out how to make my own PRX loader but the only i wanted to know if exists an alternative to pspSdkInstallNoPlainModuleCheckPatch(). thanks to everyone for the info
Fanjita
Posts: 217
Joined: Wed Sep 28, 2005 9:31 am

Post by Fanjita »

We plan to add PRX loading support to eLoader at some point in the quite near future, so if you're patient then you should get this support for free.

Alternatively if you do implement your own PRX loader, then I'd love to see the source ... ;)
Got a v2.0-v2.80 firmware PSP? Download the eLoader here to run homebrew on it!
The PSP Homebrew Database needs you!
User avatar
groepaz
Posts: 305
Joined: Thu Sep 01, 2005 7:44 am
Contact:

Post by groepaz »

indeed. and please document the relocation entries in some readable format (ie, not source :=D)
TyRaNiD
Posts: 907
Joined: Sun Jan 18, 2004 12:23 am

Post by TyRaNiD »

Manually loading a pspsdk prx file should be realtively painless, all the code and data is stored as a single contiguous block of data referenced by the the first program header, then it is just a case of going through the section headers pulling out the relocation ones and pulling out the relative offset of relocation from the loaded block and fixing it up relative to the place you loaded it at. Final steps are just to zero the .bss and fixup imports (which eLoader will already do).

Doing sony ones is slightly trickier as they actually contain two blocks of data and the relocations could be relative to either, but I cannot see much use for loading sony prxes for the most part.

groepaz's psp doc has info on the relocations, and there is always prxtool which does a cheating version of the reloc fix up already in its prx->elf conversion routine.
Post Reply