Relaunch myself?

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
PompeySteve
Posts: 14
Joined: Wed Mar 16, 2005 7:10 pm

Relaunch myself?

Post by PompeySteve »

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
Arwin
Posts: 426
Joined: Tue Jul 12, 2005 7:00 pm

Post by Arwin »

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.
71M
Posts: 122
Joined: Tue Jun 21, 2005 5:28 am
Location: London

Post by 71M »

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
JoAl
Posts: 7
Joined: Mon Aug 15, 2005 5:11 am

Re: Relaunch myself?

Post by JoAl »

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? ... elloadexec
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?
71M
Posts: 122
Joined: Tue Jun 21, 2005 5:28 am
Location: London

Post by 71M »

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