https://github.com/prashantrahul141/cipi8
Chip8 emulator implementation in c++
https://github.com/prashantrahul141/cipi8
chip8 chip8-emulator cpp
Last synced: 12 months ago
JSON representation
Chip8 emulator implementation in c++
- Host: GitHub
- URL: https://github.com/prashantrahul141/cipi8
- Owner: prashantrahul141
- License: mit
- Created: 2024-09-22T06:05:03.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-11-12T09:08:23.000Z (over 1 year ago)
- Last Synced: 2025-06-04T18:18:30.389Z (about 1 year ago)
- Topics: chip8, chip8-emulator, cpp
- Language: C++
- Homepage:
- Size: 2.44 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# cipi8
Cipi is a Chip8 emulator written primarily in CXX. You can read more about Chip8 [here](https://en.wikipedia.org/wiki/CHIP-8).
There are a total of 34 instructions taken from [here](http://devernay.free.fr/hacks/chip8/C8TECH10.HTM).
You can also download release binaries from the [releases page](https://github.com/prashantrahul141/cipi8/releases).

_Playing octojam1title.ch8_

_Playing Space Invaders (David Winter)_

_Playing Tetris (Fran Dachille, 1991)_
## Building
The project uses Cmake as it's prebuild system.
#### Requirements:
- A C compiler
- [Cmake](https://cmake.org/)
- [Ninja](https://ninja-build.org/)
1. Clone the repo and cd into the project root directory.
```sh
git clone https://github.com/prashantrahul141/cipi8 && cd cipi8
```
2. Run cmake to create build files for your platform.
```sh
cmake . -G Ninja
```
additionally you can provide `-DCMAKE_BUILD_TYPE={configuration}` to build in `Debug`, `Release` configurations.
3. Run Ninja to build the project
```sh
ninja
```
You can provide `-j` flag to build in parallel
```sh
ninja -j 10
```
## Using the emulator
```sh
Usage: cipi8 [--help] [--version] [--scale VAR] [--delay VAR] rom_file
Positional arguments:
rom_file The rom file to run. [required]
Optional arguments:
-h, --help shows help message and exits
-v, --version prints version information and exits
--scale Scale of the display [nargs=0..1] [default: 15]
--delay Delay between CPU cycles. [nargs=0..1] [default: 6]
```
There are some examples roms in the /roms directory, you can test them.