Emulator Project

360px-Gameboy

After a month in a crunch-like state, a tiny bit more free time is visible on the horizon, and that means going for a new month-long project.

One idea that’s been lurking around at the back of my mind the past months is to write an emulator for an older (= manageable) platform. There are many viable platforms, but of course one of them really sticks out: the good old Nintendo GameBoy. There are about as many GameBoy emulators out there as there have been GameBoys in the first place, so I will be re-inventing the wheel quite a lot. However, keeping in line with past projects, it’s only about trying it out on my own and learning from the experience. Therefore, there will also not be any release, since there are already more than enough good emulators out there. This is of course also a good thing, since I can peek at their implementations in case I get stuck.

I’m going to try to write about this project in such a fashion that it’s worthwhile for others to follow. That means I’ll try to give an overview of the resources I find and use, document choices I make and possible solutions to problems.

Development Environment

Lately, I’ve been working a lot with Microsoft’s .net platform, Visual Studio and WPF, and I’ve liked it a lot since I was very productive doing it. However, similar to training physically requires you to bring yourself out of balance from time to time to prevent your body from adapting too much to certain conditions, programmers should from time to time try working in a completely different environment. Therefore, I’ll leave the haven of VS 2008 and try to work with another IDE, preferably under Linux for a complete change of scenery. I’m being drawn towards the Eclipse CDT, since early tests showed this to be among the easiest to set up, but the decision is not yet made. Concerning the programming language, as a pragmatic programmer, I’ll have to learn a new programming language this year, but it’s not yet the time for that yet I think. Therefore, I’ll just choose C++ for this task.

Schedule

The first week of this project will be all about looking a bit around and finding the necessary resources. I remember some good sources from an earlier attempt, but I’ll also search for new resources. Also, setting up a working envirnoment is a task for the first week. In keeping with the iterative development, I’ll try to define an early milestone at the end of the first week, which will probably be something like being able to load a GameBoy ROM and putting out some general info. Other iterations will probably be harder to define, since emulation will only work once all commands are implemented. Good candidates for milestones will probably be subsystems such as input or sound (however I’m not sure about being able to write the sound emulation in one month).

Legality

To put this out early, I’m not going to promote downloading GB game ROMs and will definitely not offer any. In fact, I won’t even be offering source code, since there are already enough good emulators out there. A good source of public domain GB ROMS seems to be http://www.pdroms.de/files/gameboy/Games/.