How to crash the PSP, so watchdog restarts after 10 seconds?

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

Moderators: cheriff, TyRaNiD

Post Reply
User avatar
Torch
Posts: 825
Joined: Wed May 28, 2008 2:50 am

How to crash the PSP, so watchdog restarts after 10 seconds?

Post by Torch »

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 »

lol there are tons of ways.

asm("break\n");

_sw(0, 0);

int *x = NULL; *x = 0;

etc, etc
User avatar
Torch
Posts: 825
Joined: Wed May 28, 2008 2:50 am

Post by Torch »

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 »

The real question is why on earth would you want to? :)
User avatar
Torch
Posts: 825
Joined: Wed May 28, 2008 2:50 am

Post by Torch »

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 »

Can't you just do it nice and call scePowerRequestStandby() which will shut down the PSP without any extra cludges :)
User avatar
Torch
Posts: 825
Joined: Wed May 28, 2008 2:50 am

Post by Torch »

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 »

Code: Select all

sceKernelDelayThread(10000000); scePowerRequestStandby();
does the same thing :P
User avatar
Torch
Posts: 825
Joined: Wed May 28, 2008 2:50 am

Post by Torch »

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 »

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
User avatar
Torch
Posts: 825
Joined: Wed May 28, 2008 2:50 am

Post by Torch »

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 »

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.
User avatar
Jim
Posts: 476
Joined: Sat Jul 02, 2005 10:06 pm
Location: Sydney
Contact:

Post by Jim »

How about while(1);

Jim
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

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