Page 1 of 1

Profiling and debugging tools?

Posted: Tue Aug 27, 2013 11:45 am
by doragasu
Is there a way to use any Genesis emulator along with GDB? (preferably for Linux and not requiring an expensive computer). I know Gens Kmod has some fancy debugging facilities, but AFAIK it is Windows only and it doesn't look like it can be integrated with GDB or any other debugger. Also Exodus debugging support looks great, but again it is Windows only, and it also doesn't look that can be used with an external debugger like GDB.

If there is no Genesis emulator that can deal with GDB, is there other kind of simulator/emulator that allows it? (just for profiling/debugging some routines) I suppose it can be done with qemu, but it looks complicated. Anyone using qemu here for debugging 68k code?

What are your favorite tools for Genesis code profiling and debugging?

Posted: Tue Aug 27, 2013 12:33 pm
by Stef
This is a feature that i am really waiting for ! Currently there is no emulator with GDB support.

Posted: Wed Aug 28, 2013 12:59 am
by Graz
Stef wrote:... Currently there is no emulator with GDB support.
This is my patched version of Gens:

http://youtu.be/DgboHbCGsd4

Posted: Wed Aug 28, 2013 11:01 am
by Stef
Oh nice one, i was not aware of that ! And by the way, the rotozoom effect looks impressive :D
Is there any links where we can download it ? Having complete GDB interface would help a tons in debugging megadrive code !

Posted: Wed Aug 28, 2013 11:25 am
by Graz
I've never released this build of the emulator. It's got a bunch of other fixes and features. GDB support is basically just an implementation of the GDB remote debug protocol (http://sourceware.org/gdb/current/onlin ... tocol.html). I can debug both 68Ks in a CD system and both SH2s in a 32x simultaneously. The remote part of it works too - you can debug from one machine to another, including from Linux to Windows, etc.

I don't think I'll release this one as-is. There are too many hacked up copies of Gens floating around, and too many other hacks in my build. However, I'd be very happy to port GDB support into another emulator should there be an opening of source...

Posted: Wed Aug 28, 2013 1:13 pm
by Stef
I understand your point about having too much Gens hacks version, also Gens is not really accurate and probably not a good emulator to test homebrew dev. I think Genesis Plus would be a nice candidate for GDB support as Exodus (though it has the inconvenient of strong CPU requirement to run at full speed).

Posted: Wed Aug 28, 2013 5:38 pm
by notaz
Graz wrote:I don't think I'll release this one as-is. There are too many hacked up copies of Gens floating around, and too many other hacks in my build. However, I'd be very happy to port GDB support into another emulator should there be an opening of source...
Feature like that would certainly be welcome in PicoDrive:
https://github.com/notaz/picodrive

It has 32X/CD support, but is performance oriented and has weaker VDP emulation compared to Genesis Plus, although I plan to work on that. Both emus aren't targeting windows though, so if that's what you are looking for we're out of luck I guess.

Posted: Wed Aug 28, 2013 9:06 pm
by doragasu
That would be a killer feature!

Posted: Thu Aug 29, 2013 3:53 am
by Chilly Willy
I like Gens/GS r7 from over at SonicRetro, mainly because I patched the code for interrupt-driven DMA PWM audio on the 32X. It's the only 32X emulator to handle it properly.

Posted: Thu Aug 29, 2013 12:42 pm
by notaz
FWIW it's working in PicoDrive too. Doesn't latest Kega do it too?

Posted: Thu Aug 29, 2013 9:36 pm
by Chilly Willy
notaz wrote:FWIW it's working in PicoDrive too. Doesn't latest Kega do it too?
Cool! Great news about PicoDrive. :D

Any supposedly, it is in the LATEST Fusion... which is Windows only, yet somehow I and a few others cannot get the audio to work at all in Windows. The linux version is an update behind and sounds dreadful for DMA PWM... the MacOS version as well. WINE also doesn't give any audio for the newest Windows version of FUSION. :(

Posted: Mon Sep 02, 2013 3:26 pm
by KanedaFr
From what I checked myself some months ago, it would be "easy" to add the feature on MESS.

I never did it myself because MESS lacks the features I made GensKMod for.

Posted: Mon Sep 02, 2013 6:45 pm
by Graz
KanedaFr wrote:I never did it myself because MESS lacks the features I made GensKMod for.
Indeed. The reason that I used KMod as a base for my own private hackings is that it already had many of the features I was looking for.