In my attempt to learn more C and get my feet wet with Emulator Development I started writing a Gameboy Emulator...which ended in this project. Realizing that the Gameboy was too ambitious initially I started cretro, a fully featured chip 8 emulator which also includes keybindings and sound.
Here is the Emulator running snake!
As this project uses Linux/POSIX APIs, namely pthread.h
and sys/time.h
the project will only work on Linux right now.
However, if you are using Windows, using WSL2 works fine.
This project uses gcc, make and SDL2. Go check them out if you don't have them locally installed.
On Debian-based systems you can run the following to install the dependencies
$ sudo apt update
$ sudo apt install -y build-essential libsdl2-dev make
- Clone the Repository
git clone https://github.com/benzammour/cretro.git
- Build the Project
make
To run a ROM, pass the path into cretro
, right after your configured clock-delay (in milliseconds):
./cretro <DELAY> <PATH>
An example would be
./cretro 0 roms/bat.ch8
To initially test the emulator, I created the bat.ch8 ROM for you:
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/cool-feature
) - Implement your desired Feature!
- Commit your Changes (
git commit -am 'Add some cool-feature'
) - Push to the Branch (
git push origin feature/cool-feature
) - Create a new Pull Request
Distributed under the MIT License. See LICENSE
for more information.
Samir Benzammour - @benzammour - hi (at) benzammour (dot) com