1pub mod api; 2pub mod apu; 3mod audio; 4mod bus; 5mod cartridge; 6mod cgb; 7mod dma; 8pub mod graphics; 9pub mod inputs; 10mod interrupts; 11mod memory; 12mod ppu; 13mod serial; 14mod sm83; 15mod timer; 16 17use bincode::{Decode, Encode}; 18use std::fmt::{Display, Formatter}; 19 20#[derive(Debug, Clone, Copy, PartialEq, Eq, Encode, Decode)] 21enum HardwareMode { 22 // Game Boy 23 Dmg, 24 // Game Boy Color 25 Cgb, 26} 27 28impl Display for HardwareMode { 29 fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { 30 match self { 31 Self::Dmg => write!(f, "DMG"), 32 Self::Cgb => write!(f, "CGB"), 33 } 34 } 35}