1.50 Kernel - Capable of suspend(/standby?), or not?

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

Moderators: cheriff, TyRaNiD

Post Reply
EmrldDrgn
Posts: 4
Joined: Wed May 20, 2009 5:55 am

1.50 Kernel - Capable of suspend(/standby?), or not?

Post by EmrldDrgn »

I know a lot of older 1.50 homebrew doesn't support sleep mode, but some people seem to think this is because the 1.50 kernel can't do sleep mode. Is this true? I just wrote a test program to see if it would work, and it seemed to, but one test case is hardly significant, and the program was very simple, so it could have something to do with that.

Can someone confirm/deny that the 1.50 kernel is capable of the suspend (standby?) function?

Also, what's the difference between standby and suspend?
Art
Posts: 642
Joined: Wed Nov 09, 2005 8:01 am

Post by Art »

Suspend preserves RAM, and can restart where you left off like a
quick flick of the power switch, where standby is like holding the power switch for a few seconds and causes a restart.
1.50 kernel can do both.
If not actually, then potentially.
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

One problem with suspend is that it closes all files and terminates connections. The problem is that when you when the app is resumed, none of that is reversed... files are still closed and connections are still terminated. You need to add callbacks to the power manager to do some work to clean things up and restart them on suspend/resume. You can see what I did in Basilisk II to deal with suspend/resume. Many people are hard pressed to port an app to the PSP in the first place - they don't know enough about the operation of the app to handle suspend.

Another problem is a bit more esoteric. If you use the MediaEngine, suspend will hang the PSP. That's why some apps like SNESTYL ME disable suspend while running.
willow :--)
Posts: 107
Joined: Sat Jan 13, 2007 11:50 am

Post by willow :--) »

J.F. wrote: If you use the MediaEngine, suspend will hang the PSP.
Isn't there a workaround for that? The MediaEngine is used in the XMB when playing mp3s, correct?
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

willow :--) wrote:
J.F. wrote: If you use the MediaEngine, suspend will hang the PSP.
Isn't there a workaround for that? The MediaEngine is used in the XMB when playing mp3s, correct?
I'm sure Sony knows how to do it, but the code we use to use the ME isn't good enough. It's almost certainly related to the fact that changing the CPU clock after starting the ME also hangs the PSP. The ME doesn't even need to be running - even if you disable the ME, changing the clock still hangs the PSP. It doesn't go back to normal operation until you exit back to the XMB.

It would be nice to know more about the "official" interface to the ME. The level that is used currently to run stuff on the ME doesn't play nice with the firmware.
User avatar
Torch
Posts: 825
Joined: Wed May 28, 2008 2:50 am

Post by Torch »

Couldn't someone reverse a game and see how it handles suspend with the ME? Most games use the ME for videos and if you suspend it it usually restarts the video from the beginning on resume. But thats probably just a limitation of Sony's video decoder interface to the ME. We would only be interested in the suspend resume bit.. And regarding the videos, Burnout Dominator doesn't restart the video from the beginning, but resumes playing so that might be a better target. to learn about ME video lib.
EmrldDrgn
Posts: 4
Joined: Wed May 20, 2009 5:55 am

Post by EmrldDrgn »

Is the ME crash behavior true for non-1.50 kernels too? I suppose it would have to be...
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

EmrldDrgn wrote:Is the ME crash behavior true for non-1.50 kernels too? I suppose it would have to be...
Actually, I don't know if it's true for 1.50. I first noticed it at 3.71. It could be the ME is fine under 1.50. Anything > 3.60 seems affected.
Post Reply