| View previous topic :: View next topic |
| Author |
Message |
gradew
Joined: 04 May 2006 Posts: 7
|
Posted: Thu May 04, 2006 7:18 pm Post subject: Running EBOOT.PBP from homebrew |
|
|
Hey all,
sorry about this totally noob question, but is there a way I could launch a homebrew from another homebrew? I thought sceKernelLoadExec could do that, but I keep getting the 0x80020147 (prohibitLoadEx ecdevice) error.
Any thoughts?
(PS: I searched this forum for answers, but it seems people are trying to run ELFs...) |
|
| Back to top |
|
 |
moonlight
Joined: 26 Oct 2005 Posts: 567
|
Posted: Thu May 04, 2006 7:22 pm Post subject: |
|
|
| You need kernel mode to execute a file from the memory stick. |
|
| Back to top |
|
 |
gradew
Joined: 04 May 2006 Posts: 7
|
Posted: Thu May 04, 2006 8:35 pm Post subject: |
|
|
hello moonlight,
thank you for your reply. Is
PSP_MODULE_INFO("blahblah",0x1000,1,1);
PSP_MAIN_THREAD_ATTR(0);
enough to run my app in kernel mode? because if it is, then I'm probably missing something else; it still doesn't work... :( |
|
| Back to top |
|
 |
moonlight
Joined: 26 Oct 2005 Posts: 567
|
Posted: Thu May 04, 2006 8:47 pm Post subject: |
|
|
| gradew wrote: | hello moonlight,
thank you for your reply. Is
PSP_MODULE_INFO("blahblah",0x1000,1,1);
PSP_MAIN_THREAD_ATTR(0);
enough to run my app in kernel mode? because if it is, then I'm probably missing something else; it still doesn't work... :( |
Yes, that's enough for kernel mode.
It's strange, at least in 1.50, with kernel mode and a line of code like this:
sceKernelLoadExec("my_app.elf", NULL);
it works for me.
Btw, you may use this another function: LoadExecForKernel_28D0D249
It's not defined in the headers of the pspsdk, so you have to add some lines of code like this:
| Code: |
struct SceKernelLoadExecVSHParam
{
/* Size of structure in bytes */
SceSize size;
/* Size of the arguments string */
SceSize args;
/* Pointer to the arguments strings */
void * argp;
/* "game", "updater" or "vsh" ("game" when loading homebrews) */
const char * key;
/* unknown, it seems to be some kind of flag. the firmware set it to
0x00000400. it looks like is related with the next fields of the
structure, it's better to set it to 0 if we don't know how to use
those fields */
u32 unk1;
/* unknown, the firmware always set it to 0x09CF344C, which seems to
be a pointer */
void *unk2;
/* unknown. the firmware sets it to 0 */
u32 unk3;
/* unknown. the firmware sets it to 0 */
u32 unk4;
/* unknown. the firmware sets it to 0 */
u32 unk5
};
int LoadExecForKernel_28D0D249(const char *file, struct SceKernelLoadExecVSHParam *param);
|
and then use it like you would do with loadexec. |
|
| Back to top |
|
 |
gradew
Joined: 04 May 2006 Posts: 7
|
Posted: Thu May 04, 2006 8:53 pm Post subject: |
|
|
ok I think I've seen it somewhere in the forum. The reason I haven't tried it is because I'm not trying to run an ELF, but an EBOOT.PBP file. Does that make any difference?
In the meantime, I'll try out the declaration you've given me. Thanks for the help! :-) |
|
| Back to top |
|
 |
moonlight
Joined: 26 Oct 2005 Posts: 567
|
Posted: Thu May 04, 2006 8:57 pm Post subject: |
|
|
| gradew wrote: | ok I think I've seen it somewhere in the forum. The reason I haven't tried it is because I'm not trying to run an ELF, but an EBOOT.PBP file. Does that make any difference?
In the meantime, I'll try out the declaration you've given me. Thanks for the help! :-) |
The PBP in a kxploited application is an ELF.
A true PBP (usually called "1.00" PBP) won't work with loadexec in 1.50, if i don't remember bad. |
|
| Back to top |
|
 |
gradew
Joined: 04 May 2006 Posts: 7
|
Posted: Thu May 04, 2006 9:21 pm Post subject: |
|
|
Tried out your "holy function of homebrew" (that's where I saw it! ;-)), didn't work out. Only this time, the return value was 0....
As I'm totally new to PSP programming, I'm not sure I understand what you mean by "kxploited"... My app is a simple C++ program I've built from a sample (compiled using the latest PSPSDK toolchain) from which I'm trying to launch another sample. I must be missing something here, but what?.... |
|
| Back to top |
|
 |
moonlight
Joined: 26 Oct 2005 Posts: 567
|
Posted: Thu May 04, 2006 9:26 pm Post subject: |
|
|
| gradew wrote: | Tried out your "holy function of homebrew" (that's where I saw it! ;-)), didn't work out. Only this time, the return value was 0....
As I'm totally new to PSP programming, I'm not sure I understand what you mean by "kxploited"... My app is a simple C++ program I've built from a sample (compiled using the latest PSPSDK toolchain) from which I'm trying to launch another sample. I must be missing something here, but what?.... |
A kxploited app is one that uses the kxploit, neccesary to run homebrew in 1.50 (you know, the ones with two folders, one of them with %)
Btw, what firmware do you have? |
|
| Back to top |
|
 |
gradew
Joined: 04 May 2006 Posts: 7
|
Posted: Thu May 04, 2006 9:32 pm Post subject: |
|
|
| moonlight wrote: | | gradew wrote: | Tried out your "holy function of homebrew" (that's where I saw it! ;-)), didn't work out. Only this time, the return value was 0....
As I'm totally new to PSP programming, I'm not sure I understand what you mean by "kxploited"... My app is a simple C++ program I've built from a sample (compiled using the latest PSPSDK toolchain) from which I'm trying to launch another sample. I must be missing something here, but what?.... |
A kxploited app is one that uses the kxploit, neccesary to run homebrew in 1.50 (you know, the ones with two folders, one of them with %)
Btw, what firmware do you have? |
hee hee... this is where you'll probably start laughing ^^ I have the 2.60 fw, using Fanjita's EBOOT loader. I know it looks desperately useless to run a homebrew from another homebrew since Fanjita's loader does this already (and a WHOLE LOT BETTER ^^), but I'm just fiddling around with the API, trying to figure out how the whole thing works. :-) |
|
| Back to top |
|
 |
moonlight
Joined: 26 Oct 2005 Posts: 567
|
Posted: Thu May 04, 2006 9:40 pm Post subject: |
|
|
| 2.60 has no kernel support yet :) |
|
| Back to top |
|
 |
gradew
Joined: 04 May 2006 Posts: 7
|
Posted: Thu May 04, 2006 9:41 pm Post subject: |
|
|
| ok! ^^ I'll have to wait for that, then.... Thanks a lot for your time, moonlight!! :-)) |
|
| Back to top |
|
 |
Jim

Joined: 02 Jul 2005 Posts: 487 Location: Sydney
|
Posted: Fri May 05, 2006 8:44 am Post subject: |
|
|
You might have a very long wait. Noone knows how to load kernel mode apps from user mode, if it's possible at all.
Jim _________________ http://www.dbfinteractive.com |
|
| Back to top |
|
 |
gradew
Joined: 04 May 2006 Posts: 7
|
Posted: Tue May 09, 2006 6:19 pm Post subject: |
|
|
Ok, now that I've managed to get my hands on a 1.5 PSP. I'm trying to run a kxploited homebrew from my homebrew and it still doesn't work. Only this time, the PSP crashes (black screen, then powers off after 10 seconds or so...).
Which EBOOT.PBP should I run? the one in the % directory? Does my homebrew have to be kxploited as well?
(btw, great work on NOKXPLOIT moonlight!! :-)) |
|
| Back to top |
|
 |
Art
Joined: 09 Nov 2005 Posts: 647
|
Posted: Wed May 10, 2006 9:25 am Post subject: |
|
|
| Quote: |
Posted: Thu May 04, 2006 ok! ^^ I'll have to wait for that, then....
Posted: Tue May 09, 2006 Ok, now that I've managed to get my hands on a 1.5 PSP.
|
You must be a pretty good fighter then :D
The % folder is the KXPLOIT folder, the other one contains the program.
Maybe it's confusing because the 1.50 PSP appears to run the KXPLOIT eboot. |
|
| Back to top |
|
 |
|