Giter VIP home page Giter VIP logo

chip-8's Introduction

Chip-8 interpreter in C++

Yet another Chip-8 interpreter, this time written in C++ using GLFW and OpenGL as its graphics library. It uses Dear ImGui to draw the GUI.

Why C++?

Because I wanted to get my hands dirty with modern C++. Last time I did C++ was C++98 2 years ago for school.

Screenies

Screenshot of the interface

CPU Interface

2021-10-15-174233-c.mp4

Screen recording of the snake game running with the chip-8 interpreter

Building

In theory, it should run anywhere where Dear ImGui and C++ runs and OpenGL is available. But I only tested it on Windows.

Windows

You will need cmake, llvm, make and git.

  • $ git clone https://github.com/gargakshit/chip-8 --recursive

    Use --recursive as the repo contains GLFW and Dear ImGui as submodules

  • $ cmake -Bbuild -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER="clang++" -G "MinGW Makefiles" .

    This will produce MinGW Makefiles with clang++ as the C++ compiler. You can optionally add the flag -DCMAKE_BUILD_TYPE=Release to generate MinGW Makefiles for the release build. The release build is optimized.

  • $ cmake --build build

    This will build the binary. If everything is successful, the interpreter binary will be produced with build/chip8.exe as the path. At this point, you could run your favorite Chip-8 "ROMs" by dragging them and dropping it onto the binary in the file explorer, or by using a terminal and running build/chip8 path/to/my/program.ch8. I have included some programs in the programs/ directory to play with (shout out to the original program authors)

You can also build with VS and MSVC toolchains, but I have not tested them personally

Is this any good?

Yes.

chip-8's People

Contributors

gargakshit avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.