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 

Can't load PRX after unloading.

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



Joined: 16 Jun 2009
Posts: 2

PostPosted: Mon Sep 14, 2009 5:06 am    Post subject: Can't load PRX after unloading. Reply with quote

I'm working on small prx which will be started from XMB (by overriding a update_plugin.prx). Problem is that after I start it once (plugin prints menu over vsh)I can start it again even that I try to unload the module every time. To get menu showing again it I have to reboot the console, or start and close any game.

Source code:
Code:
#include <pspkernel.h>
#include <pspctrl.h>
#include <stdio.h>
#include <stdlib.h>
#include <pspkerror.h>
 
 
PSP_MODULE_INFO("Shutdown", 0x800, 1, 0);
 
int main (int argc, char **argv) //(int argc, char* argv[])
{
   pspDebugScreenInit();

   while(0x80020143 == sceKernelSelfStopUnloadModule(1, 0, NULL))
   {   
      pspDebugScreenSetXY(1,1);
      pspDebugScreenPrintf("%s", "busy!");
      sceKernelDelayThread(10000);
   }

   return 0;
}


Makefile:
Code:
TARGET = update_plugin
OBJS = main.o

BUILD_PRX=1

INCDIR =
CFLAGS = -O2 -G0 -Wall
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)

LIBDIR =
LDFLAGS =

PSPSDK=$(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build.mak
Back to top
View user's profile Send private message
Torch



Joined: 28 May 2008
Posts: 842

PostPosted: Mon Sep 14, 2009 9:46 pm    Post subject: Reply with quote

Add more debugging code. See if your module even starts the second time.

There are two functions:
sceKernelSelfStopUnloadModule and another similar one. IIRC one of them doesn't work.
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