Inspiration

A while ago a friend told me how much fun he had building a GameBoy emulator. I see why now. I was inspired to make something that I found interesting, and a lot of the work closely mirrored the ISA material I was learning in Computer Architecture.

What it does

The interpreter reads in 16 bit opcodes from ROM files (max 3896 byte) sourced online, and modifies the appropriate states. The emulation cycle then repeatedly iterates, updating the window to the correct game states.

How I built it

I programmed the project in c++, using SDL for the graphics.

Challenges I ran into

Once I understood how each step of the emulation process fit together, the largest problem was debugging. Several hours in the late night were spent perfecting opcode interpretation and eliminating segmentation faults.

Accomplishments that I'm proud of

My interpretor runs! The graphics are all done and can play any CHIP8 ROM. This was my first time programming in c++, so I am also proud of that.

What I learned

I am much more familiar with the emulation lifecycle, and think that I can apply what I learned in this project to further emulator development. I also have a much greater understanding of (and appreciation for) the work that the CPU does.

What's next for CHIP-8 Interpreter

Sound would be the next step, which would require a few more hours perusing the SDL Wiki. Most of the opcode interpretation was done in a large switch case, so another step would be to procedurally generate interpretation through function pointers.

Built With

Share this project:

Updates