Yet another Chip-8 interpreter, this time written in C++ using GLFW and OpenGL as its graphics library 💻

Overview

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.

Owner
Akshit Garg
Errors are red ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ Keywords are blue ⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ Unexpected } on line 32
Akshit Garg
Low Level Graphics Library (LLGL) is a thin abstraction layer for the modern graphics APIs OpenGL, Direct3D, Vulkan, and Metal

Low Level Graphics Library (LLGL) Documentation NOTE: This repository receives bug fixes only, but no major updates. Pull requests may still be accept

Lukas Hermanns 1.4k Jun 19, 2022
OpenGL®-Starter is a template for your upcoming OpenGL Projects which has been compiled to run the most basic Hello World OpenGL Program from LearnOpenGL.com.

OpenGL®-Starter OpenGL®-Starter is a template for your upcoming OpenGL Projects which has been compiled to run the most basic Hello World OpenGL Progr

Kushagra 8 May 27, 2022
OpenGL Object Loading can load virtually every 3d.obj file you can find on the internet, without using another object loading library

OpenGL Object Loading can load virtually every 3d.obj file you can find on the internet, without using another object loading library (assimp for example). The program can load Object with 12M+ triangles and more

Phan Sang 4 Jun 21, 2022
Vire is a C++ voxel rendering engine. It is written in C++14 and uses OpenGL for graphics.

Vire Vire is a C++ voxel rendering engine. It is written in C++14 and uses OpenGL for graphics. Downloads If you'd just like to just download and try,

null 35 Jun 25, 2022
A legacy OpenGL simulator for OpenGL 4.4, written in C++.

the-ancient-tri A legacy OpenGL simulator for OpenGL 4.4, written in C++. Why? My Uni forces us to use legacy OpenGL (eww!), and I didn't want to lear

Mohammad Issawi 4 Feb 10, 2022
A terminal-based graphics library for both 2D and 3D graphics.

TermGL A terminal-based graphics library for both 2D and 3D graphics. Written in C, created for terminals supporting ANSI escape codes. Table of Conte

null 201 Jun 26, 2022
A modern, feature-rich single header C++ interface system for GLFW

A modern, feature-rich single header C++ interface system for GLFW

Vortex 3 Dec 27, 2021
3D engine from scratch (without OpenGL or any other 3D graphics library)

Simple 3d engine based on SFML library. I tried to make this engine powerful and easy to understand.

Vectozavr 21 Jun 4, 2022
A multi-platform library for OpenGL, OpenGL ES, Vulkan, window and input

GLFW Introduction GLFW is an Open Source, multi-platform library for OpenGL, OpenGL ES and Vulkan application development. It provides a simple, platf

GLFW 9.2k Jun 24, 2022
kaun is a replacement for löve's built-in love.graphics module intended for 3D graphics

kaun kaun is a replacement for löve's built-in love.graphics module intended for 3D graphics. It is a Lua module you can require from a shared library

Joel Schumacher 4 Apr 5, 2021
This repo contains the DirectX Graphics samples that demonstrate how to build graphics intensive applications on Windows.

DirectX-Graphics-Samples This repo contains the DirectX 12 Graphics samples that demonstrate how to build graphics intensive applications for Windows

Microsoft 4.6k Jun 27, 2022
My attempt at OpenGL graphics

Graphics My attempt at OpenGL graphics. I have no idea what this will end up as, but it's a bit of fun and something to do. Formerly subject to a C-on

null 2 Dec 12, 2021
FDF is a 42 Project to learn about 3d programming. The program takes a map as parameter and creates its 3d representation.

FDF Project Overview FDF is a 42 Project to learn about 3d programming. The program takes a map as parameter and creates its 3d representation. Render

Mmoumni08 5 Feb 15, 2022
A library for high-performance, modern 2D graphics with SDL written in C.

SDL_gpu, a library for making hardware-accelerated 2D graphics easy. by Jonathan Dearborn SDL_gpu is licensed under the terms of the MIT License. See

Jonathan Dearborn 1k Jun 20, 2022
Metal-cpp is a low-overhead C++ interface for Metal that helps developers add Metal functionality to graphics apps, games, and game engines that are written in C++.

About metal-cpp is a low overhead and header only C++ interface for Metal that helps developers add Metal functionality to graphics applications that

Бранимир Караџић 138 Jun 27, 2022
Android studio native project template using cross platform raylib graphics library.

rayturbo Android studio native project template using cross platform raylib graphics library. https://www.raylib.com/ This project use Android Studio

Ciapas Linux 10 Mar 5, 2022
A graphics library using SDL programmed in C++

2DGraphicsLib A graphics library using SDL programmed in C++ This project will serve multiple purposes: I aim to learn how to program with C++ To crea

Angus Robertson 1 Nov 22, 2021
Tetris written with C++ and OpenGL.

Tetrec This is yet another Tetris game, which is in 3D, written using C++ and OpenGL 2.1, aiming at being lightweight towards not-so-beefy computers (

Lê Duy Quang 14 Jan 17, 2022