{"id":15034967,"url":"https://github.com/stephane-d/sgdk","last_synced_at":"2025-05-14T06:11:21.003Z","repository":{"id":28827240,"uuid":"32350744","full_name":"Stephane-D/SGDK","owner":"Stephane-D","description":"SGDK - A free and open development kit for the Sega Mega Drive","archived":false,"fork":false,"pushed_at":"2025-05-07T08:05:02.000Z","size":187711,"stargazers_count":1885,"open_issues_count":27,"forks_count":200,"subscribers_count":146,"default_branch":"master","last_synced_at":"2025-05-07T09:23:03.564Z","etag":null,"topics":["68000","assembly","c","game-development","gcc","java","m68k","m68k-assembly","m68k-elf-gcc","mega-drive","megadrive","motorola-68000","programming","retrodev","sdk","sega","sega-genesis","sega-megadrive","sgdk","sgdk-library"],"latest_commit_sha":null,"homepage":"https://www.patreon.com/SGDK","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Stephane-D.png","metadata":{"files":{"readme":"readme.md","changelog":"changelog.txt","contributing":null,"funding":".github/FUNDING.yml","license":"COPYING.RUNTIME","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"Stephane-D","patreon":"SGDK","custom":"https://paypal.me/StephaneDa"}},"created_at":"2015-03-16T20:22:13.000Z","updated_at":"2025-05-07T08:40:08.000Z","dependencies_parsed_at":"2023-02-14T19:45:42.555Z","dependency_job_id":"398c97ed-3bea-4c8d-9e29-52069e34e37e","html_url":"https://github.com/Stephane-D/SGDK","commit_stats":null,"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Stephane-D%2FSGDK","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Stephane-D%2FSGDK/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Stephane-D%2FSGDK/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Stephane-D%2FSGDK/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Stephane-D","download_url":"https://codeload.github.com/Stephane-D/SGDK/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254083370,"owners_count":22011864,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["68000","assembly","c","game-development","gcc","java","m68k","m68k-assembly","m68k-elf-gcc","mega-drive","megadrive","motorola-68000","programming","retrodev","sdk","sega","sega-genesis","sega-megadrive","sgdk","sgdk-library"],"created_at":"2024-09-24T20:27:02.200Z","updated_at":"2025-05-14T06:11:20.984Z","avatar_url":"https://github.com/Stephane-D.png","language":"C","readme":"# SGDK 2.11 (April 2025)\r\n#### Copyright 2025 Stephane Dallongeville\r\nGithub: https://github.com/Stephane-D/SGDK\u003cbr\u003e\r\nPatreon: https://www.patreon.com/SGDK\r\n\r\n**SGDK** is a free development kit allowing development of software in **C language** for the **Sega Mega Drive**.\r\nIt contains the development library itself (with the code sources) and some custom tools used to compile resources.\r\nSGDK uses the GCC compiler (m68k-elf target) and the libgcc to generate a ROM image. Binaries (GCC 13.2) are provided for Windows OS for convenience, but you need to install it by yourself for other operating systems (more infos about it in *HELP AND SUPPORT* section).\r\nNote that SGDK also requires Java (custom tools require it), so you need to have Java installed on your system.\r\n\r\nSGDK library and custom tools are distributed under the MIT license (see [license.txt](license.txt) file).\r\nGCC 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](COPYING.RUNTIME) file)\r\n \r\n## GETTING STARTED\r\n\r\nFirst, you need to know that SGDK uses the 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 as learning 'Sega Mega Drive' programming is definitely too difficult and you will end up getting nowhere. It's also important to have, at least, a basic knowledge of the Sega Mega Drive hardware (specifically the video system). \r\n\r\n### MEGA DRIVE TECHNICAL INFO REFERENCES\r\n\r\n* And-0 - Awesome Mega Drive Development references:\u003cbr\u003e\r\nhttps://github.com/And-0/awesome-megadrive\r\n* Raster Scroll - Sega Mega Drive Graphics guide:\u003cbr\u003e\r\nhttps://rasterscroll.com/mdgraphics/\r\n* Mega Cat Studios - Sega Mega Drive graphics guide:\u003cbr\u003e\r\nhttps://megacatstudios.com/blogs/retro-development/sega-genesis-mega-drive-vdp-graphics-guide-v1-2a-03-14-17\r\n* Sik's Blog dedicated to MD assembly programming but explain a lot of stuff (and in a nice way) about the Sega Mega Drive hardware:\u003cbr\u003e\r\nhttps://plutiedev.com\r\n* A nice article from Rodrigo Copetti explaining the Mega Drive architecture:\u003cbr\u003e\r\nhttps://www.copetti.org/projects/consoles/mega-drive-genesis\r\n* Genesis Software Manual which contains absolutely everything you need to know about the Sega Mega Drive:\u003cbr\u003e\r\nhttps://segaretro.org/images/a/a2/Genesis_Software_Manual.pdf\r\n\r\n### INSTALLATION AND DOCUMENTATION \r\n\r\nThen when you feel ready you can go further and finally install SGDK :)\r\n\r\nYou can find installation instructions and tutorials about how use SGDK on the wiki:\u003cbr\u003e\r\nhttps://github.com/Stephane-D/SGDK/wiki\r\n\r\nSGDK also comes with an online doxygen documentation (generated from .h header files) which provides descriptions for all SGDK structures and functions:\u003cbr\u003e\r\nhttp://stephane-d.github.io/SGDK/\r\n\r\nIt's important to know that SGDK heavily relies on _resources_ which are compiled through the _rescomp_ tool. You should read the [rescomp.txt](https://raw.githubusercontent.com/Stephane-D/SGDK/master/bin/rescomp.txt) file to understand **which kind of resources you can use and how to declare them**. Then you can look at the *'sample'* folder from SGDK and, in particular, the [sonic sample](https://github.com/Stephane-D/SGDK/tree/master/sample/game/sonic) which is a good showcase of SGDK usage in general (functions and resources).\r\n\r\n### OTHERS TUTORIALS\r\n\r\nYou can find a lot of tutorials online about SGDK but be careful, some are outdated and/or they contains errors.\u003cbr\u003e\r\nI really recommend starting from the [wiki](https://github.com/Stephane-D/SGDK/wiki) which provides the basics to start.\u003cbr\u003e\r\nThen if you need more _visual_ and complete tutorials you can give either of these a try:\u003cbr\u003e\r\nMD programming tutorials from Ohsat:\u003cbr\u003e\r\nhttps://www.ohsat.com/tutorial/mdmisc/creating-graphics-for-md/\u003cbr\u003e\r\nVery complete and visual tutorials from Danibus (spanish only):\u003cbr\u003e\r\nhttps://danibus.wordpress.com/\u003cbr\u003e\r\nYoutube tutorial series from Pigsy:\u003cbr\u003e\r\nhttps://www.youtube.com/watch?v=BnGqc5OTTY4\u0026list=PL1xqkpO_SvY2_rSwHTBIBxXMqmek--GAb\u003cbr\u003e\r\n\r\n### USEFUL TOOLS\r\n\r\nHere's a list of useful tools that will help you to create your assets:\r\n\r\n#### Pixel art / Sprite\r\n\r\n* [Asesprite](https://www.aseprite.org/)\r\n* [Graphics gale](https://graphicsgale.com/)\r\n* [Pro Motion](https://www.cosmigo.com/)\r\n* [Grafx2](http://grafx2.chez.com/)\r\n* [Palette quantizer](https://rilden.github.io/tiledpalettequant/): powerful online tool to convert your image within the Sega Mega Drive palette constraints\r\n\r\n#### Map / Level\r\n\r\n* [16Tile](https://allone-works.itch.io/16tile): SGDK specific tile map editor\r\n* [Tiled](https://www.mapeditor.org/): Tile map editor, supported by SGDK resource compiler tool\r\n* [LDTK](https://deepnight.net/tools/ldtk-2d-level-editor/): New but powerful tile map editor (support Tiled formats as well)\r\n* [Ogmo](https://ogmo-editor-3.github.io/): Another nice and simple tile map editor\r\n* [Palette merger](https://github.com/bolon667/paletteMergerForSGDK): A tool allowing to easily change tile palette index and priority\r\n\r\n#### Music / sound\r\n\r\n* [Deflemask](https://www.deflemask.com/): music tracker supporting several system as the Sega Mega Drive\r\n* [Furnace](https://github.com/tildearrow/furnace): new music tracker supporting many systems\r\n* [Wavosaur](https://www.wavosaur.com/): wave sound editor (windows only)\r\n* [Audacity](https://www.audacityteam.org/): wave sound editor (all OS)\r\n\r\n#### Alternates sound drivers\r\n\r\nSGDK sound drivers may not fit your needs so it's important to know that some alternatives exist:\r\n* [MDSDRV](https://github.com/superctr/MDSDRV): powerful sound driver support FM \u0026 PSG SFX, pitchable PCM playback...\r\n* [Echo](https://github.com/sikthehedgehog/Echo): another sound driver supporting FM \u0026 PSG SFX and working 100% on Z80 CPU.\r\n* [MiniMusic](https://github.com/sikthehedgehog/minimusic): a tiny Z80 sound driver for Mega Drive that runs entirely off Z80 RAM\r\nand doesn't access the cartridge slot.\r\n \r\n \r\n## HELP AND SUPPORT\r\n\r\nIf you need help or support with SGDK, you can join the SGDK Discord server:\u003cbr\u003e\r\nhttps://discord.gg/xmnBWQS\r\n\r\nYou can also go to the Spritesmind forum which is dedicated to Sega Mega Drive development and has a specific section for SGDK:\u003cbr\u003e\r\nhttp://gendev.spritesmind.net/forum/\r\n \r\n### LINUX / MACOSX\r\n\r\nThere are several solutions to get SGDK working on Linux, here's a list of some of them:\u003cbr\u003e\r\n\r\n* Very simple script from Vojtěch Salajka allowing you to use SGDK from Wine easily:\u003cbr\u003e\r\nhttps://github.com/Franticware/SGDK_wine\r\n\r\n* The SGDK Helper from tlsa allows you to use SGDK both from a native or a container environment:\u003cbr\u003e\r\nhttps://github.com/tlsa/sgdk-helper\r\n\r\n* Another great alternative is to use the complete _MarsDev_ environment developed by Andy Grind:\u003cbr\u003e\r\nhttps://github.com/andwn/marsdev\r\nIt supports all OSes, provides SGDK compatibility as well as 32X support, so be sure to check it out !\r\n\r\n* MacOSX users also have access to this specific solution from Sonic3D (probably a bit outdated though):\u003cbr\u003e\r\nhttps://github.com/SONIC3D/gendev-macos\r\n\r\n### DOCKER\r\n\r\nSGDK doesn't provide anymore any integrated Docker solution as the Doragasu docker solution seems better, faster and simpler to use (native linux compiler):\u003cbr\u003e\r\nhttps://gitlab.com/doragasu/docker-sgdk\r\n \r\n### VS CODE\r\n\r\nAlmost everyone now use VSCode editor and the nice extension made by zerasul called *Genesis-Code* makes SGDK integration even smoother:\u003cbr\u003e\r\nhttps://marketplace.visualstudio.com/items?itemName=zerasul.genesis-code\r\nJust install and setup it as it's detailled on the extension page ('GDK/SGDK' and 'Gens' emulator paths mainly) and you're ready to use it :)\u003cbr\u003e\r\nYou can type *Genesis* in the command palette (Ctrl+Shift+P shortcut) to see all commands supported by the extension.\u003cbr\u003e\r\nSGDK also now integrates a VSCode template located in _project/template_ folder so you can just create a copy of this folder (for instance _project/test_) and open it in VSCode to start your own project.\r\n\r\n### AWS\r\n\r\nYes you're reading correctly, thanks to Matthew Nimmo you can even now use SGDK from AWS !\u003cbr\u003e\r\nHere's the link to his blog which explain how to do that:\u003cbr\u003e\r\nhttps://community.aws/content/2hZInsYwWX8cYEAIFKquutVoYQj/how-to-build-retro-games-in-aws-using-sega-genesis-development-kit-sgdk\r\n\r\n \r\n## SUPPORT SGDK\r\n\r\nSGDK is completly free but you can support it on Patreon: https://www.patreon.com/SGDK\r\n\r\n## THANKS\r\n\r\n- Doragasu for the multi-tasking engine (based on Sik implementation), MegaWifi, flash save support, docker and others nice additions.\r\n- Sik for the multi-tasking base implementation and for all its unvaluable Plutidev Sega Mega Drive technical information source. \r\n- Chilly Willy for making almost all the JOY / controller support in SGDK (and the joy test sample ^^).\r\n- Vladikcomper for the powerful error handler capable of displaying human readable backtrace informations :)\r\n- Astrofra for the starfield donut sample and the revamped readme ;)\r\n- Gunpog for making the 'cute' SGDK logo.\r\n- Adrian Spoz for making the 'professional' SGDK logo.\r\n- Vojtěch Salajka for the script allowing to use SGDK easily from Wine (Linux/Unix but may work on OSX too).\r\n- Andy Grind for the MarsDev project allowing to use SGDK on any OS and also supporting 32X dev.\r\n- Sonic3D for the GenDev OSX port of SGDK.\r\n- Andreas Dietrich for the nice Wobbler \u0026 scaling effect samples.\r\n- werton for the numerous fixes / contributions.\r\n- clbr for various contributions.\r\n- jgyllinsky for providing / improving build batches.\r\n- nolddor for fixes / contributions.\r\n- starling13 for fixes.\r\n- davidgf for its contributions (improved assembly LTO optimization).\r\n- ShiningBzh / Jeremy and Kentosama for their precious help in testing.\r\n- all those I forgot and generally all people who contributed in any form to SGDK !\r\n\r\n## SPECIAL THANKS\r\n\r\nOf course I thank all my patreon for their continuous support but I want to dedicace a very special and warmfull thanks for generous donation from:\r\n\r\n- Bitmap Bureau (Xeno Crisis team)\r\n- Neofid Studios (Demons of Asteborg team)\r\n- Dmitry (D I)\r\n- Rajen Savjani\r\n\r\n## POWERED BY THE SGDK!\r\n\r\nThese projects are known to be based on the SGDK _(non-exhaustive list)_:\r\n\r\n![alt text](doc/img/game_tanzer.gif)\r\n \r\nTanzer by [Mega Cat Studios](https://megacatstudios.com/products/tanzer-sega-genesis)\r\n\r\n![alt text](doc/img/demo_masiaka.gif)\r\n \r\nMASIAKA by [Resistance](https://www.pouet.net/prod.php?which=71543)\r\n\r\n![alt text](doc/img/game_xenocrisis.gif)\r\n \r\nXeno Crisis by the [Bitmap Bureau](https://www.bitmapbureau.com/)\r\n\r\n![alt text](doc/img/game_doa.gif)\r\n \r\nDemons of Asteborg [Neofid Studios](https://neofid-studios.com/)\r\n\r\n### Random list of SGDK-powered games and demos\r\n\r\n* [2048](https://github.com/atamurad/sega-2048) by atamurad\r\n* [Abbaye des Morts (l')](https://playonretro.itch.io/labbaye-des-morts-megadrivegenesis-por-002) unofficial MD port by Moon-Watcher\r\n* [Art of LeonBli (the)](https://www.pouet.net/prod.php?which=72272) by Resistance\r\n* [Barbarian](https://www.youtube.com/watch?v=e8IIfNLXzAU) unofficial MD port by Z-Team\r\n* [Demons of Asteborg](https://demonsofasteborg.com/) by Neofid Studio\r\n* [Devwill Too MD](https://amaweks.itch.io/devwill-too-md) by Amaweks\r\n* [Fatal Smarties](https://globalgamejam.org/2016/games/fatal-smarties) made for the GGJ 2016\r\n* [Fullscreen NICCC 2000](https://www.pouet.net/prod.php?which=81136) by Resistance\r\n* [IK+ Deluxe](https://www.youtube.com/watch?v=mcm0TRsOwuw) unofficial MD port by Z-Team\r\n* [Irena](https://white-ninja.itch.io/irena-genesis-metal-fury) by White Ninja Studio\r\n* [Omega Blast](https://nendo16.jimdofree.com/omega-blast/) by Nendo\r\n* [Perlin \u0026 Pinpin](https://lizardrive.itch.io/perlin-pinpin-episode1) by Lizardrive\r\n* [Right 2 Repair](https://supermegabyte.itch.io/right-2-repair) by Super Megabyte made for the GGJ 2020\r\n* [Return to Genesis](https://www.youtube.com/watch?v=jjy0Iz_64dY) unofficial MD port by Z-Team\r\n* [Road to Valhalla](https://www.pouet.net/prod.php?which=72961) by Bounty/Banana \u0026 Resistance\r\n* [Spiral (the)](https://www.pouet.net/prod.php?which=82607) by Resistance\r\n* [TCK](https://www.cursed-knight.fr/cursed-knight-fr.php) by GGS Studio Creation\r\n* [Tetris MD](https://github.com/NeroJin/TetrisMD) unofficial MD port by Nero Jin\r\n* [ThunderCats MD](https://github.com/mxfolken/thundercats_megadrive) by Rolando Fernández Benavidez.\r\n* [Travel](https://www.pouet.net/prod.php?which=65975) by Resistance\r\n* [Wacky Willy Weiner Sausage Surfer](https://globalgamejam.org/2017/games/wacky-willy-weiner-sausage-surfer) made for the GGJ 2017\r\n","funding_links":["https://github.com/sponsors/Stephane-D","https://patreon.com/SGDK","https://paypal.me/StephaneDa","https://www.patreon.com/SGDK"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstephane-d%2Fsgdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstephane-d%2Fsgdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstephane-d%2Fsgdk/lists"}