Edit : in fact it seems to freez as soon as i try to load a module, not matter which one.
Code: Select all
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;
}