Files
byte-pusher-emu/src/misc/emulator_error.rs
2024-02-18 22:03:21 +05:30

26 lines
341 B
Rust

use std::fmt::Debug;
#[derive(Debug, Copy, Clone)]
pub enum DeviceType {
CPU,
RAM,
MMU,
/// Program counter
PC,
KEYBOARD,
AUDIO,
GRAPHICS,
}
#[derive(Debug, Clone)]
pub enum EmulatorError {
AllocationFailure(DeviceType, &'static str),
UnreachableMemory(DeviceType, u32),
InvalidColor(u8)
}