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 > debug logs from emulators

#141698 - Moby Disk - Fri Sep 28, 2007 4:14 pm

Is there a way I can get a debug log from my app while it is running? I tried writing a log file out using FAT while running under desmume and I discovered it doesn't actually write to disk, it just "virtually" writes to disk and keeps it in memory. :-(

#141704 - Peter - Fri Sep 28, 2007 6:19 pm

If you use no$gba (not the freeware version), it creates DEBUGMSG.TXT in the directory where no$gba.exe is located. This file contains user-debug messages as well as 3d and wifi logs.
_________________
Kind Regards,
Peter

#141709 - Mighty Max - Fri Sep 28, 2007 7:45 pm

Desmume works together with GDB for debugging code.
_________________
GBAMP Multiboot

#141723 - Moby Disk - Fri Sep 28, 2007 9:08 pm

I heard about the special version of no$gba. I'll have to try that out. I know that desmume works with GDB, but I don't know how I would send a log message to GDB. How do you do that? I am new to gdb.

#141727 - Moby Disk - Fri Sep 28, 2007 9:37 pm

Wow, $1700 for the version of no$gba that supports source-level debugging. Hmm..... Does the $15 version allow me to write a debug log? There's no mention of logging on the web site http://nocash.emubase.de/gba-dev.htm so I'm unclear. $1700 is a big much for free game development. $15 is probably too low actually. :) Well, I guess I can try the $15 version and see if it does anything. That's not too much to "donate" to the no$gba project.

#141729 - Peter - Fri Sep 28, 2007 10:04 pm

Moby Disk wrote:
Does the $15 version allow me to write a debug log?

Yes
_________________
Kind Regards,
Peter

#141813 - blasty - Sun Sep 30, 2007 11:53 am

You want custom debug messages from an emulator? Even if the emulator doesn't support this natively, you could just fill some memory region with your current debug contents.. and have a seperate application snoop the memory of the emulator, and extract it that way. (Look into attaching to processes and reading memory from other processes .. Linux has a ptrace interface)

#141816 - Mighty Max - Sun Sep 30, 2007 11:59 am

Given, that in this case you got to do several address translations (from NDS app to emulator memory location to mapped process memory) i really wouldn't recomment this approch to anyone (even if you know what you are doing)

But using the build-in memory, code, register, etc viewers might be helpfull.
_________________
GBAMP Multiboot

#141886 - a128 - Mon Oct 01, 2007 8:49 am

The NDS has 2 screens...so just use one as a debug messages terminal...I use this for my apps...