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 

Load EBOOT from flash ?

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



Joined: 28 May 2008
Posts: 842

PostPosted: Thu Jul 10, 2008 4:36 pm    Post subject: Load EBOOT from flash ? Reply with quote

Is there any way of loading an EBOOT.PBP from somewhere in flash0/1/2/3 ?

If I read it into a buffer and load it from memory it breaks some homebrew presumably due to the lack of bootpath.
Back to top
View user's profile Send private message
jean



Joined: 05 Jan 2008
Posts: 489

PostPosted: Thu Jul 10, 2008 7:12 pm    Post subject: Reply with quote

Quote:
If I read it into a buffer and load it from memory it breaks some homebrew presumably due to the lack of bootpath.

So you can load and run it but it crashes? Let me turn your question into another: we all know that prx embedded in 3.00+ EBOOTs don't have CWD working and everyone willing to load something in the same folder can't use relative paths but have to reconstruct bootpath; shouldn't it be a goot idea to force a CWD automagically when it's the case and explicitly in cases like Torch's?
So the question is: how to force an arbitrary CWD into an executable context?
Back to top
View user's profile Send private message
moonlight



Joined: 26 Oct 2005
Posts: 567

PostPosted: Thu Jul 10, 2008 7:23 pm    Post subject: Reply with quote

The cwd is set automatically by newlib by using the parameter of the module, which is usually the path. You can always load the prx of the eboot from a buffer, and pass it a path as argument so newlib would set the cwd from it.

For flash3 in the slim, you should be able to use sceKernelLoadModuleForLoadExecVSHMs3 to load the eboot.pbp or sceKernelLoadExecVSHMs3 to loadexec it, that's what sony was using in 3.6 for 1seg.pbp.
Back to top
View user's profile Send private message
Torch



Joined: 28 May 2008
Posts: 842

PostPosted: Thu Jul 10, 2008 8:11 pm    Post subject: Reply with quote

What is this "newlib" and how do I use it?

EDIT: OK I think you're talking about the updated SDK. So thats why I've seen some ppl pass the location of the eboot in the parameters as well.
Back to top
View user's profile Send private message
Pirata Nervo



Joined: 09 Oct 2007
Posts: 409

PostPosted: Thu Jul 10, 2008 8:47 pm    Post subject: Reply with quote

newlib is one of the things installed when you install the toolchain :)
http://en.wikipedia.org/wiki/Newlib
_________________

Upgrade your PSP
Back to top
View user's profile Send private message
Torch



Joined: 28 May 2008
Posts: 842

PostPosted: Thu Jul 10, 2008 9:08 pm    Post subject: Reply with quote

sceKernelLoadExecVSHMs3 gives a black screen for a PBP in flash3, or memory stick. It appears that the kernel has finished rebooting in game mode though.

And I can't load the data.psp into buffer for all homebrew because its probably running out of kernel memory.
Back to top
View user's profile Send private message
Pirata Nervo



Joined: 09 Oct 2007
Posts: 409

PostPosted: Thu Jul 10, 2008 11:04 pm    Post subject: Reply with quote

have you tried load module?
_________________

Upgrade your PSP
Back to top
View user's profile Send private message
Torch



Joined: 28 May 2008
Posts: 842

PostPosted: Fri Jul 11, 2008 12:26 am    Post subject: Reply with quote

Pirata Nervo wrote:
have you tried load module?


Won't that try to load the module in the current mode (for an XMB plugin, it will load the module in memory while VSH is active) The kernel is supposed to restart in GAME mode and then launch the homebrew, which I think only LoadExec type functions do.
Back to top
View user's profile Send private message
Pirata Nervo



Joined: 09 Oct 2007
Posts: 409

PostPosted: Fri Jul 11, 2008 3:19 am    Post subject: Reply with quote

yeh probably.
I think moonlight has a better answer :)
_________________

Upgrade your PSP
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