 |
forums.ps2dev.org Homebrew PS2, PSP & PS3 Development Discussions
|
| View previous topic :: View next topic |
| Author |
Message |
Torch

Joined: 28 May 2008 Posts: 842
|
Posted: Sat Jul 05, 2008 10:30 pm Post subject: |
|
|
| 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 |
|
 |
Torch

Joined: 28 May 2008 Posts: 842
|
Posted: Wed Nov 19, 2008 5:30 pm Post subject: |
|
|
| 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 |
|
 |
ne0h
Joined: 21 Feb 2008 Posts: 386
|
Posted: Thu Nov 20, 2008 12:44 am Post subject: |
|
|
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 |
|
 |
Torch

Joined: 28 May 2008 Posts: 842
|
Posted: Thu Nov 20, 2008 12:50 am Post subject: |
|
|
| 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 |
|
 |
ne0h
Joined: 21 Feb 2008 Posts: 386
|
Posted: Thu Nov 20, 2008 12:57 am Post subject: |
|
|
Oh, ok!
Sorry...
P.S:
What means AFAIK? :@ |
|
| Back to top |
|
 |
Pirata Nervo
Joined: 09 Oct 2007 Posts: 409
|
|
| Back to top |
|
 |
ne0h
Joined: 21 Feb 2008 Posts: 386
|
Posted: Thu Nov 20, 2008 4:23 am Post subject: |
|
|
| -.-, thanks... |
|
| Back to top |
|
 |
SilverSpring
Joined: 27 Feb 2007 Posts: 115
|
Posted: Mon Nov 24, 2008 1:42 pm Post subject: |
|
|
| 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 |
|
 |
Torch

Joined: 28 May 2008 Posts: 842
|
Posted: Mon Nov 24, 2008 2:13 pm Post subject: |
|
|
| 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 |
|
 |
ne0h
Joined: 21 Feb 2008 Posts: 386
|
Posted: Tue Nov 25, 2008 12:27 am Post subject: |
|
|
| Thanks SilverSpring |
|
| Back to top |
|
 |
|
|
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
|