Schip8
A library with the aim to provide a simple CHIP-8 interpreter backend that can integrate into any graphics library or renderer of your choosing.
Examples
Quickstart
This is a basic skeleton of how to start implementing a frontend.
It's recommended to use the [anyhow] crate as well.
use schip8::Chip8;
use anyhow::{Context, Result};
fn main() -> Result<()> {
let mut chip = Chip8::default();
let file = load_file("roms/TETRIS")?;
chip.load_rom(&file).context("Loading ROM file")?;
loop {
chip.tick().context("Interpreter tick")?;
for y in 0..chip.screen.height {
for x in 0..chip.screen.width {
if chip.screen.get_pixel(x, y) {
}
}
}
if chip.should_play_sound() {
}
}
}