Code Warrior for Dreamcast

If you have any questions on programming, this is the place to ask them, whether you're a newbie or an experienced programmer. Discussion on programming in general is also welcome. We will help you with programming homework, but we will not do your work for you! Any porting requests must be made in Developmental Ideas.
rbenchley
DCEmu Freak
DCEmu Freak
Posts: 59
https://www.artistsworkshop.eu/meble-kuchenne-na-wymiar-warszawa-gdzie-zamowic/
Joined: Sun Nov 16, 2003 1:59 am
Location: Madison, WI
Has thanked: 0
Been thanked: 0
Contact:

Code Warrior for Dreamcast

Post by rbenchley »

Has anyone here ever had the chance to use Code Warior for Dreamcast? As a long time Mac user, I know that Code Warrior was pretty impressive, and that programs compiled in Code Warrior were faster and more responsive than programs compiled with other compilers. Do you think there could be a performance bonus by using Code Warrior to code the emulators and homebrews? I know that there is a significant difference in performance between Intel's compilers and GCC.
Honesty may be the best policy, but it's important to remember that apparently, by elimination, dishonesty is the second-best policy.
-George Carlin
User avatar
nobody in particular
DCEmu Freak
DCEmu Freak
Posts: 64
Joined: Tue Jul 01, 2003 3:48 pm
Location: Clemson, SC
Has thanked: 0
Been thanked: 0

Post by nobody in particular »

I've gathered that you had to have been a licensed Sega developer to get the Dreamcast version of Codewarrior (it came with the Katana developer kit). They show up on eBay on occasion, though they usually end up becoming too expensive to be worth buying.

That issue aside, I don't doubt that executables generated with Codewarrior would be of better quality than those generated in GCC, though it doesn't really matter since most of us can't use it anyway.
doragasu
DCEmu Cool Poster
DCEmu Cool Poster
Posts: 1048
Joined: Thu May 16, 2002 5:01 pm
Location: Madrid, Spain
Has thanked: 0
Been thanked: 0

Post by doragasu »

I've only used it for Symbian, and really works great. I didn't know there's a DC versi?n.
Ian Micheal
Soul Sold for DCEmu
Soul Sold for DCEmu
Posts: 4865
Joined: Fri Jul 11, 2003 9:56 pm
Has thanked: 2 times
Been thanked: 4 times

Post by Ian Micheal »

Yup it also works very well. Using the Hitach compiler katana also uses GCC as well.
Dreamcast forever!!!
ETR
Dumb
Posts: 1998
Joined: Mon Dec 08, 2003 8:36 pm
Location: Because My Heart is in O-H-I-OOOO
Has thanked: 0
Been thanked: 0
Contact:

Post by ETR »

Nifty. I was under the assumption that the DevKit environment was built on CW, not just included it.
Image
Smiley wrote:I was bored and like to hear myself talk, that's all....
rusty
DCEmu Fast Newbie
DCEmu Fast Newbie
Posts: 17
Joined: Wed Feb 04, 2004 6:31 am
Has thanked: 0
Been thanked: 0

Post by rusty »

I remember using Codewarrior for the Dreamcast for about 8 months a few years ago. It all worked fine until we had unexplainable crashes in our game. It turned out the compiler was generating the wrong code.

We were told by Metrowerks and Sega that there wouldn't be an update for the Dreamcast version of Codwarrior because the SDK was no longer going to be updated (we were using the last SDK disk from sega...Release 10.3 I think it was).

So we resorted to using the GCC compiler on the CD, which worked just fine..and produced better code too. It's funny how history repeats itself...Codewarrior for the PS2 has exactly the same problems....
Ian Micheal
Soul Sold for DCEmu
Soul Sold for DCEmu
Posts: 4865
Joined: Fri Jul 11, 2003 9:56 pm
Has thanked: 2 times
Been thanked: 4 times

Post by Ian Micheal »

rusty wrote:I remember using Codewarrior for the Dreamcast for about 8 months a few years ago. It all worked fine until we had unexplainable crashes in our game. It turned out the compiler was generating the wrong code.

We were told by Metrowerks and Sega that there wouldn't be an update for the Dreamcast version of Codwarrior because the SDK was no longer going to be updated (we were using the last SDK disk from sega...Release 10.3 I think it was).

So we resorted to using the GCC compiler on the CD, which worked just fine..and produced better code too. It's funny how history repeats itself...Codewarrior for the PS2 has exactly the same problems....
Intresting Gcc compiler included with the katana kit. It's a little changed to the one we use now. It had a few bug fix's we donr gcc we use does not really make good code optimzed wize at all for the sh4 chip.

What game were you working on at the time sounds intresting to here from a real sega developer.
Dreamcast forever!!!
Phantom
DC Developer
DC Developer
Posts: 1753
Joined: Thu Jan 16, 2003 4:01 am
Location: The Netherlands
Has thanked: 0
Been thanked: 0
Contact:

Post by Phantom »

Ian Micheal wrote:Intresting Gcc compiler included with the katana kit. It's a little changed to the one we use now.
I'd really like to see that modified version of GCC. Does anyone here have the Katana kit? I know that some people have bought a GD-Writer from eBay, did that come with the software as well? GCC is GPL'ed so we'd be free to use any modified version of GCC as well, if we can find it.

EDIT: Can anyone confirm that the GCC compiler that's part of Katana is the one known as 'GNUpro'? I don't think the GCC compiler that's part of GNUpro contains performance improvements over the regular GCC.
Last edited by Phantom on Thu Feb 05, 2004 12:34 pm, edited 1 time in total.
rusty
DCEmu Fast Newbie
DCEmu Fast Newbie
Posts: 17
Joined: Wed Feb 04, 2004 6:31 am
Has thanked: 0
Been thanked: 0

Post by rusty »

Ian Micheal wrote:
rusty wrote:I remember using Codewarrior for the Dreamcast for about 8 months a few years ago. It all worked fine until we had unexplainable crashes in our game. It turned out the compiler was generating the wrong code.

We were told by Metrowerks and Sega that there wouldn't be an update for the Dreamcast version of Codwarrior because the SDK was no longer going to be updated (we were using the last SDK disk from sega...Release 10.3 I think it was).

So we resorted to using the GCC compiler on the CD, which worked just fine..and produced better code too. It's funny how history repeats itself...Codewarrior for the PS2 has exactly the same problems....
Intresting Gcc compiler included with the katana kit. It's a little changed to the one we use now. It had a few bug fix's we donr gcc we use does not really make good code optimzed wize at all for the sh4 chip.

What game were you working on at the time sounds intresting to here from a real sega developer.
GCC was fine when it came to compiling plain vanilla C, but not C++. Atleast it gave use correct code ;)


I have to (embarasingly) admit that it wasn't the greatest game in the world that I was working on. I helped out on the DC conversion of the game for Chicken Run after working on tools and while heading up the PC conversion.

I don't know how much folks in the DC scene know about when it comes to what tools we used to use. We were given very little info about the actual hardware of the DC...the simple fact is, I've learned more about the Dreamcast hardware in the last few days than I did when working with the dammed thing for a living!!

I remember asking the dev-support at Sega if it were possible to get any info on the pvr internals etc. Their reply was "you've got Kamui (NEC's low-level driver for the PVR II /CRX) why do you want to know about the hardware?"

Which was fair enough. All of the music streaming, sound stuff was actually handled by middleware provided on the Dreamcast SDK disc. Which wasn't that bad to be honest...I had music streaming and playing in the space of a day because of it.

So Dreamcast coders rarely got to grips with the actual hardware. We were stuck using the Shinobi SDK with it's various sub-sdk's (Kamui and Ninja) and the middleware stuff for music and sound.

I think part of this was because NEC don't like peeople learning too much about the gfx hardware that they produce. If you look on thier developer website, they'll only ever let you use SDK's and never release any actual hardware info.

But I'm wandering well off-topic here... :p
ragnarok2040
DC Developer
DC Developer
Posts: 462
Joined: Wed Oct 17, 2001 7:44 pm
Has thanked: 0
Been thanked: 0

Post by ragnarok2040 »

I think http://www.kpitgnutools.com maintains the Renesas (formerly Hitachi) sh compiler, and they release the source/binaries for free. I downloaded the binaries, but couldn't get them to work the same way as regular GCC, they didn't like the KOS environment variables at all. They've just had a v401 release though that I haven't tried yet, plus I haven't tried compiling from source, which is what I should have done in order to get just a plain sh4 compiler. They also provide an IDE for the tools too, which is new.
Phantom
DC Developer
DC Developer
Posts: 1753
Joined: Thu Jan 16, 2003 4:01 am
Location: The Netherlands
Has thanked: 0
Been thanked: 0
Contact:

Post by Phantom »

ragnarok2040 wrote:I think http://www.kpitgnutools.com maintains the Renesas (formerly Hitachi) sh compiler, and they release the source/binaries for free.
Their site lists both GNU tools and Renesas tools. I don't have a login at that site (yet), so I can't really tell what can be downloaded from there. I assume that if they have the official Renesas tools up for download that they will be demo versions.
ragnarok2040
DC Developer
DC Developer
Posts: 462
Joined: Wed Oct 17, 2001 7:44 pm
Has thanked: 0
Been thanked: 0

Post by ragnarok2040 »

Nah, they're full versions, I have an account there. They even have full documentation on compiling options and stuff with the binaries, probably with the source too. You also get, with your account, free assistance from KPIT if you have any problems with them. They also have a searchable bug tracker. They have sources for GCC/Binutils/Newlib, as well as precompiled binaries of the SH and H8 toolchains, both elf and coff targets. Also, the precompiled binary of the SH tools seems to be able to compile from the sh1 to sh4 targets, along with a whole mess of options that I don't pretend to understand, heh.
Phantom
DC Developer
DC Developer
Posts: 1753
Joined: Thu Jan 16, 2003 4:01 am
Location: The Netherlands
Has thanked: 0
Been thanked: 0
Contact:

Post by Phantom »

Sounds interesting. I'll definitely check it out when (if?) they provide me with an account.
"Nothing works" - Catweazle
ragnarok2040
DC Developer
DC Developer
Posts: 462
Joined: Wed Oct 17, 2001 7:44 pm
Has thanked: 0
Been thanked: 0

Post by ragnarok2040 »

They should provide you with one, they seem pretty nice. They just asked me what platform I was compiling for, and a few other questions, and they gave me one.

I need to get the new version of the IDE, though, if only the site would load. I didn't understand how to add external libraries to it before, but after working with Dev-Cpp so much, I'm pretty sure I can figure it out now, heh. It'd be nice to get it to work, since it has like a built-in debugger and various other nifty things, like simulators O_O.
BlackAura
DC Developer
DC Developer
Posts: 9951
Joined: Sun Dec 30, 2001 9:02 am
Has thanked: 0
Been thanked: 1 time

Post by BlackAura »

rusty - It seems, to some degree, that we have better tools than you did then. GCC produces (basically) correct code from C++ source, and we're only missing the C++ runtime, although I think that's been (partially) added to the newest versions of KOS.

ragnarok2040 - Sounds useful. I shall have to investigate.
Phantom
DC Developer
DC Developer
Posts: 1753
Joined: Thu Jan 16, 2003 4:01 am
Location: The Netherlands
Has thanked: 0
Been thanked: 0
Contact:

Post by Phantom »

I had a look at the software available from the KPIT website.

KPIT GNU Tools: these contain the same bugs as the stock GNU Tools and they don't appear to be faster. There seems to be little point in using them.

Renesas HEW3ntc: It's windows-only and the Renesas compiler is not included. Still, this might have some useful tools for Windows users. This software is also downloadable from the Renesas website.
Ian Micheal
Soul Sold for DCEmu
Soul Sold for DCEmu
Posts: 4865
Joined: Fri Jul 11, 2003 9:56 pm
Has thanked: 2 times
Been thanked: 4 times

Post by Ian Micheal »

Phantom wrote:
Ian Micheal wrote:Intresting Gcc compiler included with the katana kit. It's a little changed to the one we use now.
I'd really like to see that modified version of GCC. Does anyone here have the Katana kit? I know that some people have bought a GD-Writer from eBay, did that come with the software as well? GCC is GPL'ed so we'd be free to use any modified version of GCC as well, if we can find it.

EDIT: Can anyone confirm that the GCC compiler that's part of Katana is the one known as 'GNUpro'? I don't think the GCC compiler that's part of GNUpro contains performance improvements over the regular GCC.

I have it GNU tools is what there calling it but also there saying this

Source code for the Sega version of the GNU tools may be obtained by contacting
Sega Developer Technical Support

It's not set up the same Ive tryed to get it to work with kos a few times.
the directory is called GNU Nothing much more on it other then that.

It's not the same as the normal Gcc compiler as it states it's a sega version modifyed and you can get updates by calling a number or website both are dead now so there no point posting them.


whole thing Gnu compiler directory rar/ed is 17.9 MB (18,781,994 bytes)

Over 100 unpacked.
Dreamcast forever!!!
ragnarok2040
DC Developer
DC Developer
Posts: 462
Joined: Wed Oct 17, 2001 7:44 pm
Has thanked: 0
Been thanked: 0

Post by ragnarok2040 »

Oh well, I can still use the sh simulator which comes with hew. Maybe they'll release an updated version since that one problem was fixed.
MindChild
DCEmu Junior
DCEmu Junior
Posts: 47
Joined: Mon Mar 03, 2003 11:36 am
Location: Somewhere
Has thanked: 0
Been thanked: 0
Contact:

Why?

Post by MindChild »

You know... I am absolutely tired of people saying garbage like "Why use it? Its illegal". Yeah. So its illegal for me to distribute what I make. WHO CARES?!

Believe it or not, some people program for self gratification. To say they did something... to have fun. NOT to become super 31337 DC hax0r programmer . Its NICE to use professional tools. Its NICE to not have to keep screwing with home brewn libraries and unix-in-a-sandbox environments. And it is especially nice to have some source level debugging. And I can STILL show my friuts to whoever I want.
Ian Micheal
Soul Sold for DCEmu
Soul Sold for DCEmu
Posts: 4865
Joined: Fri Jul 11, 2003 9:56 pm
Has thanked: 2 times
Been thanked: 4 times

Post by Ian Micheal »

Yeah sure Mindchild But you will not get any support when you need it. Which is why i dont bother to much sure Ive ported some thing using wince I use them Why should i even share them I did it for me. So Yeah it is nice and i have fun with it. But posting it on this site gets you nothing.


Just say i had fullspeed psx emulator using katana if i posted it would any one care.

I dont so dont ask for it.

But you have to fit in when you in a scene unless you are so good you never need help. then you dont need to post in a programing forum in the first place.

Kos is easyer to use then both wince and katana. There's not much change but speed.
Dreamcast forever!!!
Post Reply