gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS development > newbie in DS dev - question about debug+printf

#172604 - protomank - Fri Feb 19, 2010 3:17 am

Hello, my name is Iuri and I am creating a game (megaman-like) using SDL that already have ports to Linux, Windows and Playstation 2.

I want to port it to Nintendo DS, but I have a problem when using SDL on DS: after you init the SDL, even if you did not yet have created the screen surface, the printfs stop working. I mostly use printfs for debug because of the portability, I do not have time to learnabout every single system you are porting to, it's toolkits and hardcore techniches.

So, my question is: is there a way to show printfs, maybe using an emulator? Maybe redirecting the printf to a file or something like that? Using a wifi connection to send messages to my PC machine?

Thanks in advance.
_________________
Iuri Fiedoruk
http://rockbot.upperland.net

#172620 - zelbo - Sat Feb 20, 2010 6:52 am

i'm not familiar with SDL, but on the DS i use this for printf (or iprintf, since the DS has no FPU): http://libnds.devkitpro.org/a00068.html

#172623 - protomank - Sat Feb 20, 2010 11:18 am

Yes, I used consoleInit()/printf, but once I run SDL_Init() it takes over both screens and I loose the hability to use all consoleInit functions.
_________________
Iuri Fiedoruk
http://rockbot.upperland.net