Code: Select all
int _main(int args, void *argp)
{
return 0;
}
int _start(int args, void *argp)
{
int (*_main_func)(SceSize args, void *argp) = _main;
_main_func = (void *) ((unsigned int) _main_func & 0x7fffffff);
int thid = sceKernelCreateThread( "user_main",
_main_func,
32,
4096,
PSP_THREAD_ATTR_USER,
(void*) 0);
sceKernelStartThread(thid, args, argp);
return 0;
}
:EDIT: Examining the thread before starting it, the only thing I can see which might be a bit dodgy is that the GP value for the thread is in kernel space, the rest looks good. What the hell is the GP anyway?!