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 

Stop standby on scePowerUnlock if switch flipped while lock.
Goto page Previous  1, 2
 
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: Sat Jul 05, 2008 10:30 pm    Post subject: Reply with quote

adrahil wrote:
and you can use the GPIO bits to check for display enable :)


What is the port for checking display enable?
Back to top
View user's profile Send private message
Torch



Joined: 28 May 2008
Posts: 842

PostPosted: Wed Nov 19, 2008 5:30 pm    Post subject: Reply with quote

Do you know the value for the standby event? The suspend even doesn't catch it when you hold the power switch for 3 seconds.
Back to top
View user's profile Send private message
ne0h



Joined: 21 Feb 2008
Posts: 386

PostPosted: Thu Nov 20, 2008 12:44 am    Post subject: Reply with quote

http://forums.ps2dev.org/viewtopic.php?t=11294
Here I've found scePowerIsRequest functions that return 1 if you try to shutdown or suspend the PSP in the both cases ( Power switch and scePower* functions )!
I've also finded scePowerCancelRequest function, I've tried it but doesn't works, maybe there's something to do to get it working!
If I'm right with this you can resolve "all" your problems...
Here is the asm of scePowerCancelRequest
Code:

scePowerCancelRequest:
   0x00002B30: 0x27BDFFF0 '...'' - addiu      $sp, $sp, -16
   0x00002B34: 0xAFBF0004 '....' - sw         $ra, 4($sp)
   0x00002B38: 0x0C0016D2 '....' - jal        sceKernelCpuSuspendIntr
   0x00002B3C: 0xAFB00000 '....' - sw         $s0, 0($sp)
   0x00002B40: 0x3C040000 '...<' - lui        $a0, 0x0
   0x00002B44: 0x24850258 'X..$' - addiu      $a1, $a0, 600
   0x00002B48: 0x8CB00028 '(...' - lw         $s0, 40($a1)
   0x00002B4C: 0xACA00028 '(...' - sw         $zr, 40($a1)
   0x00002B50: 0x0C0016D6 '....' - jal        sceKernelCpuResumeIntr
   0x00002B54: 0x00402021 '! @.' - move       $a0, $v0
   0x00002B58: 0x02001021 '!...' - move       $v0, $s0
   0x00002B5C: 0x8FBF0004 '....' - lw         $ra, 4($sp)
   0x00002B60: 0x8FB00000 '....' - lw         $s0, 0($sp)
   0x00002B64: 0x03E00008 '....' - jr         $ra
   0x00002B68: 0x27BD0010 '...'' - addiu      $sp, $sp, 16

Anyway, can be the args ( a0-1-2-...) be passed directly to sceKernelCpuSuspendIntr?
In this case the scePowerCancelRequest funct has to reiceve 2 args, right?

EDIT:
Sorry, sceKernelCpuSuspendIntr is void so...


Last edited by ne0h on Thu Nov 20, 2008 12:59 am; edited 1 time in total
Back to top
View user's profile Send private message
Torch



Joined: 28 May 2008
Posts: 842

PostPosted: Thu Nov 20, 2008 12:50 am    Post subject: Reply with quote

AFAIK by the time you can use any of the above functions, the suspend process is already underway and any running game would have made preparations to suspend. Only the sysevent gets called before applications are aware of it.
Back to top
View user's profile Send private message
ne0h



Joined: 21 Feb 2008
Posts: 386

PostPosted: Thu Nov 20, 2008 12:57 am    Post subject: Reply with quote

Oh, ok!
Sorry...

P.S:
What means AFAIK? :@
Back to top
View user's profile Send private message
Pirata Nervo



Joined: 09 Oct 2007
Posts: 409

PostPosted: Thu Nov 20, 2008 2:26 am    Post subject: Reply with quote

As Far As I Know :)

www.urbandictionary.com
_________________

Upgrade your PSP
Back to top
View user's profile Send private message
ne0h



Joined: 21 Feb 2008
Posts: 386

PostPosted: Thu Nov 20, 2008 4:23 am    Post subject: Reply with quote

-.-, thanks...
Back to top
View user's profile Send private message
SilverSpring



Joined: 27 Feb 2007
Posts: 115

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

ne0h wrote:
http://forums.ps2dev.org/viewtopic.php?t=11294
Here I've found scePowerIsRequest functions that return 1 if you try to shutdown or suspend the PSP in the both cases ( Power switch and scePower* functions )!
I've also finded scePowerCancelRequest function, I've tried it but doesn't works, maybe there's something to do to get it working!
If I'm right with this you can resolve "all" your problems...
Here is the asm of scePowerCancelRequest
Code:

scePowerCancelRequest:
   0x00002B30: 0x27BDFFF0 '...'' - addiu      $sp, $sp, -16
   0x00002B34: 0xAFBF0004 '....' - sw         $ra, 4($sp)
   0x00002B38: 0x0C0016D2 '....' - jal        sceKernelCpuSuspendIntr
   0x00002B3C: 0xAFB00000 '....' - sw         $s0, 0($sp)
   0x00002B40: 0x3C040000 '...<' - lui        $a0, 0x0
   0x00002B44: 0x24850258 'X..$' - addiu      $a1, $a0, 600
   0x00002B48: 0x8CB00028 '(...' - lw         $s0, 40($a1)
   0x00002B4C: 0xACA00028 '(...' - sw         $zr, 40($a1)
   0x00002B50: 0x0C0016D6 '....' - jal        sceKernelCpuResumeIntr
   0x00002B54: 0x00402021 '! @.' - move       $a0, $v0
   0x00002B58: 0x02001021 '!...' - move       $v0, $s0
   0x00002B5C: 0x8FBF0004 '....' - lw         $ra, 4($sp)
   0x00002B60: 0x8FB00000 '....' - lw         $s0, 0($sp)
   0x00002B64: 0x03E00008 '....' - jr         $ra
   0x00002B68: 0x27BD0010 '...'' - addiu      $sp, $sp, 16

Anyway, can be the args ( a0-1-2-...) be passed directly to sceKernelCpuSuspendIntr?
In this case the scePowerCancelRequest funct has to reiceve 2 args, right?

EDIT:
Sorry, sceKernelCpuSuspendIntr is void so...


scePowerCancelRequest only cancels hw requests, ie from the power switch. It doesnt cancel software requests, ie. calls from scePowerRequestStandby, scePowerRequestSuspend, scePower_driver_2875994B, & scePowerRequestColdReset.

If you look at the asm, it only zero's one global var (the hardware request), another var controls the software requests.
_________________
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:13 pm    Post subject: Reply with quote

SilverSpring wrote:
scePowerCancelRequest only cancels hw requests, ie from the power switch. It doesnt cancel software requests, ie. calls from scePowerRequestStandby, scePowerRequestSuspend, scePower_driver_2875994B, & scePowerRequestColdReset.

If you look at the asm, it only zero's one global var (the hardware request), another var controls the software requests.


Does that mean there's a more efficient way to cancel a power switch suspend that using a sysevent? Because I only want to cancel the power switch event and not the idle timeout suspend. I have to make additional checks for this in my app when using the sysevent.

I tried to call the cancel request in the power callback for power switch pushed but it doesn't work. It still gets suspended.
Back to top
View user's profile Send private message
ne0h



Joined: 21 Feb 2008
Posts: 386

PostPosted: Tue Nov 25, 2008 12:27 am    Post subject: Reply with quote

Thanks SilverSpring
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
Goto page Previous  1, 2
Page 2 of 2

 
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