Adventures in Mega Drive Coding Part 1: The Journey Begins
WARNING: These are outdated and obsolete! Instad check out the new >tutorial section<. There you'll learn everything you could here but better!
Note: These are not tutorials, I'm just chronicling my progress as I figure stuff out. Some of the things I do might make an experienced Mega Drive coder cry out in anguish. Feel free to use these posts to guide yourself along, but be aware I might be leading you off a cliff!
Well, let’s do this! As I mentioned in my New Year’s resolutions I intend to have created a game running on the Mega Drive by the end of the year, even if it is a crummy one. And since that’s a prospect that has excited me ever since I was a kid, I decided to just get the ball rolling sooner rather than later. And to spice things up a little I will blog about every step of my journey right here! So if you’ve ever been interested in programming for the Mega Drive or a retro console in general, make sure to stop by regularly to see how it is done…and most likely how it should not be done as well. It’s not like I really know what I’m doing after all.
To ease into things I will be working with SGDK, a free dev kit that allows you to write Mega Drive code in C rather than Assembly. While I would love to work in Assembly I feel like it would be too much of a hurdle to overcome at this point in time, especially since I can’t focus all my energy on it. And it literally only took me a few seconds to code, compile and run my first Mega Drive program using SGDK, so…yeah, I’m sticking with that for the beginning to get a general feel for the hardware and how programming for it works.
What a game, it’s so taxing it’s not even running at 60fps. The goal is to read the text before you get bored. I call it a read ‘em up.
Kidding aside though, it felt strangely exhilarating to get something running on the Mega Drive. My 6-year old self would probably high five me before calling the police. And thanks to SGDK it really wasn’t that hard to do. The line that worked the magic was this one:
VDP_drawText("Hello MD World!", 10, 13);
The VDP is the Video Display Processor and using
VDP_drawText tells it to put a string of text on the screen. The coordinates are given in tiles by the way, not pixels, but more on that in the next post.
While I can’t say how much time this project will actually take, I will have some type of game running by the end of the year and I’ve decided to document each step of my journey there. Why not join me, if you have nothing better to do?
If there are any questions or things you are curious about, don’t hesitate to let me know! I want this series to be interesting and useful to you, so the more feedback you can give me the better.
Check out the rest of this series!
Join my mailing list!
You'll get notified whenever cool stuff happens!
Take It to the Next Level!Become an excellent patron on Patreon and snatch yourself some kickass perks such as early builds, exclusive updates and more!
Want To Buy Me a Coffee?
Coffee rules, and it keeps me going! I'll take beer too, though.
If you’ve popped over to the tutorial section recently you might have noticed that I’ve added my very first HaxeFlixel tutorial! It shows how to implement a simple, pixel-perfect 2D water shader which I used for Go! Go! PogoGirl. But a few of you might be wondering what a HaxeFlixel is. Well, it’s a 2D game framework that is as powerful as it is underrated! It runs on the (also underrated) Haxe language, is extremely well documented, open source, and has built-in functions for almost anything you’d need.
Streets of Was
As I’m sure many of you will remember, the original Streets of Rage for the Mega Drive had multiple endings. The real canonical ending has you beat the crap out of Mr. X, thereby ending his reign of terror forever (yeah, right). However, if you confronted Mr. X with a buddy in tow, a new possible path unlocked. A quick refresher is in order. When you confront Mr. X he will ask you to join his organization.
Streets of Rage 2 Design Docs
A few years ago, Yuzo Koshiro posted a pile of old game design documents for Bare Knuckle 2 aka Streets of Rage 2 on the Ancient blog to commemorate the release of Streets of Rage 2 3D on the Nintendo 3DS. These documents gave a deep insight into the game’s inner workings, technical aspects, designs and even some cut content. They were an awesome resource for one of the most awesome games ever created.