1
1
Fork
You've already forked ergo_pixie
0
Chip8 Emulator written in =[no-std]= Rust.
  • C 70.5%
  • Rust 26.4%
  • Makefile 1.7%
  • Nix 1.4%
Find a file
niftyborg c10fcdd0f9 Add assembler generation and encoding
Add machine instruction generation along with utilities that facilitate
generating encodings and validating correct arity, labels are not yet
supported
2025年06月28日 06:08:35 -04:00
examples Add assembler generation and encoding 2025年06月28日 06:08:35 -04:00
reference Add README, add technical reference 2025年02月06日 14:23:33 -05:00
src Add assembler generation and encoding 2025年06月28日 06:08:35 -04:00
.gitignore Update README and emulator 2025年05月30日 19:55:47 -04:00
.rustfmt.toml Add functionality for chip8 emu, test roms 1-4 2025年02月11日 16:24:51 -05:00
flake.lock Update README and emulator 2025年05月30日 19:55:47 -04:00
flake.nix Fix issue with failed compilation 2025年06月12日 05:02:11 -04:00
LICENSE Update README and emulator 2025年05月30日 19:55:47 -04:00
makefile Add disassembler 2025年06月26日 20:33:04 -04:00
README.org Update README with public repo name 2025年05月30日 20:09:43 -04:00
rust-project.json Add project base 2025年02月06日 14:53:24 -05:00

Ergo Pixie

Chip8 Emulator

A Chip8 Emulator written in the Rust programming language without the Rust's std or alloc libraries. Early iterations of the project used a modified version of the core library but I felt that was too unique a configuration for others to setup.

This was a experiment in building emulators and seeing how well Rust without std and alloc, served as a wrapper for libc functionality. Please feel free to ask me about it if you are interested, I'm still figuring out creating/publishing articles. But in a few words, pattern matching was amazing.

Requirements

rustc through rustup

rustup toolchain add nightly-2025年01月31日 --profile minimal

For NixOS systems, or linux distributions with Nix:

  • Rust nightly, preferrable 1.86 (not included in flake)
  • Nix
  • rustc (Nightly, tested on 1.86; newer versions may work)

For other linux systems:

  • rustc (Nightly, tested on 1.86; newer versions may work)
  • pkg-config
  • gnumake
  • raylib
  • xorg.libX11 (this may or may not be needed, or may already be installed)

A rom:

My favorite from the Chip8 Archive.

,#+begin_src shell wget "https://johnearnest.github.io/chip8Archive/roms/slipperyslope.ch8"

#+end_src

Usage

NixOS or Nix-enabled linux distributions:

nix develop
make -B # optionally "make -B RELEASE=1" for release build
./build/debug/chip8

For other linux distributions:

make -B # optionally "make -B RELEASE=1" for release build
./build/debug/chip8

ROMs

ROMs are needed otherwise you won't be able to run the emulator.

Great resources: John Earnest Chip8 Archive

Acknowledgements

The following resources were a wealth of information, and a great help for testing the emulator for correctness.