Unload PRX?

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

Moderators: cheriff, TyRaNiD

Post Reply
pj1115
Posts: 23
Joined: Mon Jan 22, 2007 4:46 am

Unload PRX?

Post by pj1115 »

Hey

I've coded a PRX module that is activated from the LCF-TV icon, and it does what it should do, but unfortunately, I can't work out how to offload the module afterwards.

I've tried sceKernelExitGame, sceKernelDeleteThread, and loads of other stuff but I can't find one that works....
Fanjita
Posts: 217
Joined: Wed Sep 28, 2005 9:31 am

Post by Fanjita »

Isn't it something like SelfStopUnloadModule() ?
Got a v2.0-v2.80 firmware PSP? Download the eLoader here to run homebrew on it!
The PSP Homebrew Database needs you!
pj1115
Posts: 23
Joined: Mon Jan 22, 2007 4:46 am

Post by pj1115 »

That's what I'm asking you! :p

I'll try that, cheers Fanjita.

BTW, congrats on the BBC interview!

EDIT: I have two choices in pspmodulemgr.h:

Code: Select all


/**
 * Stop and unload the current module.
 *
 * @param unknown - Unknown (I've seen 1 passed).
 * @param argsize - Size (in bytes) of the arguments that will be passed to module_stop().
 * @param argp - Pointer to arguments that will be passed to module_stop().
 *
 * @return ??? on success, otherwise one of ::PspKernelErrorCodes.
 */
int sceKernelSelfStopUnloadModule(int unknown, SceSize argsize, void *argp); 
or

Code: Select all

/**
 * Stop and unload the current module.
 *
 * @param argsize - Size (in bytes) of the arguments that will be passed to module_stop().
 * @param argp - Poitner to arguments that will be passed to module_stop().
 * @param status - Return value from module_stop().
 * @param option - Pointer to an optional ::SceKernelSMOption structure.
 *
 * @returns ??? on success, otherwise one of ::PspKernelErrorCodes.
 */
int sceKernelStopUnloadSelfModule(SceSize argsize, void *argp, int *status, SceKernelSMOption *option); 
I'm going to try and use sceKernelSelfStopUnloadModule, but I don't know what to enter as the last two args. Any idea?
pj1115
Posts: 23
Joined: Mon Jan 22, 2007 4:46 am

Post by pj1115 »

UPDATE: I tried to pass 'sceKernelSelfStopUnloadModule(1, 1, NULL);', but no luck. It doesn't unload.

I'll try sceKernelStopUnloadSelfModule but I've no idea what to pass to it. Any ideas?
pj1115
Posts: 23
Joined: Mon Jan 22, 2007 4:46 am

Post by pj1115 »

BUMP. Sorry.
fergie4000
Posts: 25
Joined: Fri Jan 19, 2007 3:03 pm

Post by fergie4000 »

does anyone know a successful way to remove the prx from ram? because it is stopping itself being run a second time.
pj1115
Posts: 23
Joined: Mon Jan 22, 2007 4:46 am

Post by pj1115 »

fergie4000 wrote:does anyone know a successful way to remove the prx from ram? because it is stopping itself being run a second time.
Nope, sorry, that's what I need to do!

So, you've at least managed to offload it? How did you do it?
Post Reply