GithubHelp home page GithubHelp logo

shadeyg56 / chip8-emulator Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 1 MB

A simple CHIP8 Emulator in pure C + SDL2

License: MIT License

Shell 0.07% C 98.77% Objective-C 0.55% CMake 0.23% M4 0.37%

chip8-emulator's Introduction

chip8-emulator

A simple CHIP-8 Emulator in pure C + SDL2

What is CHIP-8?

CHIP-8 is an interpreted programming language that can only run on a CHIP8 virtual machine. In theory, this is more of an interpreter than an emulator, but they always get called emulators.

CHIP-8 Architecture

  • Memory: 4 KB of RAM
  • Display: 64 x 32 monochrome (the emulator scales up to 8x)
  • 16 general purpose 8-bit register VF - V0
  • 1 index register "I" to point to memory addresses
  • A stack of up to 16 16-bit values
  • Delay timer
  • Sound timer
  • Psuedo register program counter that points at current instruction in memory
  • Psuedo register stack pointer that points at current location in the stack

Important Info

This emulator can run any .ch8 ROMS.

Please note that due to discrepancies in interpreters some ROMS may not run as intended.

Build

Code can be compiled using

gcc main.c chip-8.c screen.c "-ISDL2\include" "-Iheaders" "-LSDL2\lib" -lmingw32 -lSDL2main -lSDL2 -o main.exe

Run

Run the program using

main.exe /path/to/rom

TODO

  • Audio

Acknowledements

I used this guide for all of the info on the architexture and CPU instructions

chip8-emulator's People

Contributors

shadeyg56 avatar

Watchers

 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.