pspDebugInstallErrorHandler causes 80020001

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

Moderators: cheriff, TyRaNiD

Post Reply
johnsto
Posts: 30
Joined: Wed Jan 18, 2006 8:52 am

pspDebugInstallErrorHandler causes 80020001

Post by johnsto »

I'm betting this is really simple but it's driving me mad.

My game works fine, however I'm now trying to add an exception handler to catch an occasional crash that never happens when I want it to. I've done this by adding 'pspDebugInstallErrorHandler(NULL);' at the top of main() and included pspdebug.h.

When I try to run it however, I get the dreaded '80020001' message. Comment out that line, and it runs perfectly.

Appropriate Makefile lines:

Code: Select all

CFLAGS = -G4 -Wall -O2
CXXFLAGS = $(CFLAGS) -fno-rtti
ASFLAGS = $(CFLAGS)

STDLIBS= -lds -losl -lpng -lz \
		-lpspsdk -lpspctrl -lpspumd -lpsprtc -lpspgu -lpspaudiolib -lpspaudio -lm
Help!

(Ta.)
Ghoti
Posts: 288
Joined: Sat Dec 31, 2005 11:06 pm

Post by Ghoti »

Hi,

i have sort of the same problem my game just gets black when i do the function you also use but i have had your problem:

what i did to solve it is in these two lines:
PSP_MODULE_INFO("Boxy 2", 0x1000, 1, 1);
PSP_MAIN_THREAD_ATTR(PSP_THREAD_ATTR_USER | THREAD_ATTR_VFPU);

Code: Select all

 mess around with these and your problem should be fixed.

if everything works for you please let me know how you did it cuase i can't seem to get it to work :( and i have also an bug which only comes someties when you play for 20 minutes :S
johnsto
Posts: 30
Joined: Wed Jan 18, 2006 8:52 am

Post by johnsto »

Hmm, using:

Code: Select all

PSP_MODULE_INFO("test", 0x1000, 1, 1);
PSP_MAIN_THREAD_ATTR(0);
Sort of works - it loads up immediately to an exception screen saying "Coprocessor unusable", and a couple of the registers (s6 and s7) are "DEADBEEF"...
User avatar
dot_blank
Posts: 498
Joined: Wed Sep 28, 2005 8:47 am
Location: Brasil

Post by dot_blank »

pspDebugInstallErrorHandler(NULL); would use the default
best for you to handle yourself ..just take a look at exception
sample in samples/debug and use your own like this simply
pspDebugInstallErrorHandler(myErrorHandler());
10011011 00101010 11010111 10001001 10111010
Ghoti
Posts: 288
Joined: Sat Dec 31, 2005 11:06 pm

Post by Ghoti »

I tried that but it didn't work for me i get a black screen see my post :(
TyRaNiD
Posts: 907
Joined: Sun Jan 18, 2004 12:23 am

Post by TyRaNiD »

Or just use psplink and be done with it ;)
johnsto
Posts: 30
Joined: Wed Jan 18, 2006 8:52 am

Post by johnsto »

Installing my own exception handler (from another piece of code) gave the same black screen and shutdown.

I have been using psplink, but unfortunately my program finds it hilarious if it only crashes when I'm not ready for it - especially when I'm not debugging!
Ghoti
Posts: 288
Joined: Sat Dec 31, 2005 11:06 pm

Post by Ghoti »

yes maybe i should use psplink but is quite a hassel to get it running :(
Post Reply