You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Stephane Dallongeville 7fb61237b0 added LOG_LEVEL setting in config.h file 2 days ago
bin Fixed a small regression on LZ4W compression after last optimization 2 weeks ago
doc updated doc to last SGDK version 5 months ago
inc added LOG_LEVEL setting in config.h file 2 days ago
lib updated to last version 2 months ago
res minor change to XGM_STOP resource 9 months ago
sample Added some logs and added some MEM_pack() to help with memory allocation (bitmap engine) 2 months ago
src added LOG_LEVEL setting in config.h file 2 days ago
tools Fixed a small regression on LZ4W compression after last optimization 2 weeks ago
vstudio not needed anymore 1 year ago
.gitignore Replaced appack / apultra by APJ tool (java version of aplib packer) 1 month ago
COPYING.RUNTIME License update 1 year ago
build_adv.bat rename build.bat --> build_adv.bat 3 years ago
build_lib.bat fixed debug build #2 3 years ago
changelog.txt added version 1.51 changelog 6 months ago
license.txt License update 1 year ago
makefile.gen Fixed sources sub folder support and added a second depth of recursion (should be enough) 1 month ago
makelib.gen fixed typo for resource compilation (wrong copy/paste) 2 months ago
md.ld changed section order / names 9 months ago
readme.txt updated doc link 3 months ago


SGDK 1.51 (april 2020)

Copyright 2020 Stephane Dallongeville

SGDK is a free development kit allowing to develop software in C language for the Sega Mega Drive.
It contains the development library itself (with the code sources) and some custom tools used to compile resources.
SGDK uses the GCC compiler (m68k-elf target) and the libgcc to generate ROM image. Binaries (GCC 6.3) are provided for Windows OS for convenience but you need to install it by yourself for others operating systems.
Note that SGDK also requires Java (custom tools need it) so you need to have Java installed on your system.

SGDK library and custom tools are distributed under the MIT license (see license.txt file).
GCC compiler and libgcc are under GNU license (GPL3) and any software build from it (as the SGDK library) is under the GCC runtime library exception license (see COPYING.RUNTIME file)


First, you need to know that SGDK uses C language (assembly is also possible but not necessary) so it's highly recommended to be familiar with C programming before trying to develop with SGDK. Learning C language at same time than learning 'Sega Mega Drive' programming is definitely too difficult and you will end nowhere. It's also important to have, at least, a basic knowledge about the Sega Mega Drive hardware (specifically the video system). If that's not the case then i recommend you to read these documents:
* Mega Cat Studios Sega Mega Drive graphics guide page:
* Sik's Blog dedicated to assembly programming but explain a lot (and quite nicely) about the Sega Mega Drive hardware:
* Genesis Software Manual which contains absolutely everything you need to know about the Sega Mega Drive:

Then when you feel ready you can go further and finally install SGDK :)

You can find installation instructions and tutorials about how use SGDK on the wiki:

Also SGDK comes with a doxygen documentation (generated from .h header files) which provides complete information about SGDK structures and functions description. You can find it in the 'doc' folder: doc/html/files.html

Finally i also strongly suggest you to have a look on the available samples in the 'sample' directory of SGDK. The 'sprite' example is particularly useful as it show the basics in a small example.

You can also follow up-to-date and more complete online tutorials as this one (thanks to Ohsat for making them):
You also have the great ones from Danibus (spanish only):


If you need help or support with SGDK, you can go to the Spritesmind forum which is dedicated to Sega Mega Drive development and has a specific section for SGDK:

You can also join the SGDK Discord server to get support:


Unix/Linux users should give a try to the Gendev project from Kubilus:
It allows to quickly setup SGDK on a Unix environment.

MacOSX users also have access to SGDK with Gendev for MacOS from Sonic3D:

There is also the new and nice solution proposed by Daniel Valdivieso to use SGDK under any OS using Wine:


You can find a Visual Studio template into the 'vstudio' folder to facilate SGDK integration with VS.
To go even further you can also install the VS extension made by zerasul:


- Chilly Willy for making almost all the JOY / controller support in SGDK (and the joy test sample ^^).
- Astrofa for the starfield donut sample ;)
- LIZARDRIVE for making the new SGDK logo.
- Kubilus for the Linux port of SGDK.
- Sonic3D for the OSX port of SGDK.
- Daniel Valdivieso for the SGDK multi-OS solution using Wine.
- Vladimir Kryvian for Visual Studio support and template.
- Tusario for resource manager tools.
- clbr for various contributions.
- jgyllinsky for providing / improving build batches.
- nolddor for fixes / contributions.
- starling13 for fixes.
- davidgf for contribution (replaced appack tool by apultra which is completely open).
- Banshaku for its contribution on improving makefile and deps generation with rescomp.
- Ohsat for making nice tutorials.
- ShiningBzh / Jeremy and Kentosama for their precious help in testing.
- Vetea and Studio Vetea Discord people in general for their support and kindness.
- all those i forgot and generally all people helping by providing support, reporting bugs and supporting SGDK in any way !


SGDK is completly free but you can support it on Patreon or using the Paypal donation link.

Paypal donation link:

Thanks =) I wish you a great and happy coding time !