Skip to content

nmp2605/chip8rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chip-8.rs

This project's main purpose is to write a readable, understandable interpreter for Chip-8 using Rust. It is meant for developers that either never coded in Rust and/or never worked on an interpreter or emulator.

What's Still Missing

The interpreter is a work in progress. It are still some key parts missing, such as:

  • Sound
  • Enhance performance and playing experience

Requirements

Running It Locally

To run a ROM in the interpreter, you need to pass the ROM location as an argument when calling the program. For instance, if you're using cargo, you can do it like this:

   cargo run ../../my-chip-8-roms/Pong.ch8

You can also run the tests in the usual Rust way:

   cargo test

Project Structure

To make it feel "realistic," I've tried to separate everything as if it was a real computer:

  • Motherboard: takes care of booting up the fetch-decode loop.
  • CPU: fetches and decodes instructions, takes care of registers, timers, and the stack.
  • Memory: stores and reads data from the ROM.
  • Instruction: this was separated from the CPU because of the amount of data, and it localizes and executes the instructions on Chip-8.
  • Interface: loads the screen where the emulator runs, controlling the display and input using minifb.
  • Keyboard: contains information about which keys will be used in the interpreter.

Finding ROMs

To run the interpreter, you need to have ROMs that are compatible with Chip-8. These are some resources that can be found on Github:

Resources

The main resources I've used when developing the interpreter are:

About

A Chip-8 interpreter written in Rust

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages