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 

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

 
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: Sun Jun 01, 2008 2:27 am    Post subject: How to crash the PSP, so watchdog restarts after 10 seconds? Reply with quote

How do I crash the PSP such that it autorestarts after 10 seconds or whatever?
Back to top
View user's profile Send private message
moonlight



Joined: 26 Oct 2005
Posts: 567

PostPosted: Sun Jun 01, 2008 2:46 am    Post subject: Reply with quote

lol there are tons of ways.

asm("break\n");

_sw(0, 0);

int *x = NULL; *x = 0;

etc, etc
Back to top
View user's profile Send private message
Torch



Joined: 28 May 2008
Posts: 842

PostPosted: Sun Jun 01, 2008 2:49 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
TyRaNiD



Joined: 18 Jan 2004
Posts: 918

PostPosted: Sun Jun 01, 2008 6:02 pm    Post subject: Reply with quote

The real question is why on earth would you want to? :)
Back to top
View user's profile Send private message
Torch



Joined: 28 May 2008
Posts: 842

PostPosted: Sun Jun 01, 2008 6:12 pm    Post subject: Reply with quote

TyRaNiD wrote:
The real question is why on earth would you want to? :)


So people will get tired of guessing passwords..
Back to top
View user's profile Send private message
TyRaNiD



Joined: 18 Jan 2004
Posts: 918

PostPosted: Sun Jun 01, 2008 6:16 pm    Post subject: Reply with quote

Can't you just do it nice and call scePowerRequestStandby() which will shut down the PSP without any extra cludges :)
Back to top
View user's profile Send private message
Torch



Joined: 28 May 2008
Posts: 842

PostPosted: Sun Jun 01, 2008 6:18 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
TyRaNiD



Joined: 18 Jan 2004
Posts: 918

PostPosted: Sun Jun 01, 2008 6:23 pm    Post subject: Reply with quote

Code:
sceKernelDelayThread(10000000); scePowerRequestStandby();
does the same thing :P
Back to top
View user's profile Send private message
Torch



Joined: 28 May 2008
Posts: 842

PostPosted: Sun Jun 01, 2008 6:25 pm    Post subject: Reply with quote

TyRaNiD wrote:
Code:
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.
Back to top
View user's profile Send private message
TyRaNiD



Joined: 18 Jan 2004
Posts: 918

PostPosted: Sun Jun 01, 2008 6:27 pm    Post subject: Reply with quote

Fine,
Code:
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
Back to top
View user's profile Send private message
Torch



Joined: 28 May 2008
Posts: 842

PostPosted: Sun Jun 01, 2008 6:31 pm    Post subject: Reply with quote

I though those were kernel mode only functions? Will the powerlock thing be usable in my vsh mode module?
Back to top
View user's profile Send private message
TyRaNiD



Joined: 18 Jan 2004
Posts: 918

PostPosted: Sun Jun 01, 2008 6:33 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Jim



Joined: 02 Jul 2005
Posts: 487
Location: Sydney

PostPosted: Sun Jun 01, 2008 10:39 pm    Post subject: Reply with quote

How about while(1);

Jim
_________________
http://www.dbfinteractive.com
Back to top
View user's profile Send private message Visit poster's website
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Mon Jun 02, 2008 1:33 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
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