Coder Social home page Coder Social logo

chip8's Introduction

chip8.rs

A CHIP-8 emulator library and SDL2 application written in Rust.

Usage

chip8.rs can be used as both a standalone emulator application and a generic CHIP-8 library.

Application

Clone this repo, ensure that you have the SDL2.0 development libraries installed, and simply use cargo run <ROM> where <ROM> is the path to a CHIP-8 ROM.

$ cargo run -- --help
Chip-8 Emulator 0.1
Shawn M. Chapla <[email protected]>
A Rust/SDL2 CHIP-8 emulator.

USAGE:
    main <ROM>

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

ARGS:
    <ROM>    Chip-8 ROM file to load.

Library

As a library, chip8.rs can be used for everything from instruction decoding to full on emulation. For an example of how to do the former, see the code in src/core/cpu.rs. For an example of how to do the latter, see src/bin/main.rs and all files in src/sdl.

ROMs

A Google search for "chip8 roms" turns up a number of results, many/most of which should be compatible with this emulator.

Screenshots

BRIX

Screenshot of the game BRIX

TETRIS

Screenshot of the game TETRIS

Credits

For information on the CHIP-8 architecture and how various instructions should be implemented, I referred to the following resources:

I also used Starr Horne's chip8-rust application as a functionality reference, although I tried to avoid looking at any of his code until my implementation was mostly complete.

License

This project is licensed under the MIT License. See the LICENSE.md file for details.

chip8's People

Contributors

schapla avatar

Stargazers

Frank Taylor avatar

Watchers

Shawn M. Chapla avatar

chip8's Issues

Add additional configuration options

  • Ability to toggle vertical wrapping (since it breaks some games)?
  • Ability to control clock speed?
  • Ability to set/change foreground/background color?

Config file or command line arguments? Both?

Improve in-code documentation

Currently, documentation within code is very limited. Existing documentation should be made to conform to rustdoc style and new documentation should be added.

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.