Reverse Engineering The SEGA Mega Drive

With the widespread adoption of emulators, almost anyone can start playing video games from bygone eras. Some systems are even capable of supporting homebrew games, with several having active communities that are still creating new games even decades later. This ease of programming for non-PC platforms wasn’t always so easy, though. If you wanted to develop games on a now-antique console when it was still relatively new, you had to jump through a lot of hoops. [Tore] shows us how it would have been done with his Sega Mega Drive development kit that he built from scratch.

While [Tore] had an Atari ST, he wanted to do something a little more cutting edge and at the time there was nothing better than the Mega Drive (or the Genesis as it was known in North America). It had a number of features that lent the platform to development, namely the Motorola 68000 chip that was very common for the time and as a result had plenty of documentation available. He still needed to do quite a bit of reverse engineering of the system to get a proper dev board running, though, starting with figuring out how the cartridge system worked. He was able to build a memory bank that functioned as a re-writable game cartridge.

With the hard parts out of the way [Tore] set about building the glue logic, the startup firmware which interfaced with his Atari ST, and then of course wiring it all together. He was eventually able to get far enough along to send programs to the Mega Drive that would allow him to control sprites on a screen with the controller, but unfortunately he was interrupted before he could develop any complete games. The amount of research and work to get this far is incredible, though, and there may be some helpful nuggets for anyone in the homebrew Mega Drive community today. If you don’t want to get this deep into the Mega Drive hardware, though, you can build a cartridge that allows for development on native Sega hardware instead.

16 thoughts on “Reverse Engineering The SEGA Mega Drive

      1. I think Macintosh Plus is the lowest of the 68k Macintosh that can run System 6, Minimum 1MB RAM, max 4MB RAM. Video used a portion of the RAM, 512×384 at one bit, I think 24KB for video RAM. You’d need a way to interface keyboard, mouse, and disk drive or SCSI for loading OS. Lastly ROM is needed to start up Macintosh before it can access disk drive or SCSI drive for OS.

        I do remember .a hack involved moving ROM chips into 68k based Atari computer that allowed Macintosh program to be run.

    1. As others already noted more ram and custom video driver. I distinctly remember reading about some company reusing Sega Genesis/MegaDrive as serial terminals. Then you have XBAND network where you got cartridge adapter, modem and keyboard bundle for online networked play.

  1. While it’s an impressive piece of work, most of the reverse engineering would have been unnecessary if he’d done a bit of research beforehand. At this point, the Megadrive is one of the most thoroughly reverse-engineered consoles out there. There are emulators, FPGA implementation, even official documentation including schematics, and an active developer community.

      1. Quite so, and the blog post is a veritable nostalgia overload! I especially enjoyed the wire wrapped ‘prototypes’ that became the final boards (we have all done that sort of thing in the past, there was no cheap and cheerful board fab available at the click of a mouse as there is these days).

      2. 30 years ago? And I thought I was slow. I’ve still got stuff that’s almost 15 years behind, and recently I’ve gotten back into disassembling various 68000 versions of Microsoft BASIC, as part of kicking the tires on a new ncurses-based disassembler I’ve written.
        (lazy goal: figure out how to swap binary math code in place of the decimal math, then port it to the Sega just because. I’m sure there was a binary math version for Tandy Xenix, but I only ever found a decimal version. I have both old Macintosh versions, but code segments make it a mess, and their segments are arranged differently for no apparent reason, so it’s not just a simple diff)

      3. Oh, and I have dreams of making my own dev hardware, but I would put it on the sidecar CD port instead of that frighteningly beautiful high-rise stack of a cartridge emulator. (The sponge is a nice touch.) The sidecar uses the same 62-pin connector as 8-bit ISA slots, so at least it’s easy enough to salvage some.
        I would also add a counter chip (like a 4040) and rig it up to assert BERR so invalid memory accesses won’t lock up the system.

        What I actually did long ago was add the modem connector and a MAX232 to an early Genesis model that had one wired but not installed (4800 baud is better than nothing!), and ported Macsbug to it. Then I included Macsbug in the code that I was burning to EPROM. Yes, ouch. I soon switched to a makefile with a “make run” rule to start up my code in an emulator.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.