Page 1 of 1

C - Beginning on it

Posted: Sun Nov 13, 2016 7:48 pm
by CrazyMonkey
Hello. I have been working for some years on the Sega Genesis, CD and even the Neo Geo AES, all through direct assembly code. I'm used to having all control over my ROM, and keep it the most clean and relieved as possible on the hardware-level, doesn't matter if I need to use internal hacks to achieve this goal. However, in the modern computing world, all ruled by the monetary interest, I'm think I'm going to get required to increase the language level, at least a bit. C on the Genesis is a brilliant idea!, why not to begin on a system I'm familiar with?

I have some previous knowledge with C, I think I got the "pillar" stuff before deciding to quit college, and I can do a bit of everything, however I still feel the need to be under complete control over (and know) what am I doing, I don't really mind how "unoptimized" it happen to get, as long as I can understand every bit.

Now, to what I seen so far, some Gen compilers are be best than others, so I'd like to know, what is the best I can use?, what is the "best" or "personally recommended" support I can use (I'd try to understand the reasoning behind)?

And, could I easily port whatever routines I have written before in 68k ASM? Convert C code to an ASM file? And get a final "listing" file where I could read the assembly on each address to easily read? xP
Thanks for your time

Re: C - Beginning on it

Posted: Sun Nov 13, 2016 8:11 pm
by Hik
I think SGDK is pretty good. You can do inline assembly while using it. I don't have much experience with assembly yet ,
and I have much to work on with code optimization but I'm getting better with C bit by bit and have some good material
on the subject. Also ,I'm fairly active right now. I've mostly been posting in the SGDK forum section ,the search really
helps with getting into it. It has been updated so its easier to work with. Its a bit lacking in tutorials but I made do with
the ones they keep saying are outdated. A lot of the questions asked in the forum have already been covered.

Re: C - Beginning on it

Posted: Sun Nov 13, 2016 10:06 pm
by Stef
I think you should definitely give a try to SGDK ;) it embed a GCC compiler ready to use and a library with many advanced features. And of course you can mix it with ASM code :

Re: C - Beginning on it

Posted: Mon Nov 14, 2016 1:20 am
by djcouchycouch
I wholeheartedly endorse Stef's SGDK!

Re: C - Beginning on it

Posted: Mon Nov 14, 2016 9:52 am
by cero
It's not even a competition. SGDK allows you to use GCC, while the other options were absolutely terrible, hobbyist-made compilers.

Since you're not familiar with C, gcc is the GNU compiler, the main one used in Linux. It's excellent quality, and you can use the latest C (and even C++) features if you wish. Essentially the best Free compiler available for any system (clang is getting closer on x86 and arm, but it doesn't have m68k support at all IIRC).

If you need to practice, the asm features etc, install Ubuntu in a VM or a spare computer. Easier on a native system vs a cross-compiled one when learning.

Re: C - Beginning on it

Posted: Mon Nov 14, 2016 10:48 pm
by CrazyMonkey
So I have begun with Stef's SGDK!, and what a trip it has been.

Oh don't worry, I knew about GNU's gcc and all the rest, I had it already on my other partition running Ubuntu v14.04.1 LTS :P. Everything is actually quite clean, and I can't be any more impressed with all packed features!! And I mean seriously, from what I'm reading within the documentation, writing a ROM with fancy effects seem really easy now, more so if I'm allowed to do HBlank handlers in ASM the way I'm used to. And I want to thank Stef so much for this!!

Re: C - Beginning on it

Posted: Tue Nov 15, 2016 10:34 am
by Stef
Ho thanks for the very kind comment about SGDK ! I didn't expected that and i'm really glad that you appreciate it that much :)
If you need assistance about SGDK you can search and post inside SGDK sub forum (many topics has already been discussed).