Writing an arcade game emulator is an awesome learning project, and this tutorial will take you through the entire process in a very detailed way. Want to really learn how a CPU works? Writing an emulator is the best way to learn about it.
You'll need a working knowledge of C, and a knowledge of assembly language might be helpful. If you don't know assembly, writing an emulator is a great way to become knowlegeable about it. You will also need to be comfortable with hexadecimal math (also known as base 16, or simply "hex"). I will give an introduction to this topic as well.
I have chosen to emulate Space Invaders which uses the 8080 processor. Since this game and processor are so popular, there is a lot of information about them widely available on the internet. You'll need it to complete the project.
All the source code for this tutorial is available on github. If you aren't comfortable using git, there is a "Download ZIP" button on the github page that will download an archive of all the code.
Making the emulator play for Mac OS X 10.11 El Capitan and XCode 7.
Adopting the emulator for play on iPhone/iOS 9.
Post questions or comments on Twitter @realemulator101, or if you find issues in the code, file them on the github repository.