SDL+PSPgl stdout/debugging

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

Moderators: cheriff, TyRaNiD

Post Reply
neuroscr
Posts: 2
Joined: Fri Jan 05, 2007 1:16 pm

SDL+PSPgl stdout/debugging

Post by neuroscr »

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?
jimparis
Posts: 1145
Joined: Fri Jun 10, 2005 4:21 am
Location: Boston

Re: SDL+PSPgl stdout/debugging

Post by jimparis »

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... ?
neuroscr
Posts: 2
Joined: Fri Jan 05, 2007 1:16 pm

Re: SDL+PSPgl stdout/debugging

Post by neuroscr »

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.
TyRaNiD
Posts: 907
Joined: Sun Jan 18, 2004 12:23 am

Post by TyRaNiD »

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 :)
jimparis
Posts: 1145
Joined: Fri Jun 10, 2005 4:21 am
Location: Boston

Post by jimparis »

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.
jockyw2001
Posts: 339
Joined: Thu Sep 29, 2005 4:19 pm

Post by jockyw2001 »

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 ?
Post Reply