From 4738b8581e932174f9ab99d21c6a24024fb6414d Mon Sep 17 00:00:00 2001
From: Ben Bridle <bridle.benjamin@gmail.com>
Date: Mon, 28 Oct 2024 20:11:15 +1300
Subject: Restructure the library

The main type of the library is now the BedrockEmulator type, which
contains a new BedrockCore type and an instance of a user-implemented
DeviceBus trait.

This new structure makes it possible to hot-swap a device bus while
a BedrockEmulator is running, which keeps the core and the device bus
well separated. This was important when bedrock-pc was going to have
two graphical emulator types and upgrade from one to the other once
the screen device was accessed.

The new structure also vastly simplifies the code previously required
with the old Bedrock type, which was parametric over 16 device types
and so needed each device type to be enumerated in every place the
Bedrock type was stored. The new BedrockEmulator type is only
parametric over the particular DeviceBus implementation.
---
 src/bedrock.rs | 22 ----------------------
 1 file changed, 22 deletions(-)
 delete mode 100644 src/bedrock.rs

(limited to 'src/bedrock.rs')

diff --git a/src/bedrock.rs b/src/bedrock.rs
deleted file mode 100644
index 8d03e12..0000000
--- a/src/bedrock.rs
+++ /dev/null
@@ -1,22 +0,0 @@
-use crate::*;
-
-
-pub struct Bedrock<D0,D1,D2,D3,D4,D5,D6,D7,D8,D9,DA,DB,DC,DD,DE,DF> {
-    pub mem: ProgramMemory,
-    pub wst: Stack,
-    pub rst: Stack,
-    pub dev: DeviceBus<D0,D1,D2,D3,D4,D5,D6,D7,D8,D9,DA,DB,DC,DD,DE,DF>,
-    pub cyc: usize,
-}
-
-impl<D0,D1,D2,D3,D4,D5,D6,D7,D8,D9,DA,DB,DC,DD,DE,DF> Bedrock<D0,D1,D2,D3,D4,D5,D6,D7,D8,D9,DA,DB,DC,DD,DE,DF> {
-    pub fn new(device_bus: DeviceBus<D0,D1,D2,D3,D4,D5,D6,D7,D8,D9,DA,DB,DC,DD,DE,DF>) -> Self {
-        Self {
-            mem: ProgramMemory::new(),
-            wst: Stack::new(),
-            rst: Stack::new(),
-            dev: device_bus,
-            cyc: 0,
-        }
-    }
-}
-- 
cgit v1.2.3-70-g09d2