GensKMod on Git
Moderator: BigEvilCorporation
for info 0.7.2 is available on Git
I'll upload an exe tonight on http://gendev.spritesmind.net/page-gensK.html but I wanted to share this info with anyone involved in the Git source
While I alread did it so many times this past month, I won't thank enough Graz who devoted so many hours to add/fix feature for this new version.
If you're not already sitting on a chair, please do because here come the changes :
- z80 bug issue from last release fixed
- rom drag&drop support
- added always on top option (easier for debugging)
- optimized tiles, sprite and register windows
- 16 bit color depth issue fixed (:shock:)
- plane explorer (:shock::shock:)
- gdb server (:shock::shock::shock::shock::shock:)
- gdb server for every CPU (:shock::shock::shock::shock::shock::shock::shock::shock::shock::shock::shock::shock::shock::shock::shock:)
Plane explorer is a feature I never took the time to add but was dreaming of
GDB support...well... you already know what I think no ? I said to so many people it wasn't possible that when I first step it my test program with gdb, I almost cried....
I tried to use it with Eclipse but unfortunatly I was unable to do so...
Eclipse uses too much gdb command for simple step...
So, only commandline tool (gdb or ddd) are working right now
This is how to do it:
update the makefile to disable optimisation and include debug info
keep the out file
open the bin file on gensKmod 0.7.2, it will launch like before
launch gdb-68k with the out file
inside gdb command line, move the working directory (else it won't find code source)
connect to gensKmod
reset to start
your game is now paused, you can set your breakpoint, etc... and run!
perhaps you'll need this too
http://darkdust.net/files/GDB%20Cheat%20Sheet.pdf
I'll upload an exe tonight on http://gendev.spritesmind.net/page-gensK.html but I wanted to share this info with anyone involved in the Git source
While I alread did it so many times this past month, I won't thank enough Graz who devoted so many hours to add/fix feature for this new version.
If you're not already sitting on a chair, please do because here come the changes :
- z80 bug issue from last release fixed
- rom drag&drop support
- added always on top option (easier for debugging)
- optimized tiles, sprite and register windows
- 16 bit color depth issue fixed (:shock:)
- plane explorer (:shock::shock:)
- gdb server (:shock::shock::shock::shock::shock:)
- gdb server for every CPU (:shock::shock::shock::shock::shock::shock::shock::shock::shock::shock::shock::shock::shock::shock::shock:)
Plane explorer is a feature I never took the time to add but was dreaming of
GDB support...well... you already know what I think no ? I said to so many people it wasn't possible that when I first step it my test program with gdb, I almost cried....
I tried to use it with Eclipse but unfortunatly I was unable to do so...
Eclipse uses too much gdb command for simple step...
So, only commandline tool (gdb or ddd) are working right now
This is how to do it:
update the makefile to disable optimisation and include debug info
Code: Select all
ifdef DEBUG
FLAGS+= -DDEBUG=1 -g
else
FLAGS+= -O1
endif
Code: Select all
.SECONDARY:
out/rom.out
launch gdb-68k with the out file
Code: Select all
m68k-elf-gdb my/directory/out/rom.out
Code: Select all
cd my/directory
Code: Select all
target remote localhost:6868
Code: Select all
break main
jump _Entry_Point
Code: Select all
continue
http://darkdust.net/files/GDB%20Cheat%20Sheet.pdf
-
- Very interested
- Posts: 710
- Joined: Sat Feb 18, 2012 2:44 am
Sure - no problem. I was mostly adding things that I needed. No point in hoarding. Thanks for taking the patches.KanedaFr wrote:While I alread did it so many times this past month, I won't thank enough Graz who devoted so many hours to add/fix feature for this new version.
Anyway, there are some caveats. The only thing that's really tested is the main 68K debugger. Sub 68K should work for the CD, though debugger initiated register writes probably won't work. The SH2s are really rough. You can connect to them, inspect memory, look at registers, etc., but things can get hairy quickly. In particular, you can add a breakpoint, but if it gets hit it can send the emulation core into brain failure from which it cannot recover without restarting the emulator. Single stepping doesn't work either. Also, in my tests, GDB can't walk the frame. I think the PR register isn't getting reported correctly.
I'm probably going to do more work on the 32X, so I'll be fixing those things up as I get a chance, as well as some 32X VDP work.
I've never really messed with Eclipse enough to set it up for cross debugging. If there's GDB protocol missing, post instructions on what you're doing to get as far as you have and I will add the missing parts.KanedaFr wrote:I tried to use it with Eclipse but unfortunatly I was unable to do so...
Eclipse uses too much gdb command for simple step...
Probably, never tried.djcouchycouch wrote:SGDK projects work with the gdb?
If you have debugging symbols, yes.djcouchycouch wrote:Variables and function names are shown and not just addresses?
No. That could be added. I haven't looked into it.djcouchycouch wrote:Do the kdeug messages appear in gdb output?
Now available :
http://gendev.spritesmind.net/page-gensK.html
And yes, of course, it works with SGDK...it's the one I use!
If you find bugs, just fix and pull request them!
http://gendev.spritesmind.net/page-gensK.html
And yes, of course, it works with SGDK...it's the one I use!
If you find bugs, just fix and pull request them!
-
- Very interested
- Posts: 710
- Joined: Sat Feb 18, 2012 2:44 am
Do you need to change the default makefile to get GDB to work? I haven't had the chance to try it yet.KanedaFr wrote: And yes, of course, it works with SGDK...it's the one I use!
I really like the idea of being able to see the whole plane in real time. I think what would also be really handy would be a view that shows the screen and some area around it to see the sprites that have been set but are off screen.
Normal view:
0 -> screen
X -> sprites
Code: Select all
00000000
00X00000
00000X00
00000000
Code: Select all
-------------x--------
----------------------
-------00000000-------
-------00X00000-------
--x----00000X00---x---
-------00000000-------
----------------------
---xx-----------------
see what to change in 2 msgs before... (remove optimisation, add debug support, keep rom.out file)djcouchycouch wrote:Do you need to change the default makefile to get GDB to work? I haven't had the chance to try it yet.KanedaFr wrote: And yes, of course, it works with SGDK...it's the one I use!
I think Stef'll be able to add support for debug on SGDK next version...
Awesome
Some quick correction to the YM2612 & PSG debug,
Please correct these lines in kmod.c
Some quick correction to the YM2612 & PSG debug,
Please correct these lines in kmod.c
Code: Select all
//////////////////YM2612
//line 7805
if (YM2612.REG[part][0x60 + chan + 4*op]&0x80)
lstrcat(debug_string, "ON\n");
else
lstrcat(debug_string, "OFF\n"); // correct handling of AM on/off
//line 7834
wsprintf(tmp_string,"0x%0.2X\n", YM2612.REG[part][0xB4 + chan]&0x07); //correct handling of FMS modulation.
//////////////////PSG
//line 8256
wsprintf(debug_string,"%s", (PSG.Register[6]>>2)==1 ? "White" : "Periodic"); // simply invert white & periodic status :)
-
- Very interested
- Posts: 710
- Joined: Sat Feb 18, 2012 2:44 am
Sorry to dig an old post but it can help people willing to run v0.72 on XP (Google sends me to this thread while searching for it)
Try to recompile it with at least VS2012 SP1 to enable XP compatibility.
In project properties -> general -> platform toolset replace "visual studio 2012 (v110)" by "visual studio 2012 - windows xp (v110_xp)".
I issued the same problem (my oldgen dev machine is still under XP) so I recompiled the sources with VS2012SP4 on a W8 machine with no problem.
Hi, Visual Studio 2012 doesn't produce XP compatible binaries by default.djcouchycouch wrote:Just tried this as well. Doesn't run on 32bit XP.
Try to recompile it with at least VS2012 SP1 to enable XP compatibility.
In project properties -> general -> platform toolset replace "visual studio 2012 (v110)" by "visual studio 2012 - windows xp (v110_xp)".
I issued the same problem (my oldgen dev machine is still under XP) so I recompiled the sources with VS2012SP4 on a W8 machine with no problem.
-
- Very interested
- Posts: 53
- Joined: Mon Feb 09, 2015 10:46 pm
- Contact:
Not Frontpage News?
Isn't this worthy of appearing in the News section on the homepage? I'd certainly say so...
I'm not one for making introductory topics so I'll just say hey here. Hey, I'm Ryan, a developer from the sunny shores of Scotland. If you know Scotland (or the UK at all for that matter) you'll know that that was most definitely a joke and that although I am certainly from the shores (Aberdeen to be exact) there has been any sun sighted in Scotland since 1902 (and even then it may have been a weather balloon).
I've been spending some time looking into the possibility of contributing to the development of a hacking based emulator and GensKMod looks to make the most sense as a starting point.
You can see my thought process here RHDN Topic but basically it comes down to Kega and Mame/Mess are more accuracy focused, Regen and Exodus didn't have anything in the feature list that jumped out at me (granted I still actually have to use them to see what they are really like) and they are closed source. GensKMod looks more hacker based, especially when factoring in Gens Hacking Version and Gens Tracer as well.
Would this be a fair assessment?
I'm not certain I can actually be of any help yet, just now everything is ground work and research, and I haven't even got my environment set up. Any gotchas I need to watch out for beyond what is documented in this thread?
And finally I'll get my little gush out of the way: Thanks for all the work on GensKMod and all the docs Kaneda, they've came in really handy over the years. </gushing>
I'm not one for making introductory topics so I'll just say hey here. Hey, I'm Ryan, a developer from the sunny shores of Scotland. If you know Scotland (or the UK at all for that matter) you'll know that that was most definitely a joke and that although I am certainly from the shores (Aberdeen to be exact) there has been any sun sighted in Scotland since 1902 (and even then it may have been a weather balloon).
I've been spending some time looking into the possibility of contributing to the development of a hacking based emulator and GensKMod looks to make the most sense as a starting point.
You can see my thought process here RHDN Topic but basically it comes down to Kega and Mame/Mess are more accuracy focused, Regen and Exodus didn't have anything in the feature list that jumped out at me (granted I still actually have to use them to see what they are really like) and they are closed source. GensKMod looks more hacker based, especially when factoring in Gens Hacking Version and Gens Tracer as well.
Would this be a fair assessment?
I'm not certain I can actually be of any help yet, just now everything is ground work and research, and I haven't even got my environment set up. Any gotchas I need to watch out for beyond what is documented in this thread?
And finally I'll get my little gush out of the way: Thanks for all the work on GensKMod and all the docs Kaneda, they've came in really handy over the years. </gushing>
Last edited by ryanfaescotland on Fri Feb 13, 2015 9:21 pm, edited 1 time in total.
-
- Very interested
- Posts: 3131
- Joined: Thu Nov 30, 2006 9:46 pm
- Location: France - Sevres
- Contact:
In my last attempt to put GensKMod and GDB working together i had some troubles with GDB commands. Breakpoints were not always taken and sometime at the wrong location... to a point it was not really usable. The thing is that i do not know if the problem come from code::block, the GDB version i am using or GensKMod itself. I upgraded to Code::Blocks 12 but without success...
I guess i have to give another try
By the way Kaneda, which IDE and which version of GDB are you using ?
Ah yeah, i always forgot to specify that one: there is a very annoying issue with the output message console. You limit the maximum of character so after sometime you don't see any new messages i it. It would be very nice to allow more characters (or set it as a parameter)
I guess i have to give another try
By the way Kaneda, which IDE and which version of GDB are you using ?
Ah yeah, i always forgot to specify that one: there is a very annoying issue with the output message console. You limit the maximum of character so after sometime you don't see any new messages i it. It would be very nice to allow more characters (or set it as a parameter)