CHIP-8 is an interpreted programming language, developed by Joseph Weisbecker on his 1802 microprocessor (Wikepedia). This project is a CHIP-8 emulator written in C. I wrote it with the goal of dipping my feet into C while building something fun.
Fantastic references:
- Full CHIP-8 instruction set emulation
- Scalable display window
- Adjustable CPU cycle speed for game compatibility
- Sound support for the CHIP-8 buzzer
- Customizable background and foreground colors via hex codes
- Make sure you have the following installed on your system
- Clone the repository
git clone https://github.com/caffeinated01/chip-8.git
cd chip-8- Create a build directory and run CMake
mkdir build
cd build
cmake ..- Compile (and hope it works)
makeThis will create a chip8 executable in build/bin/
Usage: chip8 [-v] [-s <scale>] [-d <delay>] [-c <bg_color> <fg_color>] -r <rom_path>
-v is for verbose logging. Ommit this to disable verbose logging. NOTE: only enable this if you are debugging or want to see what's going on behind the scenes, the sheer amount of IO slows down the emulator significantly.
-s is for scale. Scale is multiplied to original display height and width, 64 and 32. A scale of 10 would result in a window that is 640px by 320px large. Defaulted as 10.
-d is for cycle delay. Defaulted as 1.
-c is for the colors rendered on screen. Pass in 2 hex color codes -- the first for background and second for foreground.
-r is for path to rom.
Example usage:
./chip8 -r roms/ibm_logo.ch8 -s 15 -d 3 -c #0e0f0e #d6dce9Contributions are welcome!
If you find a bug or have suggestions for new features open a new issue
- Fork the repository
- Push changes to your fork
- Open a pull request to the
mainbranch
