Page 11 of 57
Posted: Fri Feb 20, 2009 8:51 am
by ob1
KanedaFr wrote:no, I don't mean I want the Spritesmind logo !
Yet, that would make sense.
Why not Stef' URL ?
Posted: Fri Feb 20, 2009 9:57 am
by Chilly Willy
KanedaFr wrote:Chilly Willy wrote:I made a makefile for the functions, and made a library out of it. That makes it much easier to handle.
COOOOL!! I was about to make it
I just need to confirm something...I know it could be some kind of newbie question, but I never worked with my own lib :
with a lib, will the linker include ONLY used functions or the full lib ?
Linkers have for quite some time only included those functions of a lib that are used. This DOES make link order an issue - link in the wrong order and it won't know if a function is needed or not. In that case, it includes nothing and you get a link error stating functions could not be found. In this case, it's really not much of an issue: the "startup" object file goes first (I hope you noticed that... it was the only part of the kit that didn't go in the library), then all the program object files, then the library, then libm (if you use it) then libc (if you use it), then libgcc. If you looked at the particle example, it's just the start object, the program objects, the lib, and libgcc, in that order.
A well organized toolchain and libraries really help make a program simple to maintain.
If you look at my makefiles, you'll see how I organized my toolchain:
gendev - the root directory, it is in /usr/local in my system.
gendev/bin - hold things like the zasm (z80 assembler), asmx (the 68000 assembler), and bin2c. This is where executables go that aren't part of gcc.
gendev/m68k - this is the 68000 gcc toolchain. I use gcc 4.1.1 from uclinux for the 680x0, specifically the 68000 libraries.
gendev/m68k/sdk - this is where the devkit includes, start object, and library was put.
gendev/sh2 - this is the SH2 gcc toolchain. I use gcc 4.3.2 from KPIT (their 903 release).
By the way, if Windows folks are looking for an update in gcc for the m68k, try the ronetix toolchain. It's gcc 4.1.1 for the m68k, although they maintain it more specifically for use with ColdFire systems.
http://download.ronetix.info/toolchains/coldfire/
Posted: Wed Nov 25, 2009 4:18 am
by PgFr
hi, it would be possible to get a description of the genesis fonctions library on readme or pdf file ..??
Posted: Mon Jan 25, 2010 12:52 pm
by Alex Khan
The images are missing from Stefs Dev Kit !
Anywhere I can get a visual image of the installation procedure?
Posted: Mon Jan 25, 2010 12:54 pm
by Alex Khan
The images are missing from Stefs Dev Kit !
Anywhere I can get a visual image of the installation procedure?
Posted: Mon Jan 25, 2010 5:32 pm
by bastien
in my Website
Posted: Thu Jun 03, 2010 5:46 pm
by Shiru
New problem I've got with compiler from the devkit.
game.c:(.text+0x61c): undefined reference to `memcpy'
This appeared in linked errors after I've added const char string into a function. Strange thing that I also have an array of const strings in the same code, and it compiles and works fine.
Code looks like this:
Code: Select all
void f(void)
{
const char *strarr[]={"bla","bla","bla"}; //this is fine
const char str[]="blablabla"; //adding this causes the error
}
I've avoided the problem by declaring the sting as array with one string, however it would be nice to know how to make it work correctly.
Posted: Thu Jun 03, 2010 7:44 pm
by TascoDLX
Make it static.
Code: Select all
static const char str[]="blablabla";
*or*
If you want to do non-const stuff, write your own memcpy function (or steal one).
Posted: Thu Jun 03, 2010 8:05 pm
by Shiru
Ok, static helps, but why array of strings works without declaring it static? What's the difference?
Posted: Fri Jun 04, 2010 8:19 am
by Stef
Shiru wrote:Ok, static helps, but why array of strings works without declaring it static? What's the difference?
The compiler seems to not use the same method internally, anyway interesting enough i guess i can fix that by adding a memcpy function with libc prototype

Posted: Wed Nov 24, 2010 11:34 pm
by Stef
Edit : I updated the library to 0.6d, it's still a WIP with some uncomplete stuff.
Many changes, many refactoring, you can grab the last version here :
http://code.google.com/p/sgdk/
I plan to add tutorials and documentation later on the Google Code project.
I am new to the genesis (je debute)
Posted: Wed Dec 08, 2010 10:43 am
by Vincent
Bonjour Stephane,
Congratz pour ton devkit. I am looking forward for the documentation, tutorials and small samples.
Vincent
Re: I am new to the genesis (je debute)
Posted: Wed Dec 08, 2010 12:25 pm
by Stef
Vincent wrote:Bonjour Stephane,
Congratz pour ton devkit. I am looking forward for the documentation, tutorials and small samples.
Vincent
Thanks

Yeak i know tutorial and documentation are really missing, i hope to have time to add them soon =)
Posted: Wed Dec 08, 2010 2:41 pm
by Vincent
Right now I am stuck. A get started, even a minimalist one, would be strongly appreciated (with a minimalist makefile too).
Regards, Vincent.
Posted: Wed Dec 08, 2010 2:47 pm
by Stef
Vincent wrote:Right now I am stuck. A get started, even a minimalist one, would be strongly appreciated (with a minimalist makefile too).
Regards, Vincent.
I replied to your MP
