Giter Club home page Giter Club logo

rustychip8's Introduction

http://www.rust-ci.org/pdovy/rustychip8

Rust Chip-8 Emulator

A simple Chip-8 emulator, done as a weekend project to learn Rust.

Space Invaders

What is Chip-8?

Chip-8 was never a real in-hardware system, instead it's a simple programming language that can be run on any system with a properly implemented virtual machine. It was first used in the 70s and 80s on early computers like the COSMAC VIP, DREAM 6800 and other DIY machines. Later in the 90s it regained some popularity as an easy way to program games on graphing calculators like the HP48 (and who didn't try and program games on their graphing calculator? Thankfully it was easier for my generation poking at the TI89).

See CowGod's Chip-8 Technical Reference and Chip-8 on Wikipedia for more details.

Building

This is easy to build using Cargo, Rust's package manager. Just install Cargo as per the instructions on the website, clone the repo and run:

cargo build --release

Note that Rust is still in a pre-1.0 state and breaking changes may be made that will cause the code in this repo not to compile. You can safely assume that it built against the nightly Rust build on the date of the last commit. If you come across anything broken, I'll happily accept PRs. Additionally while this should work on Windows, it's only been tested on Ubuntu Linux 14.04.

You can also run the test suite with:

cargo test

Running

To run, you'll need to first source some Chip-8 ROMs - there are quite a few available in the "program pack" hosted by Chip8.com. Then just specify the path to your ROM on the command line:

target/rustychip8 -f ~/chip8roms/PONG

Once it's up and running you can interact with the program via the Chip-8 keypad, which is mapped onto a normal QWERTY keyboard as shown below:

1 2 3 C 1 2 3 4
4 5 6 D to Q W E R
7 8 9 E A S D F
A 0 B F Z X C V

Task List

  • Implement main fetch/decode/execute loop with support for all instructions.
  • Add rendering of the graphics buffer
  • Add keyboard input
  • Testing with various public domain ROMs

rustychip8's People

Contributors

pdovy avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

steveklabnik

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.