 |
forums.ps2dev.org Homebrew PS2, PSP & PS3 Development Discussions
|
| View previous topic :: View next topic |
| Author |
Message |
Cheater
Joined: 09 Jul 2006 Posts: 2
|
Posted: Wed Sep 27, 2006 9:24 am Post subject: Execute Eboot |
|
|
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 |
|
 |
adrahil
Joined: 16 Mar 2006 Posts: 277
|
Posted: Thu Sep 28, 2006 5:39 am Post subject: |
|
|
| 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 |
|
 |
Cheater
Joined: 09 Jul 2006 Posts: 2
|
Posted: Thu Sep 28, 2006 9:14 am Post subject: |
|
|
| Is there any way to do that in c? Or do I need to do it manually? |
|
| Back to top |
|
 |
adrahil
Joined: 16 Mar 2006 Posts: 277
|
Posted: Fri Sep 29, 2006 4:21 am Post subject: |
|
|
| I had seen some example of it in C, so just search around the older posts in this forum :) |
|
| Back to top |
|
 |
|
|
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
|