Monday, February 23, 2009

Born of an Emulator

Well, first I have to say that I usually don't like to use blogs, but in this case I've made an exception because I think is right to share the knowledge one acquires.

In this blog, at least for now, I'm going to post about the process of creating an emulator. This should help all the people that, just like me, wants to get involved in this area.

I should say I don't have too much experience doing emulators so probably a lot of stuff could be done in a better way than how it's done. This is my first emulator I have started from scratch and because of this I haven't focused on optimizing anything. I know it probably would have been better to optimize while developing, specially for the CPU, since it's a lot of work that you will have to do again when optimizing, but I didn't want to get into that just yet.

The console I'm trying to emulate is a Monochrome GameBoy for now and I expect to make it emulate ColorGB and maybe SGB and PocketGB in the near future. This emulator don't have a name yet as I only have created it for fun and to learn how to program an emulator.

If you consider that I started developing this like two weeks ago and that I'm working full time as a summer student (I'm from Chile). I think the progress has been awesome!

When I started this emulator project I thought that a Blog about this would have helped me a lot, specially with those details that nobody informs you about! So that's why I'm creating it, to help others in similar situations. But before starting the Blog I wanted to make sure I could handle the emulator, so I can share knowledge and not just problems. So here is what has been done:

- CPU with Interruption Handling.
- Memory Handling and Memory Mapping.
- Video Handling (Still not showing the user screen but soon!).
- Showing in use Tile Data.
- Multithreaded Video and CPU synch (Not the fastest method, but I like to keep it real!).

Probably there are a couple of bugs in each of those sections, but I manage to see the tile data of some games changing through time :)

I started developing in linux, but I have changed it since I wanted to learn and use DirectX. So now I'm using Microsoft Visual Studio 2008 and the latest DirectX SDK, the one from November 2008. I'll try to do it as flexible as possible, so it's easy to change it to OpenGL, SDL or any other renderer's API, such as a handmade one.

Ok. That's about it. I'm sorry if I have bad English but it's just not my first language. I will try to post again in one or two days(or maybe sooner) to start unveiling the mysteries of emulating a console.

For now I have an image of DropZone tile data:


Haven't worked on the palettes, so that's why the colors are red, blue and green.

No comments:

Post a Comment