summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/main.rs b/src/main.rs
index 358ac4e..dc2f600 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -7,14 +7,14 @@ use std::thread::sleep;
use std::{thread, time};
mod core;
-mod ram;
+mod rom;
use self::core::Core;
fn core_worker(mut core: Core, should_stop: &Mutex<bool>, cvar: &Condvar) {
loop {
while !(*should_stop.lock().unwrap()) {
- core.step();
println!("{}", core.op());
+ core.step();
sleep(time::Duration::from_millis(1000));
}
@@ -55,7 +55,7 @@ fn main() {
let asyncpair = Arc::new((Mutex::new(false), Condvar::new()));
let asyncpair2 = asyncpair.clone();
- let core = match Core::new_with_ram_from_hex(data) {
+ let core = match Core::new_with_rom_from_hex(data) {
Ok(value) => value,
Err(err_string) => {
println!("{}", err_string);
@@ -63,8 +63,6 @@ fn main() {
}
};
- println!("{}", core.op());
-
thread::spawn(move || {
let (ref should_stop, ref condvar) = *asyncpair2;
core_worker(core, should_stop, condvar);