Wednesday, March 7, 2012

More MegaDrive MegaFun

Last post was my notes for the build-your-own-Sega-Genesis-gcc-cross-compiler. Alternative is a pre-built kit if you are running on Windows. This one is actually much more than just the toolchain, as it is a library built around an SDK which has been in the works for a while.

Even though the sgdk is hosted in Windows, it is way easier to work with in Cygwin because the whole DOS environment is such an unwieldy piece of crap.

Now,  after unzipping the download, run the following commands in your Cygwin shell:

export PATH=$PATH:/cygdrive/d/mYJUNK/sgdk/bin
cd /cygdrive/d/mYJUNK/sgdk/sample/cube_flat
make GDK="d:/mYJUNK/sgdk" -f ../../makefile.gen

The GDK environment variable will be propagated into the makefile. Note that it uses the DOS letter, but Unix-style forward slashes.

One clever thing about this is how he used make wild-carding to use the same makefile for all the examples.

Now, go get Quest for Money and compile it. This is a very nice game with beautiful graphics and sound layers, with all the source code included and detailed descriptions of how it was developed. Thanks to Shiru for promptly answering my questions!

No comments:

Post a Comment