shwnchpl / chip8

A CHIP-8 emulator written in Rust.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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 <shwnchpl@gmail.com>
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.

About

A CHIP-8 emulator written in Rust.

License:MIT License


Languages

Language:Rust 100.0%