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 

SDL+PSPgl stdout/debugging

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



Joined: 05 Jan 2007
Posts: 2

PostPosted: Fri Jan 05, 2007 4:31 pm    Post subject: SDL+PSPgl stdout/debugging Reply with quote

Trying to get the best way to get to the STDOUT from my game.

-outputting to STDOUT shows up in PSPLINK until SDL is set up and then nothing else (nothing in stdout/stderr.txt). Without PSPLINK the stdout goes nowhere.
-pspDebugScreenPrintf shows up correctly in SDL (no GL) but so do the graphics, so I can't read it.
-pspDebugScreenPrintf shows up incorrectly in SDL+PSPgl (wrong video mode? I can barely make out what its saying)

Any ideas, suggestions?
Back to top
View user's profile Send private message
jimparis



Joined: 10 Jun 2005
Posts: 1179
Location: Boston

PostPosted: Sat Jan 06, 2007 2:50 am    Post subject: Re: SDL+PSPgl stdout/debugging Reply with quote

neuroscr wrote:
-outputting to STDOUT shows up in PSPLINK until SDL is set up and then nothing else (nothing in stdout/stderr.txt). Without PSPLINK the stdout goes nowhere.

SDL reopens stdout/stderr, which probably kills the psplink redirection. You could rebuild SDL with NO_STDIO_REDIRECT defined, or don't link libSDLmain (and instead do the PSP-specific setup yourself). Now that psplink works so well, it might be worth just removing that stdout/stderr redirection from SDL completely... ?
Back to top
View user's profile Send private message
neuroscr



Joined: 05 Jan 2007
Posts: 2

PostPosted: Sat Jan 06, 2007 1:51 pm    Post subject: Re: SDL+PSPgl stdout/debugging Reply with quote

jimparis wrote:
SDL reopens stdout/stderr, which probably kills the psplink redirection. You could rebuild SDL with NO_STDIO_REDIRECT defined, or don't link libSDLmain (and instead do the PSP-specific setup yourself). Now that psplink works so well, it might be worth just removing that stdout/stderr redirection from SDL completely... ?


NO_STDIO_REDIRECT works. Thanks.
Back to top
View user's profile Send private message
TyRaNiD



Joined: 18 Jan 2004
Posts: 918

PostPosted: Sat Jan 06, 2007 2:32 pm    Post subject: Reply with quote

In my opinion I would feel making SDL 100% user mode would be a great idea, at the moment you cannot debug SDL code in GDB cause I dont support kernel apps and things like that, I think we are long past the day of actually needing to start up anything in kernel mode :)
Back to top
View user's profile Send private message
jimparis



Joined: 10 Jun 2005
Posts: 1179
Location: Boston

PostPosted: Sat Jan 06, 2007 3:51 pm    Post subject: Reply with quote

I agree; I'll be away for a week or two, but I'll do that when I get back if nobody else gets to it first.
Back to top
View user's profile Send private message
jockyw2001



Joined: 29 Sep 2005
Posts: 339

PostPosted: Sat Jan 06, 2007 9:18 pm    Post subject: Reply with quote

TyRaNiD wrote:
..., I think we are long past the day of actually needing to start up anything in kernel mode :)

I'd love to transform PMP VLC in to a usermode app. However, it uses the ME and AVC hw. So there is no way to do that I guess ?
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