Impossible to load usb module under 3.90 fw

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

Moderators: cheriff, TyRaNiD

Post Reply
Cpasjuste
Posts: 214
Joined: Sun May 29, 2005 8:28 am

Impossible to load usb module under 3.90 fw

Post by Cpasjuste »

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: 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;
}
Post Reply