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 

Running EBOOT.PBP from homebrew

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



Joined: 04 May 2006
Posts: 7

PostPosted: Thu May 04, 2006 7:18 pm    Post subject: Running EBOOT.PBP from homebrew Reply with quote

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
View user's profile Send private message
moonlight



Joined: 26 Oct 2005
Posts: 567

PostPosted: Thu May 04, 2006 7:22 pm    Post subject: Reply with quote

You need kernel mode to execute a file from the memory stick.
Back to top
View user's profile Send private message
gradew



Joined: 04 May 2006
Posts: 7

PostPosted: Thu May 04, 2006 8:35 pm    Post subject: Reply with quote

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
View user's profile Send private message
moonlight



Joined: 26 Oct 2005
Posts: 567

PostPosted: Thu May 04, 2006 8:47 pm    Post subject: Reply with quote

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
View user's profile Send private message
gradew



Joined: 04 May 2006
Posts: 7

PostPosted: Thu May 04, 2006 8:53 pm    Post subject: Reply with quote

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
View user's profile Send private message
moonlight



Joined: 26 Oct 2005
Posts: 567

PostPosted: Thu May 04, 2006 8:57 pm    Post subject: Reply with quote

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
View user's profile Send private message
gradew



Joined: 04 May 2006
Posts: 7

PostPosted: Thu May 04, 2006 9:21 pm    Post subject: Reply with quote

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
View user's profile Send private message
moonlight



Joined: 26 Oct 2005
Posts: 567

PostPosted: Thu May 04, 2006 9:26 pm    Post subject: Reply with quote

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
View user's profile Send private message
gradew



Joined: 04 May 2006
Posts: 7

PostPosted: Thu May 04, 2006 9:32 pm    Post subject: Reply with quote

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
View user's profile Send private message
moonlight



Joined: 26 Oct 2005
Posts: 567

PostPosted: Thu May 04, 2006 9:40 pm    Post subject: Reply with quote

2.60 has no kernel support yet :)
Back to top
View user's profile Send private message
gradew



Joined: 04 May 2006
Posts: 7

PostPosted: Thu May 04, 2006 9:41 pm    Post subject: Reply with quote

ok! ^^ I'll have to wait for that, then.... Thanks a lot for your time, moonlight!! :-))
Back to top
View user's profile Send private message
Jim



Joined: 02 Jul 2005
Posts: 487
Location: Sydney

PostPosted: Fri May 05, 2006 8:44 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
gradew



Joined: 04 May 2006
Posts: 7

PostPosted: Tue May 09, 2006 6:19 pm    Post subject: Reply with quote

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
View user's profile Send private message
Art



Joined: 09 Nov 2005
Posts: 647

PostPosted: Wed May 10, 2006 9:25 am    Post subject: Reply with quote

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
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