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 

Relaunch myself?

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



Joined: 16 Mar 2005
Posts: 14

PostPosted: Tue Aug 16, 2005 6:58 pm    Post subject: Relaunch myself? Reply with quote

EDIT:Sorry, I guess this should be in the PSP Software Development discussion forum! Oops.

I've spent a fair few minutes searching the forums but can't find an answer, so please bear with me...

1) My PSP is a 1.50 machine
2) I've includes the USB_stor module in my game and this works fine
3) I've got a menu option "Restart" which alls sceKernelLoadModule() and sceKernelStartModule() . Will this work with a PBP file or do I need the plain ELF on the ms as well?
4) I'm guessing that for USB_stor to work my app needs to run in Kernel mode. I've read that this CAN be risky and could lead to a brick. How likely is this? Is it relatively easy to accidentally overwrite flash? I've disabled the USB storage for the moment as I don't want to end up with a brick - I crash the PSP enough as it is...

I'm at work at the moment so can't try any of this out at the moment, but thought I'd pick some of the large brains here!

Thanks in advance
Back to top
View user's profile Send private message
Arwin



Joined: 12 Jul 2005
Posts: 426

PostPosted: Tue Aug 16, 2005 10:17 pm    Post subject: Reply with quote

The File Assistant ++ does this with the select button. I think it comes with the source?

You're not so much likely to brick your PSP as you are to corrupt your memory stick if you allow both the PSP and the PC to write to the USB at the same time.
Back to top
View user's profile Send private message
71M



Joined: 21 Jun 2005
Posts: 122
Location: London

PostPosted: Wed Aug 17, 2005 4:10 am    Post subject: Reply with quote

Indeed FileAssistant++ does allow you to do this kind of thing.
Check out CFrameWork.cpp to see how to start your application in Kernel mode and CExecutableFileHandler.cpp (nice name!) for how to run your PBP or ELF.

Cheers,
71M

http://www.easy-monkey.co.uk/FileAssistant.rar
Back to top
View user's profile Send private message
JoAl



Joined: 15 Aug 2005
Posts: 7

PostPosted: Wed Aug 17, 2005 4:11 am    Post subject: Re: Relaunch myself? Reply with quote

PompeySteve, from storage/main.c:

/**
* Define the module info section
*
* 2nd arg must 0x1000 so __init is executed in
* kernelmode for our loaderInit function
*/
PSP_MODULE_INFO("USBSample", 0x1000, 0, 1);

/**
* THREAD_ATTR_USER causes the thread that the startup
* code (ctr0.c) starts this program in to be in usermode
* even though the module was started in kernelmode
*/
PSP_MAIN_THREAD_ATTR(THREAD_ATTR_USER);

-- so your presumption (4) is incorrect.

There is similar thred: http://forums.ps2dev.org/viewtopic.php?t=2700&highlight=scekernelloadexec
but no final solution -- only cLoUd's statement that he is able to reload app without exit to PSP menu.

Does anybody know ho to restart app without leaving it, so we can get rid of PSP splash screen during testing/debugging stage?
Back to top
View user's profile Send private message
71M



Joined: 21 Jun 2005
Posts: 122
Location: London

PostPosted: Wed Aug 17, 2005 4:15 am    Post subject: Reply with quote

I use this very same method for developing on FileAssistant++.
If you notice when you press SELECT the screen blacks out and it appears to reboot, infact it is reloading the EBOOT.PBP.

USB is automatically turned on when the app starts so I can upload a new executable, press SELECT and check the new file, very sweet indeed!


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