Monday, January 7, 2008

Chip8 emulation in Dynamics AX 4.0

First thing first, this is a project I made a few months back. There is still some work that needs to be done on it, but I doubt I will be touching it again anytime soon.

Now most of you are probably wondering what exactly is Chip8... Well think Pong, Space Invaders, Brix, etc. Get the picture?

Now some of you are probably wondering what emulation is... Emulation is replicating the functions of one system through the use of another. In this case, I'm emulating Chip8 through Windows (using Dynamics AX as my coding language and interface... granted it may not be the best of choices but I wanted to see if it could be done and what performance I would be getting).

I've been involved in the emulation scene for several years now. I'm administrator on one, if not, the biggest emulation forum and have betatested several GameCube emulation projects. While I can understand the code I read and the ideas behind emulation, I have never coded an emulator myself. I guess it was time to start somewhere.... and the best place to start is to start small.... Chip8 small that is ;)

The core component in any platform is the CPU. Everything else is one way or another connected to it, either by helping the processor or by being driven by it. The Chip8 CPU only has 35 instructions making it an easy processor to emulate since it doesn't take much time to go through all of them. The isntructions (also called opcodes) are used to manipulate the data in between the registers and the memory. The Chip8 has 16 8bit registers and 4KB memory. Shouldn't be too hard for modern computer to replicate this :p

Alright, that's it for today. Next post will contain actual code for you to see and I'll explain some of the issues we have when emulating anything in DAX.

Until then, here's a little screenshot of my emulator in action :

No comments: