chip8/src/main.rs

20 lines
523 B
Rust
Raw Normal View History

// I used: http://devernay.free.fr/hacks/chip8/C8TECH10.HTM#00E0
// and https://en.wikipedia.org/wiki/CHIP-8#Opcode_table
// for information about how to implement a CHIP-8 Emulator
2020-06-25 18:13:09 +00:00
use chip8::emu::Chip8;
use std::path::Path;
use std::time::Duration;
fn main() {
let mut chip8: Chip8 = Default::default();
chip8
2020-06-25 17:15:31 +00:00
.load_rom(Path::new("./games/c8games/TICTAC"))
.expect("Unable to load ROM");
loop {
chip8.execute_cycle();
2020-06-25 18:13:09 +00:00
std::thread::sleep(Duration::from_millis(300));
}
}