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 

Execute Eboot

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



Joined: 09 Jul 2006
Posts: 2

PostPosted: Wed Sep 27, 2006 9:24 am    Post subject: Execute Eboot Reply with quote

I am trying to execute another eboot from within my eboot. I read about sceKernelLoadExec, but that didn't work. I read somewhere that the eboot needed to be kxploited. When I enter 'make', it gives me a single eboot.pbp. I assume this is not kxploited and is meant for 1.0 (which works fine with custom firmware). 'Make Kxploit' causes it not to show up in the list. If I execute it from irshell, it won't load.

Currently, here is my test source code:
Code:
#include <pspkernel.h>
#include <pspdebug.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <pspdisplay.h>
#include <pspctrl.h>
#include <psploadexec.h>

//I know I have a lot of #include, but I'm leaving them for later

PSP_MODULE_INFO("Ebooy", 0x1000, 0, 1);
#define printf pspDebugScreenPrintf /* Exit callback */
int exit_callback(int arg1, int arg2, void *common) {
          sceKernelExitGame();
          return 0;
}

/* Callback thread */
int CallbackThread(SceSize args, void *argp) {
          int cbid;

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

          sceKernelSleepThreadCB();

          return 0;
}

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

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

          return thid;
}

int main (void) {
   pspDebugScreenInit();
   SetupCallbacks();
   printf("Loading Eboot...\n");
   sceKernelLoadExec("ms0:/PSP/GAME/hello/EBOOT.PBP", NULL);
   printf("Eboot loaded\n");
   return 0;
}



It is meant to execute the hello world app in the hello folder. This app isn't kxploited. When I run it, it gets past the printf statement, and then crashse (sends me back to the xmb).

Please don't tell me to search. I've read every thread on PSPUpdates (as well as stuff found on google and this forum) that has anything to do with it. I think my problem has something to do with the hello world eboot (even though it runs fine by itself).

Thanks in advance.
Back to top
View user's profile Send private message
adrahil



Joined: 16 Mar 2006
Posts: 277

PostPosted: Thu Sep 28, 2006 5:39 am    Post subject: Reply with quote

You can't loadexec an eboot just like this. You first have to extract the ELF file inside it and then execute that one.
Back to top
View user's profile Send private message
Cheater



Joined: 09 Jul 2006
Posts: 2

PostPosted: Thu Sep 28, 2006 9:14 am    Post subject: Reply with quote

Is there any way to do that in c? Or do I need to do it manually?
Back to top
View user's profile Send private message
adrahil



Joined: 16 Mar 2006
Posts: 277

PostPosted: Fri Sep 29, 2006 4:21 am    Post subject: Reply with quote

I had seen some example of it in C, so just search around the older posts in this forum :)
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