CarlosEduardoL / R8

Yet Another CHIP-8 Interpreter in Rust πŸ˜‰

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

R8: Yet Another CHIP-8 Interpreter in Rust πŸ˜‰

R8 is a CHIP-8 emulator written in Rust.

It has two modes of operation

  • using sdl2 and egui. With an small GUI for debugging, control the emulator speed and step cycle by cicle, loading roms and assembling source code.
  • using crossterm to make a simple TUI.

R8

Dependencies

On windows:

  • rustup

On Linux:

  • rustup
  • sdl2 (only for sdl2-gui)
  • libgtk3 (only for sdl2-gui)

How to run it

Install Rust

Follow the instructions on the Rust website.

Clone the repository

git clone https://github.com/CarlosEduardoL/R8

Run the interpreter sdl2-gui

cd R8
cargo run --release --features "sdl2-gui" --bin r8-sdl2

Run the interpreter with tui gui

cd R8
cargo run --release --features "tui-gui" --bin r8-tui

What is CHIP-8?

CHIP-8 is an interpreted programming language that was used to create games for some home computers in the 1970s and 1980s. It has a simple instruction set and graphics system, and it can run on various platforms with minimal changes.

Current state

  • All opcodes are implemented
  • The display works
  • The keyboard works
  • The timers work
  • The sound works
  • The debugger works
  • The GUI works
  • The roms drag and drop works
  • Use default system file explorer to load roms
  • The assembler works
  • You can load a plain text assembler file and run it
  • You can use a slider to change the speed of the emulator
  • TUI works

Possible improvements

  • Add a Wasm version
  • Add a disassembler
  • Add the posibility to save/load state

References

I used the following sources to learn about CHIP-8 and implement the emulator:

ROMS source

About

Yet Another CHIP-8 Interpreter in Rust πŸ˜‰

License:MIT License


Languages

Language:Rust 91.0%Language:Roff 9.0%