https://github.com/ryp/chip8-emu
CHIP-8 Emulator
https://github.com/ryp/chip8-emu
chip-8 cpp emulator
Last synced: 11 months ago
JSON representation
CHIP-8 Emulator
- Host: GitHub
- URL: https://github.com/ryp/chip8-emu
- Owner: Ryp
- License: mit
- Created: 2019-01-24T21:24:08.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-07-05T22:18:33.000Z (almost 7 years ago)
- Last Synced: 2024-12-30T22:29:26.709Z (over 1 year ago)
- Topics: chip-8, cpp, emulator
- Language: C++
- Homepage:
- Size: 57.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Chip-8 Emulator
I coded this simple emulator for fun and as an exercise. It can run vanilla Chip-8 ROMs without any kind of fancy extensions.
I used the publicly available ROMs for testing as well as a bunch of custom unit tests.


## Building
This should get you going after cloning the repo:
```sh
$ cmake -H. -B./build
$ cmake --build build
$ ./build/chip8emu
```
**Disclaimer:** I didn't spend too much effort making this portable/packaged at all.
This was developped under Linux, but the dependencies (SDL2) are available in Windows so if you really want to run that there that won't be too much effort.
If you want to change the SDL2 backend, my source is modular enough to make that happen easily. Contact me if you have questions!
## Input
For simplicity, this program assumes that you are using a QWERTY layout, and maps the original 4x4 keys on this area of the keyboard:
```
Original -> QWERTY layout
1 2 3 C 1 2 3 4
4 5 6 D Q W E R
7 8 9 E A S D F
A 0 B F Z X C V
```
You can exit the emulator by pressing `ESC`.
## Output
For the video output, I'm scaling the original 64x32 framebuffer by 8 for more comfortable viewing by default. This can only be changed by recompiling `main.cpp` for now.
**Note:** Sound is NOT supported at the moment.
## Acknowledgments
This was implemented mostly with the help of [Cowgod's technical specs](http://devernay.free.fr/hacks/chip8/C8TECH10.HTM). Thanks for your very complete specs!