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 

Impossible to load usb module under 3.90 fw

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



Joined: 29 May 2005
Posts: 214

PostPosted: Mon Feb 18, 2008 12:14 am    Post subject: Impossible to load usb module under 3.90 fw Reply with quote

Hello, i'm trying to load the usb modules under the 390 fw in game mode, it was working great under the 380 one. Now the psp hang as soon as i try to load a module. If someone have an idea, here is the code i'm using :

Edit : in fact it seems to freez as soon as i try to load a module, not matter which one.

Code:

int loadStartModule(const char *name, int argc, char **argv)
{
   SceUID modid;
   int status;
   char args[1024];
   int len;

   modid = kuKernelLoadModule(name, 0, NULL);
   if(modid >= 0)
   {
      len = build_args(args, name, argc, argv);
      modid = sceKernelStartModule(modid, len, (void *) args, &status, NULL);
   }
   else
   {
      printf("lsm: Error loading module %s\n", name);
   }

   return modid;
}

int usbInit(){

   u32 retVal;

   //start necessary drivers
   loadStartModule("flash0:/kd/chkreg.prx", 0, NULL);   
   loadStartModule("flash0:/kd/npdrm.prx", 0, NULL);
   loadStartModule("flash0:/kd/semawm.prx", 0, NULL);
   loadStartModule("flash0:/kd/usbstor.prx", 0, NULL);
   loadStartModule("flash0:/kd/usbstormgr.prx", 0, NULL);
   loadStartModule("flash0:/kd/usbstorms.prx", 0, NULL);
   loadStartModule("flash0:/kd/usbstorboot.prx", 0, NULL);

   //setup USB drivers
   retVal = sceUsbStart(PSP_USBBUS_DRIVERNAME, 0, 0);
   if (retVal != 0) {
      return -6;
   }

   retVal = sceUsbStart(PSP_USBSTOR_DRIVERNAME, 0, 0);
   if (retVal != 0) {
      return -7;
   }

   retVal = sceUsbstorBootSetCapacity(0x800000);
   if (retVal != 0) {
      return -8;
   }

    return 0;
}

int usbActivate()
{
   sceUsbActivate(0x1c8);
   return 0;
}

int usbDeactivate()
{
    sceUsbDeactivate(0x1c8);
   sceIoDevctl("fatms0:", 0x0240D81E, NULL, 0, NULL, 0 );
   return 0;
}
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