Discuss the development of new homebrew software, tools and libraries.
Moderators: cheriff , TyRaNiD
Torch
Posts: 825 Joined: Wed May 28, 2008 2:50 am
Post
by Torch » Sun Jun 01, 2008 2:27 am
How do I crash the PSP such that it autorestarts after 10 seconds or whatever?
moonlight
Posts: 567 Joined: Wed Oct 26, 2005 7:46 pm
Post
by moonlight » Sun Jun 01, 2008 2:46 am
lol there are tons of ways.
asm("break\n");
_sw(0, 0);
int *x = NULL; *x = 0;
etc, etc
Torch
Posts: 825 Joined: Wed May 28, 2008 2:50 am
Post
by Torch » Sun Jun 01, 2008 2:49 am
Thank you. I didn't have any idea how. And I presumed that nonsense in asm(..) would give a compiler error.
The rest of my program will function properly right? I want it to crash only when I call that code.
TyRaNiD
Posts: 907 Joined: Sun Jan 18, 2004 12:23 am
Post
by TyRaNiD » Sun Jun 01, 2008 6:02 pm
The real question is why on earth would you want to? :)
Torch
Posts: 825 Joined: Wed May 28, 2008 2:50 am
Post
by Torch » Sun Jun 01, 2008 6:12 pm
TyRaNiD wrote: The real question is why on earth would you want to? :)
So people will get tired of guessing passwords..
TyRaNiD
Posts: 907 Joined: Sun Jan 18, 2004 12:23 am
Post
by TyRaNiD » Sun Jun 01, 2008 6:16 pm
Can't you just do it nice and call scePowerRequestStandby() which will shut down the PSP without any extra cludges :)
Torch
Posts: 825 Joined: Wed May 28, 2008 2:50 am
Post
by Torch » Sun Jun 01, 2008 6:18 pm
TyRaNiD wrote: Can't you just do it nice and call scePowerRequestStandby() which will shut down the PSP without any extra cludges :)
But this way they have to stare at the "wrong password" screen for 10 seconds. Its more the annoyance factor.
TyRaNiD
Posts: 907 Joined: Sun Jan 18, 2004 12:23 am
Post
by TyRaNiD » Sun Jun 01, 2008 6:23 pm
Code: Select all
sceKernelDelayThread(10000000); scePowerRequestStandby();
does the same thing :P
Torch
Posts: 825 Joined: Wed May 28, 2008 2:50 am
Post
by Torch » Sun Jun 01, 2008 6:25 pm
TyRaNiD wrote: Code: Select all
sceKernelDelayThread(10000000); scePowerRequestStandby();
does the same thing :P
But they can switch it off in 3 seconds using the power switch if its only DelayThread. Crash cant be turned off in less than 10 seconds.
TyRaNiD
Posts: 907 Joined: Sun Jan 18, 2004 12:23 am
Post
by TyRaNiD » Sun Jun 01, 2008 6:27 pm
Fine,
Code: Select all
scePowerLock(0); sceKernelDelayThread(10000000); scePowerUnlock(0); scePowerRequestStandby();
After all I could probably get an exception handler in somewhere to prevent you crashing it in the first place :P
Torch
Posts: 825 Joined: Wed May 28, 2008 2:50 am
Post
by Torch » Sun Jun 01, 2008 6:31 pm
I though those were kernel mode only functions? Will the powerlock thing be usable in my vsh mode module?
TyRaNiD
Posts: 907 Joined: Sun Jan 18, 2004 12:23 am
Post
by TyRaNiD » Sun Jun 01, 2008 6:33 pm
They are all user mode functions. At least they should be :) The lock stuff is so for example a game could write out a file and be sure the user cannot possibly power off during that period.
Jim
Posts: 476 Joined: Sat Jul 02, 2005 10:06 pm
Location: Sydney
Contact:
Post
by Jim » Sun Jun 01, 2008 10:39 pm
How about while(1);
Jim
J.F.
Posts: 2906 Joined: Sun Feb 22, 2004 11:41 am
Post
by J.F. » Mon Jun 02, 2008 1:33 am
TyRaNiD wrote: They are all user mode functions. At least they should be :) The lock stuff is so for example a game could write out a file and be sure the user cannot possibly power off during that period.
When I was working on SNES9xTYL for the Slim, I found that the exception handler couldn't be used on the Slim. Sakya (I think it was him) eventually made a kernel mode prx that could be loaded from user mode that allowed an exception handler to be used from a Slim app. You can find that with a search.