Initial Commit

This commit adds most of the logic for the processor

Things that are missing:
+ Most sdl2 interactions
+ Cartridge loading
+ Main loop for the game
This commit is contained in:
Marco Thomas
2021-03-10 14:38:13 +01:00
commit f61b3ed74d
8 changed files with 671 additions and 0 deletions

27
src/main.rs Normal file
View File

@@ -0,0 +1,27 @@
extern crate rand;
extern crate sdl2;
use std::env;
mod processor;
mod fontset;
use crate::processor::Processor;
fn main() {
let cartridge = env::args().nth(1);
match cartridge {
Some(_) => println!("Found a cartridge file! Trying to load..."),
None => {
println!("No cartridge file found! Exiting!");
return;
}
};
let mut processor = Processor::new();
// load cartridge file
processor.start();
}