Helpme: Home button doesn't work

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

Moderators: cheriff, TyRaNiD

Post Reply
kecC
Posts: 17
Joined: Mon Jul 04, 2005 11:07 pm

Helpme: Home button doesn't work

Post by kecC »

Hi! I have some of help.

I've compiled my own HelloPSP, but I want to add the posibility to come back to the PSP Menu.

I've have testing many hours but I haven't get anything. I've updated the startup.s and I add in hellopsp.c the following code:

Code: Select all

PSP_MAIN_THREAD_ATTR(THREAD_ATTR_USER | THREAD_ATTR_VFPU);

/* Exit callback */
int exit_callback(void)
{
	sceKernelExitGame();

	return 0;
}

/* Callback thread */
void CallbackThread(void *arg)
{
	int cbid;

	cbid = sceKernelCreateCallback("Exit Callback", exit_callback, NULL);
	sceKernelRegisterExitCallback(cbid);

	sceKernelSleepThreadCB();
}

/* Sets up the callback thread and returns its thread id */
int SetupCallbacks(void)
{
	int thid = 0;

	thid = sceKernelCreateThread("update_thread", CallbackThread, 0x11, 0xFA0, THREAD_ATTR_USER, 0);
	if(thid >= 0)
	{
		sceKernelStartThread(thid, 0, 0);
	}

	return thid;
}

int xmain(int ra)
{
	SetupCallbacks();
	sceKernelSleepThread();

	return 0;
}
That's before int main (...);

The startup.s is this one -> startup.s

I don't know if I have to change anything in the Makefile, or what I have to do.

Can anybody help me please?

Thanks!

Byezzz :).
rinco
Posts: 255
Joined: Fri Jan 21, 2005 2:12 pm
Location: Canberra, Australia

Post by rinco »

Please refer to test samples bundled with pspsdk. HelloPSP has been superceded.
Post Reply