2020-06-25 06:40:09 +00:00
|
|
|
// 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;
|
2020-06-25 06:40:09 +00:00
|
|
|
use std::path::Path;
|
|
|
|
use std::time::Duration;
|
2020-06-15 05:45:49 +00:00
|
|
|
fn main() {
|
2020-06-25 06:40:09 +00:00
|
|
|
let mut chip8: Chip8 = Default::default();
|
|
|
|
|
|
|
|
chip8
|
2020-06-25 17:15:31 +00:00
|
|
|
.load_rom(Path::new("./games/c8games/TICTAC"))
|
2020-06-25 06:40:09 +00:00
|
|
|
.expect("Unable to load ROM");
|
|
|
|
|
|
|
|
loop {
|
|
|
|
chip8.execute_cycle();
|
|
|
|
|
2020-06-25 18:13:09 +00:00
|
|
|
std::thread::sleep(Duration::from_millis(300));
|
2020-06-25 06:40:09 +00:00
|
|
|
}
|
|
|
|
}
|