Page 4 of 52

Posted: Wed Aug 29, 2007 1:41 pm
by TulioAdriano
Visual Studio 2005? :shock:

That VERY MUCH interests me! :D :D :D 8)

Posted: Mon Sep 03, 2007 6:12 am
by cdoty
ElBarto wrote:Sweet.
I've started a template for visual studio 2005, will post it when it's finish.
Will it work on the Express version?

If so, may sure your keep it out of view from Microsoft, or you might get a cease-and-desist letter.

Posted: Mon Sep 03, 2007 1:48 pm
by ElBarto
I don't know, first I've have to find the lost template :D, it's somewhere in one of my hard drive.
And I don't understand why do you say that ? It's just a project template, everybody can make a template and there is a documentation on msdn for doing that.

Posted: Wed Oct 24, 2007 9:42 am
by KanedaFr
I need rm on the bin folder...which one should I add ? which gcc version ? I actually used mingw MSYS one ?
and a shell ...

Posted: Wed Oct 24, 2007 1:03 pm
by ElBarto
The one from MSYS is fine.

Posted: Fri Oct 26, 2007 11:33 am
by KanedaFr
I take the liberty to mod this post as an annoucement, so it will be easier to find it and new users will see it too...

do you think I must move it on "Tools"?

Posted: Sat Oct 27, 2007 8:18 pm
by Stef
KanedaFr wrote:I take the liberty to mod this post as an annoucement, so it will be easier to find it and new users will see it too...

do you think I must move it on "Tools"?
Good idea ;)
I always go in the "Tools" section when i'm searching for this topic, i think it's definitly where we should find it (i know, i created the topic, i'm the only to fault :p)

Posted: Thu Dec 13, 2007 10:46 am
by Shiru
This question not relates to devkit itself, but to GCC which this devkit uses.

I moved my project from SGCC to GCC from devkit. Because I already have many code which works with hardware directly, I don't need devkit code itself, so I removed it. I made new makefile.gen without including any libs and with new sega.s (only one change - directly call 'main' instead of 'start'). I changed variables types to correct ones, add volatile keyword to pointers, etc.

Now I have big problem. Project don't work. Base code works. Graphics loading, palette functions, vsync wait, input works. Both music and sound effects players works. But other code does not work.

I noticed that it because code hangs almost anywhere where % operation used, though in some places it works OK (always hangs in one place and not hangs in another, i.e. problem is stable). It hangs on lines like these (variables usually 'unsigned short' and 'short'):

x=(x+1)%40;
ptr=(ptr+1)%mwdt;

Is there something which I don't know about this operation in this compiler? (I often use such operations with many compilers and never had any problems) Or I broke something when remove unneeded devkit code? Or maybe it bug?

Posted: Thu Dec 13, 2007 11:03 am
by KanedaFr

Code: Select all

x=(x+1)%40; 
ptr=(ptr+1)%mwdt; 
does it mean code hangs where you try do define a var to itself modulo something ?

could you test if this work :

Code: Select all

x=((x+1)%40); 
ptr=((ptr+1)%mwdt);
at least, I assume this works :

Code: Select all

x++;
x%=40; 

ptr++
ptr%=mwdt;

Posted: Thu Dec 13, 2007 11:14 am
by Shiru
KanedaFr wrote:could you test if this work :

Code: Select all

x=((x+1)%40); 
ptr=((ptr+1)%mwdt);
Not works.
KanedaFr wrote:at least, I assume this works :

Code: Select all

x++;
x%=40; 
ptr++
ptr%=mwdt;
This works. But.. I also noticed one place where code hangs on:

Code: Select all

ssy=sy%mhgt;
I.e., where result goes not same variable. In this case code like:

Code: Select all

ssy=sy;
ssy%=mhgt;
..does not helps.

Posted: Thu Dec 13, 2007 12:38 pm
by Chilly Willy
I use gcc 4.1.1 for my Genesis compiler and it works fine... as long as you remember to copy the correct libgcc.a file into the libs directory. You need the 68000 version, and the one in that dir by default was 680x0 (020+) version.

The ld file also needed some changes. There's a thread on setting up code::blocks with the devkit where I replied on the changes I did to get it working with gcc 4.

Posted: Thu Dec 13, 2007 6:01 pm
by Stef
Shiru wrote:
KanedaFr wrote:could you test if this work :

Code: Select all

x=((x+1)%40); 
ptr=((ptr+1)%mwdt);
Not works.
KanedaFr wrote:at least, I assume this works :

Code: Select all

x++;
x%=40; 
ptr++
ptr%=mwdt;
This works. But.. I also noticed one place where code hangs on:

Code: Select all

ssy=sy%mhgt;
I.e., where result goes not same variable. In this case code like:

Code: Select all

ssy=sy;
ssy%=mhgt;
..does not helps.
It can sound stupid but are you not simply doing division by 0 exception (%0) ?
If not, do you checked the i_ldiv function in sega.s file ? as you don't have the base library you need manual implementation of 32 bits multiplication and division for GCC. Maybe the division code (used by modulo function) is buggy but i'm surprised as i never meet any problems. Did you modified it ?

Posted: Sat Dec 15, 2007 4:14 pm
by Shiru
Stef wrote:It can sound stupid but are you not simply doing division by 0 exception (%0) ?
This was first that I check. Of course not, especially in case %40 in code above.
Stef wrote:If not, do you checked the i_ldiv function in sega.s file ? as you don't have the base library you need manual implementation of 32 bits multiplication and division for GCC. Maybe the division code (used by modulo function) is buggy but i'm surprised as i never meet any problems. Did you modified it ?
I use sega.s from devkit with only one modification - I replaced jump to 'start' to direct jump to 'main' (only one line).

Posted: Wed Mar 05, 2008 11:31 pm
by Stef
Shiru wrote:
Stef wrote:It can sound stupid but are you not simply doing division by 0 exception (%0) ?
This was first that I check. Of course not, especially in case %40 in code above.
Stef wrote:If not, do you checked the i_ldiv function in sega.s file ? as you don't have the base library you need manual implementation of 32 bits multiplication and division for GCC. Maybe the division code (used by modulo function) is buggy but i'm surprised as i never meet any problems. Did you modified it ?
I use sega.s from devkit with only one modification - I replaced jump to 'start' to direct jump to 'main' (only one line).
I realised i never replied your last post.
I think the 32 bits modulo operation is buggy, i guess you're doing it on 32 bits sized variable ? I rarely use modulo but i never meet any problem with division. I'll check the 32 bits modulo code in sega.s file, maybe a stupid bug.

Posted: Sun Mar 09, 2008 12:44 am
by KanedaFr
Hi all,

I finally added a tutorial to use Eclipse CDT with Genesis Dev Kit

Check it out and see if it could suit your need...IF Code::Blocks doesn't suit you !