Suspend mode not working while game threads are suspended.

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

Moderators: cheriff, TyRaNiD

Post Reply
User avatar
Torch
Posts: 825
Joined: Wed May 28, 2008 2:50 am

Suspend mode not working while game threads are suspended.

Post by Torch »

I'm freezing the running game by suspending all its threads, just like the screenshot plugin.

However while in this state, the Suspend mode no longer works. If the power switch is pushed, it doesnt' suspend until I resume all the game threads.

I've tried finding all the power callbacks by hooking the functions and unregistering them, but it still doesn't suspend while game threads are suspended. I also tried finding the callback threads and resuming them alone, but it still doesn't work.

Any one know how to do this??
SilverSpring
Posts: 110
Joined: Tue Feb 27, 2007 9:43 pm
Contact:

Post by SilverSpring »

By any chance are you suspending the "ScePowerMain" thread? That is the thread that controls the power switch suspend/standby operations.
User avatar
Torch
Posts: 825
Joined: Wed May 28, 2008 2:50 am

Post by Torch »

How do I identify the ScePowerMain thread?

What I'm doing is making a list of all the running threads as soon as my plugin starts. Then when I need to freeze it, I suspend all threads EXCEPT the threads that I recorded in the beginning. Hence I assume that only the game threads will be suspended (and any plugin that was loaded after mine).

$/kd/utility.prx VGUPA
$/kd/popsman.prx P
$/kd/mediasync.prx VGUPA
$/kd/me_wrapper.prx VGUA
$/kd/vaudio.prx VU
$/kd/impose.prx VGUPA
$/kd/popcorn.prx P
$/kd/avcodec.prx V
$/kd/vshbridge.prx VU
$/kd/vshctrl.prx V
$%/kd/usersystemlib.prx VGUPA
$%/vsh/module/libfont_hv.prx P
$%/vsh/module/pafmini.prx P
%%/kd/dummy_anchor_IhariUafaayk98.prx GUA
$%/kd/libatrac3plus.prx V
$%/vsh/module/paf.prx V
$%/vsh/module/common_gui.prx V
$%/vsh/module/common_util.prx VP
$%/vsh/module/libpspvmc.prx P
%%/kd/dummy_anchor_IhariUafaayk98.prx P
$%%/vsh/module/vshmain.prx V

moonlight said that in that plugins are loaded after mediasync.prx. So the only GAME mode prxs loaded after that is me_wrapper.prx, impose.prx and usersystemlib.prx. Hence any threads in those PRXs will be suspended I guess. power.prx is loaded much earlier (I'm assuming the ScePowerMain thread is in it).

I don't know what exactly to do. Should I wait for these three modules to load before making the list of initial threads? (Then I'll have the problem of later loaded plugins not getting suspended. I want everything after my plugin to get suspended, including other plugins loaded after it).
User avatar
Torch
Posts: 825
Joined: Wed May 28, 2008 2:50 am

Post by Torch »

I checked the list of initial recorded threads and ScePowerMain is found. Which means ScePowerMain is ignored and is not suspended by my plugin.

What other cause is there for suspend mode not working?
Post Reply