What is the port for checking display enable?adrahil wrote:and you can use the GPIO bits to check for display enable :)
Stop standby on scePowerUnlock if switch flipped while lock.
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
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...
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: Select all
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
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.
-
- Posts: 409
- Joined: Tue Oct 09, 2007 4:22 am
-
- Posts: 110
- Joined: Tue Feb 27, 2007 9:43 pm
- Contact:
scePowerCancelRequest only cancels hw requests, ie from the power switch. It doesnt cancel software requests, ie. calls from scePowerRequestStandby, scePowerRequestSuspend, scePower_driver_2875994B, & scePowerRequestColdReset.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 scePowerCancelRequestAnyway, can be the args ( a0-1-2-...) be passed directly to sceKernelCpuSuspendIntr?Code: Select all
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
In this case the scePowerCancelRequest funct has to reiceve 2 args, right?
EDIT:
Sorry, sceKernelCpuSuspendIntr is void so...
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.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.
I tried to call the cancel request in the power callback for power switch pushed but it doesn't work. It still gets suspended.