Skip to content

Benzammour/cretro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Logo

cretro

Yet another Chip8-Emulator!

View Demo · Report Bug · Request Feature

About The Project

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!

Getting Started

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.

Prerequisites

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

Installation

  1. Clone the Repository
    git clone https://github.com/benzammour/cretro.git
  2. Build the Project
    mkdir build
    cd build
    cmake -G Ninja ..
    ninja
  3. Optionally, you can install the resulting binary using
    ninja install-bin
    
    It can be removed using ninja uninstall-bin.

Usage

To run a ROM, pass the path into cretro, right after your configured clock-delay (in milliseconds):

   ./cretro [-d <0..4>] [-f <FREQUENCY>] <ROM>

An example would be

   ./cretro roms/bat.ch8

To initially test the emulator, I created the bat.ch8 ROM for you: Bat Demo

(back to top)

Contributing

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!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/cool-feature)
  3. Implement your desired Feature!
  4. Commit your Changes (git commit -am 'Add some cool-feature')
  5. Push to the Branch (git push origin feature/cool-feature)
  6. Create a new Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Samir Benzammour - @benzammour - hi (at) benzammour (dot) com

(back to top)

About

👾 cretro - Yet another Chip 8 Emulator!

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published