[???] Lots of work
Cleanup un-needed elements, simplify memory management
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
use std::array::TryFromSliceError;
|
||||
use std::fmt::Debug;
|
||||
|
||||
#[derive(Debug, Copy, Clone)]
|
||||
@@ -16,10 +17,16 @@ pub enum DeviceType {
|
||||
pub enum EmulatorError {
|
||||
AllocationFailure(DeviceType, &'static str),
|
||||
UnreachableMemory(DeviceType, u32),
|
||||
InvalidColor(u8)
|
||||
InvalidColor(u8),
|
||||
OtherError(String)
|
||||
}
|
||||
|
||||
impl From<TryFromSliceError> for EmulatorError{
|
||||
fn from(value: TryFromSliceError) -> Self {
|
||||
EmulatorError::UnreachableMemory(DeviceType::RAM,0x5a5a)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user