Running "sleep-program" in background...

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

Moderators: cheriff, TyRaNiD

Post Reply
manflesh
Posts: 3
Joined: Fri Jan 11, 2008 12:11 am

Running "sleep-program" in background...

Post by manflesh »

Is it possible to run a program in the background that shuts the psp down after a specific time. Kind of like the sleep function in the origional FW, but the original sleep function doesn't shuts the psp down until all mp3's have stopped playing for example.

I want my program to shut the psp down completly after the time i set up.
Any tutorial or example i can look at?

Great forum by the way!!!
Hellcat
Posts: 83
Joined: Wed Jan 24, 2007 2:52 pm

Post by Hellcat »

Simple idea:

Grab the current system time and calculate when it's time to shutdown (or however you wanna do that part....)

Then make a loop that spends its most time with sceKernelDelayThread() so it doesn't pull 100% CPU load and drains the battery.
When this loop "detects" that it's bedtime, call scePowerRequestStandby(), and OFF you go - literaly :)

Simply, but should do it....
manflesh
Posts: 3
Joined: Fri Jan 11, 2008 12:11 am

Post by manflesh »

Ok, can I just "return to the XMB" after the program has been started, and the program will continue to run in the background?

I have only made programs with graphics etc. so far where I exit my program to return to XMB.
sakya
Posts: 190
Joined: Fri Apr 28, 2006 5:48 pm
Contact:

Post by sakya »

Hi! :)
manflesh wrote:Ok, can I just "return to the XMB" after the program has been started, and the program will continue to run in the background?
You have to code a module (a prx that you have to put in your ms0:/seplugin directory and activate through recovery).
Here there's a tutorial:
http://ps2dev.org/psp/Tutorials/PSP_Mod ... s.download

Ciaooo
Sakya
manflesh
Posts: 3
Joined: Fri Jan 11, 2008 12:11 am

Post by manflesh »

Aha, great, thanks!!!
Post Reply