Exemple #1
0
SceUID pspSdkLoadStartModule(const char *filename, int mpid)
{
	return pspSdkLoadStartModuleWithArgs(filename, mpid, 0, NULL);
}
int main_thread(SceSize _argc, ScePVoid _argp)
{
	char *arg = *(char**)_argp;
	char jpcspConnectorPrx[256] = { 0 };

	debug("Starting main_thread");
	if(arg)
	{
		char *p = strrchr(arg, '/');
		if (p != NULL)
		{
			*(p+1) = 0;
			strcpy(jpcspConnectorPrx, arg);
		}
	}

	strcat(jpcspConnectorPrx, "JpcspConnector.prx");


	
	pspDebugScreenInit();



	debug("Loading audiocodec.prx");
	if(pspSdkLoadStartModule("flash0:/kd/audiocodec.prx", PSP_MEMORY_PARTITION_KERNEL) < 0)
	{
		pspDebugScreenPrintf("Error loading module audiocodec.prx\n");
		return -1;
	}

	debug("Loading videocodec.prx");
	if(pspSdkLoadStartModule("flash0:/kd/videocodec.prx", PSP_MEMORY_PARTITION_KERNEL) < 0)
	{
		pspDebugScreenPrintf("Error loading module videocodec.prx\n");
		return -1;
	}

	debug("Loading mpegbase.prx");
	if(pspSdkLoadStartModule("flash0:/kd/mpegbase.prx", PSP_MEMORY_PARTITION_KERNEL) < 0)
	{
		pspDebugScreenPrintf("Error loading module mpegbase.prx\n");
		return -1;
	}

	debug("Loading mpeg_vsh.prx");
	if(pspSdkLoadStartModule("flash0:/kd/mpeg_vsh.prx", PSP_MEMORY_PARTITION_USER) < 0)
	{
		pspDebugScreenPrintf("Error loading module mpeg_vsh.prx\n");
		return -1;
	}

	debug("Loading semawm.prx");
	if(pspSdkLoadStartModule("flash0:/kd/semawm.prx", PSP_MEMORY_PARTITION_KERNEL) < 0)
	{
		pspDebugScreenPrintf("Error loading module semawm.prx\n");
		return -1;
	}

	debug("Loading usbstor.prx");
	if(pspSdkLoadStartModule("flash0:/kd/usbstor.prx", PSP_MEMORY_PARTITION_KERNEL) < 0)
	{
		pspDebugScreenPrintf("Error loading module usbstor.prx\n");
		return -1;
	}

	debug("Loading usbstormgr.prx");
	if(pspSdkLoadStartModule("flash0:/kd/usbstormgr.prx", PSP_MEMORY_PARTITION_KERNEL) < 0)
	{
		pspDebugScreenPrintf("Error loading module usbstormgr.prx\n");
		return -1;
	}

	debug("Loading usbstorms.prx");
	if(pspSdkLoadStartModule("flash0:/kd/usbstorms.prx", PSP_MEMORY_PARTITION_KERNEL) < 0)
	{
		pspDebugScreenPrintf("Error loading module usbstorms.prx\n");
		return -1;
	}

	debug("Loading usbstorboot.prx");
	if(pspSdkLoadStartModule("flash0:/kd/usbstorboot.prx", PSP_MEMORY_PARTITION_KERNEL) < 0)
	{
		pspDebugScreenPrintf("Error loading module usbstorboot.prx\n");
		return -1;
	}

	debug("Loading JpcspConnector.prx");
	char* file = "ms0:/movie.pmf";
	if(pspSdkLoadStartModuleWithArgs(jpcspConnectorPrx, PSP_MEMORY_PARTITION_USER, 1, &file) < 0)
	{
		pspDebugScreenPrintf("Error loading module JpcspConnector.prx\n");
		return -1;
	}

	sceKernelExitGame();

	return 0;
}