Skip to content

loop-index/chip8

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A Chip8 Emulator in Rust

I wrote this little emulator because I'm still riding the high from last semester's CompArch class, and also because I wanted to try out Rust.

Demo of the emulator

Usage

There are three programs in this package, the emulator and an assembler/disassembler for the instruction set.

The Emulator

You can run the main emulator with cargo:

cargo run --bin chip8 -- --rom <PATH/TO/ROM>

Additional arguments:

-f, --frames <FRAMERATE>       Number of frames to render per second [default: 100]
-r, --rom <ROM>                The ROM to load
-c, --cycles <TICK_PER_FRAME>  Number of instructions to execute per frame [default: 8]
    --no-keypad                Disable keypad rendering
    --smpte                    Enable SMPTE color mode
-h, --help                     Print help

The Assembler

The program takes a text file and outputs a hex file. Usage:

cargo run --bin asm <PATH/TO/SOURCE> <PATH/TO/OUTPUT>

The Disassembler

Similarly, the program takes a hex file and outputs a text file. Usage:

cargo run --bin deasm <PATH/TO/SOURCE> <PATH/TO/OUTPUT>

Acknowledgements

The included ROM folder is taken from https://www.zophar.net/pdroms/chip8/chip-8-games-pack.html

Some code is inspired by https://github.com/cmleon51/cli-chip8-emulator.rs

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages