Main Screen Turn On

In my previous posts, I was able to make the Sega Genesis / Mega Drive compute the Fibonacci number sequence on it’s CPU and pass the TMSS check. In this post, I’m going to focus on making the Visual Display Processor draw images on the screen.

I will be ignoring steps performed by most other people writing on the subject: I’m not clearing the RAM, checking the Reset button, or initializing the Z-80 co-processor, controller ports, and the sound chips. I would rather add code for each subsystem as I need it. However, it’s possible that an actual Genesis will require all of these steps before it will work. I don’t know. I’m far from testing on real hardware, and I see no reason to complicate things early on. Code that works in my emulator is sufficient for learning. Continue reading

Keep it Secret, Keep it SEGA

The Trade Mark Security Signature (TMSS) was SEGA’s attempt to prevent unlicensed developers from releasing games for the Genesis / Mega Drive. Failing the TMSS check disables the Visual Display Processor (VDP). Passing the TMSS check displays this lovely screen:

toss

TMSS check passed!

Continue reading

Genesis Does Fibonacci

Can you think of a better way to spend a holiday than learning to write assembly language for a 26-year-old game console? I couldn’t, so I wrote a simple program for the SEGA Genesis. (Known as the Mega Drive outside North America.)

First, some tools are needed:

  • A decent text editor
  • An Assembler that produces M68000 machine code
  • A Genesis emulator with a built-in debugger

I tried to find these three tools for Mac OS X, my preferred platform. There are plenty of text editors available and the GNU assembler will run on just about anything, but I could not find a Genesis emulator for Mac OS X that has a built-in debugger. Phooey. Gotta use the right tool for the job, so it was time to dig out the old PC. Windows XP, Pentium 4. Let’s go!

Continue reading

Battle for Wesnoth

The latest version of a wonderful open-source turn-based strategy game called Battle for Wesnoth was released today. It has many changes including bug-fixes, updated graphics, re-written multiplayer code, and some AI improvements. However, I am more excited about a small insignificant change to the game. A simple preference option allows you to flip the time-of-day graphics so you can make the sun move right-to-left or left-to-right depending on what is more intuitive to you. This is noteworthy because I submitted the patch which added that code to the game.

That’s right, millions… *ahem*… thousands… er, hundreds of people are playing a computer game containing code that I wrote! I feel so awesome!