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/devices/system/read_only_text_buffer.rs | 23 ----------------------- 1 file changed, 23 deletions(-) delete mode 100644 src/devices/system/read_only_text_buffer.rs (limited to 'src/devices/system') diff --git a/src/devices/system/read_only_text_buffer.rs b/src/devices/system/read_only_text_buffer.rs deleted file mode 100644 index dae1024..0000000 --- a/src/devices/system/read_only_text_buffer.rs +++ /dev/null @@ -1,23 +0,0 @@ -pub struct ReadOnlyTextBuffer { - chars: Vec, - pointer: usize, -} - -impl ReadOnlyTextBuffer { - pub fn from_text(text: &str) -> Self { - Self { - chars: text.bytes().collect(), - pointer: 0, - } - } - - pub fn read_byte(&mut self) -> u8 { - let option = self.chars.get(self.pointer); - self.pointer += 1; - *option.unwrap_or(&0) - } - - pub fn reset_pointer(&mut self) { - self.pointer = 0; - } -} -- cgit v1.2.3-70-g09d2