 |
forums.ps2dev.org Homebrew PS2, PSP & PS3 Development Discussions
|
| View previous topic :: View next topic |
| Author |
Message |
Gary13579
Joined: 15 Aug 2005 Posts: 93
|
Posted: Wed Nov 02, 2005 10:29 am Post subject: How do you load BOOT/EBOOT.BINs |
|
|
Before you all rush and try to close this topic first, this is NOT to run games off the memory stick.
What I want to do is load a UMD inside of a program.
I've copied some from WAB Launcher 2.5b, but it doesn't work for UMDs.
| Code: |
pspDebugScreenPrintf("Loading UMD \n");
int exec_p = sceKernelLoadModule(GAME_PATH_DEST, 0, 0);
sceKernelStartModule(exec_p, 0, 0, 0, 0);
|
Sits on the screen with Loading UMD and does nothing.
GAME_PATH_DEST = disc0:/PSP_GAME/SYSDIR/EBOOT.BIN (also tried EBOOT.BIN)
I've also tried
| Code: |
pspDebugScreenPrintf("Loading UMD \n");
sceKernelLoadExec("disc0:/PSP_GAME/SYSDIR/EBOOT.BIN", 0);
|
I've also tried BOOT.BIN...
This one returns to the homescreen with the error "This game cannot be started (80020321)".
Any help is appreciated :) |
|
| Back to top |
|
 |
Gary13579
Joined: 15 Aug 2005 Posts: 93
|
Posted: Wed Nov 02, 2005 11:46 am Post subject: |
|
|
I guess I needed to add this code, but it still isn't working.
| Code: |
// Wait for disc and mount to filesystem
int i;
i = sceUmdCheckMedium(1);
if(i == 0)
{
sceUmdWaitDriveStat(UMD_WAITFORDISC);
}
sceUmdActivate(1, "disc0:"); // Mount UMD to disc0: file system
sceUmdWaitDriveStat(UMD_WAITFORINIT);
|
It does the same thing as before when using sceKernelStartModule |
|
| Back to top |
|
 |
CyberBill
Joined: 26 Jul 2005 Posts: 86 Location: Redmond, WA
|
Posted: Wed Nov 02, 2005 11:52 am Post subject: |
|
|
| EBOOT.BIN is not the executable, BOOT.BIN is... That'll narrow down your tests some. :) |
|
| Back to top |
|
 |
groepaz

Joined: 01 Sep 2005 Posts: 305
|
|
| Back to top |
|
 |
Gary13579
Joined: 15 Aug 2005 Posts: 93
|
Posted: Wed Nov 02, 2005 3:54 pm Post subject: |
|
|
Yes, but someone on IRC to try the EBOOT.BIN file, so may as well try :)
No ideas though? |
|
| Back to top |
|
 |
moonlight
Joined: 26 Oct 2005 Posts: 567
|
Posted: Wed Nov 02, 2005 5:58 pm Post subject: |
|
|
| Gary13579 wrote: | Yes, but someone on IRC to try the EBOOT.BIN file, so may as well try :)
No ideas though? |
You are probably having memory issues.
i also did some tests with that and the loadmodule returned 0x800200d9 (SCE_KERNEL_ERROR_MEMBLOCK_ALLOC_FAILED)
With adding PSP_HEAP_SIZE_KB(0) in the code, i was able to launch the wipeout umd, but i still had the memory errors with others umd's. |
|
| Back to top |
|
 |
Gary13579
Joined: 15 Aug 2005 Posts: 93
|
Posted: Thu Nov 03, 2005 1:12 am Post subject: |
|
|
| moonlight wrote: | | Gary13579 wrote: | Yes, but someone on IRC to try the EBOOT.BIN file, so may as well try :)
No ideas though? |
You are probably having memory issues.
i also did some tests with that and the loadmodule returned 0x800200d9 (SCE_KERNEL_ERROR_MEMBLOCK_ALLOC_FAILED)
With adding PSP_HEAP_SIZE_KB(0) in the code, i was able to launch the wipeout umd, but i still had the memory errors with others umd's. |
It sounds like you are saying it takes more memory to load a game from a UMD then from the memory stick, which doesn't make much sense :/
My program is very simple, all it does is boot up, wait for the person to press X, then tries to load the UMD.
I'll post the source when I get home. |
|
| Back to top |
|
 |
moonlight
Joined: 26 Oct 2005 Posts: 567
|
Posted: Thu Nov 03, 2005 4:09 am Post subject: |
|
|
| Gary13579 wrote: |
It sounds like you are saying it takes more memory to load a game from a UMD then from the memory stick, which doesn't make much sense :/
My program is very simple, all it does is boot up, wait for the person to press X, then tries to load the UMD.
I'll post the source when I get home. |
maybe current versions of the pspsdk have memory partitions problem that they didn't have in the past when that program was released.
Add this to the code to see a description of what is happening, i am sure that they are memory partitions issues.
pspKernelSetKernelPC();
pspDebugInstallKprintfHandler(NULL); |
|
| Back to top |
|
 |
Gary13579
Joined: 15 Aug 2005 Posts: 93
|
Posted: Thu Nov 03, 2005 8:36 am Post subject: |
|
|
I put those lines in the main function, it did nothing. Was I supposed to put them somewhere else?
BTW, here is the source
| Code: | /*
*Wab launcher V2.5 the original :=)
*/
#include <pspkernel.h>
#include <pspdebug.h>
#include <pspctrl.h>
#include <pspumd.h>
#include <stdlib.h>
#include <string.h>
#define printf pspDebugScreenPrintf
#define GAME_PATH_DEST "disc0:/PSP_GAME/SYSDIR/BOOT.BIN"
PSP_MODULE_INFO("LauncherV2_5", 0x1000, 1, 1); // 0x1000 = Kernel MODE
PSP_MAIN_THREAD_ATTR(0); // 0 for kernel mode too
int exit_callback(int arg1, int arg2, void *common)
{
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;
}
void loadUMD(void) {
pspDebugScreenPrintf("Loading UMD \n");
int exec_p = sceKernelLoadModule(GAME_PATH_DEST, 0, 0);
sceKernelStartModule(exec_p, 0, 0, 0, 0);
//sceKernelLoadExec("disc0:/PSP_GAME/SYSDIR/EBOOT.BIN", 0);
}
int main(void)
{
SceCtrlData pad;
sceCtrlSetSamplingCycle(0);
sceCtrlSetSamplingMode(PSP_CTRL_MODE_ANALOG);
pspDebugScreenInit();
SetupCallbacks();
// Wait for disc and mount to filesystem
int i;
i = sceUmdCheckMedium(1);
if(i == 0)
{
sceUmdWaitDriveStat(UMD_WAITFORDISC);
}
sceUmdActivate(1, "disc0:"); // Mount UMD to disc0: file system
sceUmdWaitDriveStat(UMD_WAITFORINIT);
while(1)
{
sceCtrlReadBufferPositive(&pad, 1);
if(pad.Buttons & PSP_CTRL_CROSS)
{
loadUMD();
return 0;
}
}
sceKernelExitGame();
return 0;
}
|
Really simple stuff... |
|
| Back to top |
|
 |
mrbrown
Joined: 17 Jan 2004 Posts: 1536
|
Posted: Thu Nov 03, 2005 9:26 am Post subject: |
|
|
| Sorry, we don't have any topics that have to do with loading files on the UMD. Locked. |
|
| 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
|