Prints Debug to PSPLink, but not PSP?

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

Moderators: cheriff, TyRaNiD

Post Reply
sg57
Posts: 144
Joined: Fri Oct 14, 2005 2:26 pm

Prints Debug to PSPLink, but not PSP?

Post by sg57 »

I have a problem with debug text/printing.

I originally got a black screen crash and PSPLink gave me the exception handler. SO i fixed it, and now nothing prints on the PSP, without PSPLink or with it.

but with PSPLink it does print it onto the console command prompt (telnet), meaning its not crashing when in the black screen with no text, just not printing it for some reason...

Does anybody have an explanation as to why PSPLink will print the debug printing text to the telnet console while the PSP itself will not, even WITHOUT the PSPLink active and running?

Thank you.
danzel
Posts: 182
Joined: Fri Nov 04, 2005 11:03 pm

Post by danzel »

You are calling printf or cout to print I assume?
By default this prints to a debug stream which isn't rendered to the screen. PSPLink captures it and throws it onto its telnet session.
To get it to render to the screen you need to call pspDebugScreenPrintf instead.

pspDebugScreenPrintf("Hello world %i\n", 23);

It works just like printf, but prints to the screen on psp.
To change all your printfs to use it, use a #define:

#define printf pspDebugScreenPrintf

And recompile all your code.
sg57
Posts: 144
Joined: Fri Oct 14, 2005 2:26 pm

Post by sg57 »

I have that already defined when i complied. It just didnt spit it out... Could this be do to the lack of callbacks?
danzel
Posts: 182
Joined: Fri Nov 04, 2005 11:03 pm

Post by danzel »

I don't think you have it defined in the right place, try changing some of the printf's to be pspDebugScreenPrintf's, see if that makes them print on screen.
If it does then your #define is in the wrong place (or you didn't recompile enough)
Post Reply