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 

Suspend mode not working while game threads are suspended.

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



Joined: 28 May 2008
Posts: 842

PostPosted: Thu Nov 20, 2008 9:21 pm    Post subject: Suspend mode not working while game threads are suspended. Reply with quote

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??
Back to top
View user's profile Send private message
SilverSpring



Joined: 27 Feb 2007
Posts: 115

PostPosted: Mon Nov 24, 2008 1:37 pm    Post subject: Reply with quote

By any chance are you suspending the "ScePowerMain" thread? That is the thread that controls the power switch suspend/standby operations.
_________________
PSP PRX LibDocs
Back to top
View user's profile Send private message Visit poster's website
Torch



Joined: 28 May 2008
Posts: 842

PostPosted: Mon Nov 24, 2008 2:09 pm    Post subject: Reply with quote

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).
Back to top
View user's profile Send private message
Torch



Joined: 28 May 2008
Posts: 842

PostPosted: Wed Nov 26, 2008 6:54 am    Post subject: Reply with quote

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?
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