From 1a830a3d1b9d99653322d5ae49ea8165de7ed9d0 Mon Sep 17 00:00:00 2001 From: Ben Bridle Date: Mon, 28 Oct 2024 20:25:01 +1300 Subject: Rewrite emulator This is a complete rewrite and restructure of the entire emulator project, as part of the effort in locking down the Bedrock specification and in creating much better tooling for creating and using Bedrock programs. This commit adds a command-line argument scheme, an embedded assembler, a headless emulator for use in non-graphical environments, deferred window creation for programs that do not access the screen device, and new versions of phosphor and bedrock-core. The new version of phosphor supports multi-window programs, which will make it possible to implement program forking in the system device later on, and the new version of bedrock-core implements the final core specification. --- src/main.rs | 28 ---------------------------- 1 file changed, 28 deletions(-) delete mode 100644 src/main.rs (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs deleted file mode 100644 index 4416f7d..0000000 --- a/src/main.rs +++ /dev/null @@ -1,28 +0,0 @@ -#![feature(bigint_helper_methods)] -#![feature(io_error_more)] -#![feature(split_array)] -#![feature(seek_stream_len)] - -use std::io::Read; -use std::process::exit; - -mod devices; -mod emulator; - -pub use devices::*; -pub use emulator::*; - -fn main() { - // Read bytecode from standard input - let mut bytecode: Vec = Vec::new(); - match std::io::stdin().take(64*1024).read_to_end(&mut bytecode) { - Ok(len) => eprintln!("Loaded {len} bytes of bytecode."), - Err(err) => { - eprintln!("Could not read from standard input, quitting."); - eprintln!("({err:?})"); - exit(1); - } - }; - BedrockEmulator::new(&bytecode).run(); -} - -- cgit v1.2.3-70-g09d2