Esempio n. 1
0
File: main.c Progetto: AlanDrake/ags
int launcher_thread(SceSize args, void *argp)
{
	int status = 0;

	// Unload the launcher
	SceModule2* mod = (SceModule2*)sceKernelFindModuleByName("launcher");
    int result = sceKernelStopModule(mod->modid, 0, NULL, &status, NULL);
	result = sceKernelUnloadModule(mod->modid);
	
	// Load the game engine
	SceUID modid = sceKernelLoadModule(exefile, 0, NULL);
	sceKernelStartModule(modid, paramlength, parameters, &status, NULL);
	
	// Unload this module
	sceKernelSelfStopUnloadModule(1, 0, NULL);
	
	return 0;
}
Esempio n. 2
0
int _main(SceSize args, void *argp)
{
	char path[1024];
	char *slash;

	do
	{
		pspDebugScreenInit();
		pspDebugScreenPrintf("PSPLink Bootstrap TyRaNiD (c) 2k7 Version %s\n", PSPLINK_VERSION);
		strcpy(path, argp);
		slash = strrchr(path, '/');
		if(slash == NULL)
		{
			pspDebugScreenPrintf("Could not find last slash\n");
			break;
		}
		slash++;
		*slash = 0;
		strcat(path, MODULE);

		SceUID mod = sceKernelLoadModule(path, 0, NULL);
		if (mod < 0)
		{
			pspDebugScreenPrintf("Error 0x%08X loading module %s.\n", mod, path);
			break;
		}

		mod = sceKernelStartModule(mod, args, argp, NULL, NULL);
		if (mod < 0)
		{
			pspDebugScreenPrintf("Error 0x%08X starting module %s.\n", mod, path);
			break;
		}

		sceKernelSelfStopUnloadModule(1, 0, NULL);
	}
	while(0);

	sceKernelDelayThread(2000000);
	sceKernelExitGame();

	return 0;
}
Esempio n. 3
0
File: font.c Progetto: rnbpsp/pmc
int load(SceSize args, void *argp){
	int stat,modid;
	if(sceKernelStartModule(modid=sceKernelLoadModule("flash0:/vsh/module/libfont_hv.prx",0,NULL),0,NULL,&stat,NULL)<0)return -__LINE__;
	int errorCode;
	InitParam initParams = {NULL,4,NULL,myMalloc,myFree,NULL,NULL,NULL,NULL,NULL,NULL};
	void* libID = sceFontNewLib(&initParams, &errorCode);if(errorCode)return  -__LINE__;
	void* fontID = sceFontOpen(libID, FONT(BOLD), FILE, &errorCode);if(errorCode)return -__LINE__;
	memset((void*)0x44000000,0,4*512*16);

	//print build date
	printchar(fontID, __DATE__" "__TIME__);//on vram
	sceIoWrite(2,__DATE__" "__TIME__,11+1+8);//on cout

	if(sceFontClose(fontID)) return  -__LINE__;
	if(sceFontDoneLib(libID)) return  -__LINE__;

	sceKernelStopModule(modid,0,NULL,&stat,NULL);
	sceKernelUnloadModule(modid);
	sceKernelSelfStopUnloadModule(1,0,NULL);
	return 0;
}
Esempio n. 4
0
int unload(SceSize args,void*argp) {
    do sceKernelDelayThread(1000);
    while(sceKernelSelfStopUnloadModule(1,0,NULL)<0);
    return 0;
}