forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Unload PRX?

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
pj1115



Joined: 22 Jan 2007
Posts: 23

PostPosted: Sun Mar 04, 2007 12:59 am    Post subject: Unload PRX? Reply with quote

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....
Back to top
View user's profile Send private message
Fanjita



Joined: 28 Sep 2005
Posts: 217

PostPosted: Sun Mar 04, 2007 6:51 am    Post subject: Reply with quote

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!
Back to top
View user's profile Send private message
pj1115



Joined: 22 Jan 2007
Posts: 23

PostPosted: Sun Mar 04, 2007 9:38 am    Post subject: Reply with quote

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:


/**
 * 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:

/**
 * 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?
Back to top
View user's profile Send private message
pj1115



Joined: 22 Jan 2007
Posts: 23

PostPosted: Sun Mar 04, 2007 10:01 pm    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
pj1115



Joined: 22 Jan 2007
Posts: 23

PostPosted: Mon Mar 05, 2007 8:25 am    Post subject: Reply with quote

BUMP. Sorry.
Back to top
View user's profile Send private message
fergie4000



Joined: 19 Jan 2007
Posts: 25

PostPosted: Mon Mar 05, 2007 9:19 pm    Post subject: Reply with quote

does anyone know a successful way to remove the prx from ram? because it is stopping itself being run a second time.
Back to top
View user's profile Send private message
pj1115



Joined: 22 Jan 2007
Posts: 23

PostPosted: Tue Mar 06, 2007 3:01 am    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group