Making Games For The Dreamcast Using Standard GNU Tools
Disclaimer: Please be aware that all information is provided as-is, and may be used at your own risk. "Sega" and "Dreamcast" are trademarks of Sega Enterprises. All information here has derived from my own experience. Nothing in this document is under any type of NDA nor does it include any information from the official dreamcast development kit.
Dreamcast hacking, or tinkering as you might call it, has exploded all over the game console homebrew scene over the past few months. In reality console programming is not really that new. But most people like myself never really took part in it because it was very difficult and expensive to get started. But now the Dreamcast provides us with a relatively simple interface to get our feet wet in console programming. No more ASM-only coding or non-existant FREE libraries. We now have an easy way to program our Dreamcasts thanks to the hard work done by some very talented coders like Dan Potter, Marcus Comstedt, Hitmen and many others.
What you need to do before we start
This is just a simply guide to get you started in DC programming it is by no means complete.
The goal of this series is to get experienced game programmers into DC coding. Thus it is missing all those nice hand-holding beginnerís steps.
Here is a list of the hardware and software you will need in order to get started developing for your Dreamcast.
Putting Everything Together
Iím not going to kid you, setting up all this stuff can be a long process if youíve never done anything like this before. So you better plan on spending at least a day working on it. Also choose your OS carefully. Cygwin under Win32 works fine but using Linux has so many other advantages. I would recommend that if you do have Linux experience then go with Linux, otherwise use Windows. Make sure you follow all the steps outlined on the above sites for creating the necessary tools e.g. Serial Cable, GCC-Cross Compiler, Serial Slave CD cross-compiler.
Compiling Our First Program
Once everything is setup, you can test it by compiling the Stars demo from Dan Potterís site.
Note: You will have to edit the Makefile to fit your system
Note: If you are using the uploader.py script you must keep Minicom open
Try typing make run from the console in the current directory of the demo program. This will test whether you have built your cross-complier correctly and that your system is producing SH-4 executable files in little endian format. make run will also attempt to upload your srec to the Dreamcast only if you have installed uploader.py from Danís site.
Try typing make srec from the console in the current directory of the demo program. This will test whether you have built your cross-complier correctly and that your system is producing SH-4 executable files in little endian format. Now you will have to use a Windows load utility to upload your srec file to your Dreamcast. DC Uploader 2.01 works great for this.
After the uploading is done you should see the stars demo on the screen.
Congratulations!!!! Youíre now ready to create your own real homebrew Dreamcast programs. The next part in this series will talk about using Libdream and KOS for drawing graphics on the screen.
First you should visit www.julesdcdev.com. This is a GREAT portal site with lots of resources to get you started in DC programming. Also try http://newbie.julesdcdev.com. Also, I would advise anyone that is interested in DC programming to join the dcdev mailing list: email@example.com