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 

Prints Debug to PSPLink, but not PSP?

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
sg57



Joined: 14 Oct 2005
Posts: 154

PostPosted: Mon Jun 26, 2006 8:43 am    Post subject: Prints Debug to PSPLink, but not PSP? Reply with quote

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



Joined: 04 Nov 2005
Posts: 182

PostPosted: Mon Jun 26, 2006 10:27 am    Post subject: Reply with quote

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



Joined: 14 Oct 2005
Posts: 154

PostPosted: Sat Jul 01, 2006 2:05 pm    Post subject: Reply with quote

I have that already defined when i complied. It just didnt spit it out... Could this be do to the lack of callbacks?
Back to top
View user's profile Send private message
danzel



Joined: 04 Nov 2005
Posts: 182

PostPosted: Sat Jul 01, 2006 3:13 pm    Post subject: Reply with quote

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