Hi,
I'd like to run my FreeDink(.org) homebrew with some additional parameters, so it can run a given addon instead of the main game. In another words I need to write a simple frontend to do the job.
What's the best way to run the game engine from the frontend - that is, run an homebrew from another one?  In the psplink code I found that "ldstart" is implemented using "sceKernelLoadModule", but I'm not sure that's what I need.
			
			
													[Solved] Running a homebrew from a homebrew
[Solved] Running a homebrew from a homebrew
					Last edited by Beuc on Fri Apr 17, 2009 6:21 am, edited 1 time in total.
									
			
									
						Code: Select all
int k1 = pspSdkSetK1(0);
	
	SceUID mod = sceKernelLoadModule(path, 0, NULL);
	if (mod >= 0)
	{
		mod = sceKernelStartModule(mod, 0, NULL, NULL, NULL);
		if (mod < 0)
			//Error
	}
	pspSdkSetK1(k1);
-Arnie
It looks it doesn't want to start the application if the front-end is already running (mod == 0x800200d9). Do I need to unload it first somehow?arnie wrote:Replace path with the module you want to load.Code: Select all
int k1 = pspSdkSetK1(0); SceUID mod = sceKernelLoadModule(path, 0, NULL); if (mod >= 0) { mod = sceKernelStartModule(mod, 0, NULL, NULL, NULL); if (mod < 0) //Error } pspSdkSetK1(k1);
-Arnie
I tried with running an eboot (0x80020148/unsupported_prx_type) and a .prx (0x800200D9/same as when trying to run a program twice from psplink).
I'm not very familiar with the PSP constraints (like, you can run two programs at once?).
Thanks!
OK, apparently something going wrong (800200d9) if I run an SDL app from another SDL app - even if I unloaded everything:
Works:
- run text-mode app 1
- user chooses app to launch
- call pspSdkLoadStartModule(SDL App 2)
- SDL App 2 is run
Doesn't work:
- run SDL app 1
- user chooses app to launch (graphically)
- quit SDL
- call pspSdkLoadStartModule(SDL App 2)
- SDL App 2 is not run (800200d9)
Do you have an idea about what blocks starting SDL App 2 from SDL App 1?
			
			
									
									
						Works:
- run text-mode app 1
- user chooses app to launch
- call pspSdkLoadStartModule(SDL App 2)
- SDL App 2 is run
Doesn't work:
- run SDL app 1
- user chooses app to launch (graphically)
- quit SDL
- call pspSdkLoadStartModule(SDL App 2)
- SDL App 2 is not run (800200d9)
Do you have an idea about what blocks starting SDL App 2 from SDL App 1?
