CHIP-8 is an interpreted programming language, developed by Joseph Weisbecker. It was initially used on the COSMAC VIP and Telmac 1800 8-bit microcomputers in the mid-1970s. CHIP-8 programs are run on a CHIP-8 virtual machine. It was made to allow video games to be more easily programmed for these computers.
- cmake >= 3.7
- All OSes: click here for installation instructions
- make >= 4.1 (Linux, Mac), 3.81 (Windows)
- Linux: make is installed by default on most Linux distros
- Mac: install Xcode command line tools to get make
- Windows: Click here for installation instructions
- SDL2 >= 2.0
- All installation instructions can be found here
- Note that for Linux, an
apt
orapt-get
installation is preferred to building from source.
- gcc/g++ >= 5.4
- Linux: gcc / g++ is installed by default on most Linux distros
- Mac: same deal as make - install Xcode command line tools
- Windows: recommend using MinGW
- Clone this repo.
- Make a build directory in the top level directory:
mkdir build && cd build
- Compile:
cmake .. && make
- Run it:
./Chip8 <rom_name>
. You can choose one from the 23 public domain ROMs in theroms
directory.
- Import the project on Visual Studio
- Run it passing a rom file as param
Keypad Keyboard
+-+-+-+-+ +-+-+-+-+
|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|
+-+-+-+-+ +-+-+-+-+
There are two roms that can be used to check the CPU:
./Chip8 ../roms/test/BC_test.ch8
./Chip8 ../roms/test/chip8-test-rom.ch8
Rubric point | Location |
---|---|
The project demonstrates an understanding of C++ functions and control structures. | Yes, check all the files |
The project reads data from a file and process the data, or the program writes data to a file. | Memory and Beeper |
The project accepts user input and processes the input. | main |
Rubric point | Location |
---|---|
The project uses Object Oriented Programming techniques. | Yes, check all the files |
Classes use appropriate access specifiers for class members. | Yes, check all the files |
Class constructors utilize member initialization lists. | Yes, check all the files |
Classes abstract implementation details from their interfaces. | Yes, check all the files |
Classes encapsulate behavior. | Yes, check all the files |
Rubric point | Location |
---|---|
The project makes use of references in function declarations. | CPU |
The project uses destructors appropriately. | Renderer and Beeper |
The project uses scope / Resource Acquisition Is Initialization (RAII) where appropriate. | Yes, check all the files |
The project follows the Rule of 5. | Yes, check all the files |
http://devernay.free.fr/hacks/chip8/C8TECH10.HTM#Ex9E
http://www.multigesture.net/articles/how-to-write-an-emulator-chip-8-interpreter/
https://www.youtube.com/watch?v=rpLoS7B6T94