Adventures in Mega Drive Coding Part 1: The Journey Begins

Posted January 12, 2018

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.

MD_first.jpeg

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!

  • Adventures in Mega Drive Coding Part 1: The Journey Begins
  • Adventures in Mega Drive Coding Part 2: Tiles
  • Adventures in Mega Drive Coding Part 3: Importing Graphics
  • Adventures in Mega Drive Coding Part 4: More Tiles
  • Adventures in Mega Drive Coding Part 5: Palettes and Splitting Tiles
  • Adventures in Mega Drive Coding Part 6: Enter Sprites
  • Adventures in Mega Drive Coding Part 7: Handling Input
  • Take It to the Next Level!

    Want sneak peeks and early access to stuff? Join my Patreon!

    Become a Patron!
    Just Want to Buy Me a Coffee?
    Get Words in Your Inbox!

    Be oldschool and sign up for my newsletter to get updates! Just enter your email address, prove you're not part of Skynet and you're good to go!



    Powered by CleverReach. I will not send you spam or sell/give your email address to someone else.  You can of course unsubscribe at any time. By clicking the subscribe button above, you confirm that you have read and agreed to our privacy policy.

    Related Posts

    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.

    Read More

    Make a Space Shooter for the Mega Drive!

    It’s time for another SGDK tutorial series! After doing a single player Pong game and an endless runner, it’s time to reach for the stars… and make a space shooter! Apart from things like scrolling and animating sprites, this new series will show you how to deal with multiple entities and their collisions, how to randomly generate backgrounds and more! This project builds upon the previous tutorials, so if you’re new to SGDK programming and have not done those yet, I highly recommend starting with Megapong.
    Read More

    Patreon Revamps

    Hey there, what’s up? Things are continuing to evolve, as I’ve now updated my Patreon to give patrons more perks! Apart from early access to new tutorials and posts, the biggest one is probably the ability to peek behind the scenes…and there will be a lot to peek at in the coming months! This year I’m writing and submitting my MA thesis, meaning that I will have to do more stuff to make ends meet.
    Read More

    By using the Disqus service you confirm that you have read and agreed to the privacy policy.

    comments powered by Disqus