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 

USB prx problem hook?

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



Joined: 09 May 2009
Posts: 45

PostPosted: Wed Aug 05, 2009 9:45 am    Post subject: USB prx problem hook? Reply with quote

Hey, im developing a plugin that can toggle usb. Its working well, i can detect the psp on pc, but the problem is when the psp goes in standby. If i dont activate the usb i dont have problems. But if i toggle usb and after a while the psp goes in standby, the psp freezes and then shutdown. My question is: if hooking the "standby function", all goes well. Ive heard about hooking and have seen some sources about it but im not experienced on this area... What would be the function to hook ? Any info you could tell about this would be appreciated
Back to top
View user's profile Send private message
m0skit0



Joined: 02 Jun 2009
Posts: 226

PostPosted: Wed Aug 05, 2009 5:29 pm    Post subject: Reply with quote

I guess you should hook scePowerRequestSuspend().

http://www.dark-alex.org/pspsdk_docs/psppower_8h.html#a17e71c25ae476469347956af18e4dbf
_________________
The Incredible Bill Gates wrote:
The obvious mathematical breakthrough would be development of an easy way to factor large prime numbers.
Back to top
View user's profile Send private message
zydeoN



Joined: 09 May 2009
Posts: 45

PostPosted: Wed Aug 05, 2009 8:22 pm    Post subject: Reply with quote

Well i finally solved my problem. I was making a prx similar to the vsh menu. If you press select the vsh menu comes in the xmb. And if you press a specific key, the psp activates the usb mode. I discovered that if usb is toggled and the vsh menu is in the xmb, the psp will freeze when suspending, because the vsh menu had other functions. Otherwise, if the usb is toggled and vsh menu is not on the xmb, the psp wonŽt freeze. There is no need to hook...
Anyway, is there anyway to prevent psp from going into standby ?
Back to top
View user's profile Send private message
m0skit0



Joined: 02 Jun 2009
Posts: 226

PostPosted: Thu Aug 06, 2009 12:23 am    Post subject: Reply with quote

Quote:
is there anyway to prevent psp from going into standby ?

Hooking scePowerRequestSuspend()? lol
_________________
The Incredible Bill Gates wrote:
The obvious mathematical breakthrough would be development of an easy way to factor large prime numbers.
Back to top
View user's profile Send private message
iceman755



Joined: 21 Jul 2008
Posts: 34

PostPosted: Thu Aug 06, 2009 3:36 am    Post subject: Reply with quote

zydeoN wrote:
Anyway, is there anyway to prevent psp from going into standby ?

If you mean that the psp is going to standby when no button is pressed in some amount of time, then maybe scePowerTick() is the function you want to use.
_________________
"Libera eas de ore leonis, ne absorbeat eas tartarus, ne cadant in obscurum"
Back to top
View user's profile Send private message
zydeoN



Joined: 09 May 2009
Posts: 45

PostPosted: Thu Aug 06, 2009 7:01 am    Post subject: Reply with quote

maybe, iŽll try it.. It works! Thanks iceman755 :D
Back to top
View user's profile Send private message
zydeoN



Joined: 09 May 2009
Posts: 45

PostPosted: Fri Aug 07, 2009 10:36 am    Post subject: Reply with quote

now i have a weird problem when activating usb. If i toggle usb with my prx and then turn it off, all goes well. But if i toggle the usb again, the xmb automatically starts a usb connection itself (usual usb connection) and gives internal error 80243101. I find out that the problem was activating the autoconnnect usb in system settings. Without that all goes well. But how could i fix this? If there was a function which could read whether usb auto connection is on or off...
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