forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Helpme: Home button doesn't work

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
kecC



Joined: 04 Jul 2005
Posts: 17

PostPosted: Thu Jul 07, 2005 10:47 am    Post subject: Helpme: Home button doesn't work Reply with quote

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:

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 :).
Back to top
View user's profile Send private message
rinco



Joined: 21 Jan 2005
Posts: 255
Location: Canberra, Australia

PostPosted: Thu Jul 07, 2005 11:50 am    Post subject: Reply with quote

Please refer to test samples bundled with pspsdk. HelloPSP has been superceded.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group