summaryrefslogtreecommitdiff
path: root/src/devices/system
diff options
context:
space:
mode:
authorBen Bridle <bridle.benjamin@gmail.com>2024-10-28 20:25:01 +1300
committerBen Bridle <bridle.benjamin@gmail.com>2024-10-28 20:29:12 +1300
commit1a830a3d1b9d99653322d5ae49ea8165de7ed9d0 (patch)
tree798e77b6fcf2438b1c2538a67efe856a2f7cb979 /src/devices/system
parent03c4b069e1806af256730639cefdae115b24401a (diff)
downloadbedrock-pc-1.0.0-alpha1.zip
Rewrite emulatorv1.0.0-alpha1
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.
Diffstat (limited to 'src/devices/system')
-rw-r--r--src/devices/system/read_only_text_buffer.rs23
1 files changed, 0 insertions, 23 deletions
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<u8>,
- 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;
- }
-}