Currently, here is my test source code:
Code: Select all
#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.