reoganised project

This commit is contained in:
2026-02-23 20:32:45 +00:00
parent 42bc666c11
commit 71b36dc6b5
96 changed files with 662 additions and 46 deletions
+6 -4
View File
@@ -1,10 +1,9 @@
use std::path::Path;
use std::thread::sleep;
use std::time::Duration;
use std::{env, fs};
use crate::emulator::system::model::State;
use crate::emulator::system::model::{Command, Running};
use crate::emulator::{config::Config, system::model::State};
pub fn run_cli() -> Result<(), Box<dyn std::error::Error>> {
// Initialize channels and read in configuration.
@@ -34,8 +33,11 @@ pub fn run_cli() -> Result<(), Box<dyn std::error::Error>> {
sleep(Duration::from_secs(1));
state.update().unwrap();
state.cmd_sender.send(Command::Start).unwrap();
state.update().expect("state failed to update");
state
.cmd_sender
.send(Command::Start)
.expect("state failed to update");
loop {
sleep(Duration::from_millis(20));
state.send(Command::DisplayRequest);
+1 -1
View File
@@ -114,7 +114,7 @@ pub fn run_emulator(
processor.memory.write_range(offset, data);
}
Command::Interrupt(_interrupt) => {
update = true;
// update = true;
todo!("implement interrupts")
}