Chip-Emul8
Chip-Emul8 copied to clipboard
A little Chip-8 emulator
Chip-Emul8
My first little emulator of a Chip-8
The Idea
So I first decided to code this Chip-8 emulator around a week ago as I've really wanted to get into emulation and as far as I was aware - writing one is the best way to learn about it. And I can definitely agree. I learnt a lot when going through this and searching the net for info, how to do certain things, using libraries etc and it has all been a great experience. The plan was that this would introduce me to the basics of emulation so I can progress to coding a Gameboy DMG-01 emulator... eventually.
What I Did
I started where most people probably would: how to code a chip 8 emulator search in Google. I found the multigesture post linked at the bottom and I got going. I modelled the CPU, added the emulators basic functions and it was all good. I then tweaked around with some of the modelling for example using the
Plans
The only thing I have planned for now is to implement sounds, that's it.
Screenshots
Mac

Linux

How To Use It
Currently I've only tested this on Mac and I believe you have to download GLUT on other OSs. First off, download the repo and open it up. Navigate to the directory and run
Mac
FYI: If you have updated to sierra, some of the GLUT library has been fully deprecated and so will no longer compile.
```make build```After that, to use the emulator type
```./ch8 ./Controls... I'm not exactly sure as to the controls for all the games but the keys will be one of: 1, 2, 3, 4, q, w, e, r, t, y, a, s, d, f, z, x, c, v. To quit the emulator press esc.
Windows
To be done..
Linux
Exact same as Mac.
Feel free to use the code so long as you give credit to me.
Here are some useful links:
About the CHIP-8:
https://en.wikipedia.org/wiki/CHIP-8#Virtual_machine_description
Chip-8 Opcodes:
http://devernay.free.fr/hacks/chip8/C8TECH10.HTM
Writing an emulator:
http://www.multigesture.net/articles/how-to-write-an-emulator-chip-8-interpreter/
http://mattmik.com/files/chip8/mastering/chip8.html
http://emulator101.com/
http://fms.komkon.org/EMUL8/HOWTO.html
ROMS:
http://www.zophar.net/
Reading in files as byte arrays:
http://www.linuxquestions.org/questions/programming-9/c-howto-read-binary-file-into-buffer-172985/
Some other good emulators:
https://github.com/eshyong/Chip-8-Emulator
https://github.com/bryangarza/chip8
https://github.com/prophittcorey/iC8