USB prx problem hook?

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

Moderators: cheriff, TyRaNiD

Post Reply
zydeoN
Posts: 45
Joined: Sat May 09, 2009 4:01 am

USB prx problem hook?

Post by zydeoN »

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
m0skit0
Posts: 191
Joined: Tue Jun 02, 2009 8:58 pm

Post by m0skit0 »

I guess you should hook scePowerRequestSuspend().

http://www.dark-alex.org/pspsdk_docs/ps ... 6af18e4dbf
The Incredible Bill Gates wrote:The obvious mathematical breakthrough would be development of an easy way to factor large prime numbers.
zydeoN
Posts: 45
Joined: Sat May 09, 2009 4:01 am

Post by zydeoN »

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 ?
m0skit0
Posts: 191
Joined: Tue Jun 02, 2009 8:58 pm

Post by m0skit0 »

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.
iceman755
Posts: 30
Joined: Mon Jul 21, 2008 1:12 am

Post by iceman755 »

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"
zydeoN
Posts: 45
Joined: Sat May 09, 2009 4:01 am

Post by zydeoN »

maybe, i´ll try it.. It works! Thanks iceman755 :D
zydeoN
Posts: 45
Joined: Sat May 09, 2009 4:01 am

Post by zydeoN »

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...
Post Reply