diff options
Diffstat (limited to 'src/mmio.rs')
-rw-r--r-- | src/mmio.rs | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/src/mmio.rs b/src/mmio.rs index 8c8739f..9c7e710 100644 --- a/src/mmio.rs +++ b/src/mmio.rs @@ -1,11 +1,14 @@ use crate::io::{Audio, Serial}; -use crate::state::Memory; use crate::logs::{log, LogLevel}; +use crate::state::Memory; impl<S: Serial, A: Audio> Memory<S, A> { pub fn r_io(&self, addr: u8) -> u8 { if addr > 0x50 { - log(LogLevel::Debug, format!("Reading from 0xff{:02x} not implemented yet", addr)); + log( + LogLevel::Debug, + format!("Reading from 0xff{:02x} not implemented yet", addr), + ); } match addr { 0x00 => { @@ -56,7 +59,10 @@ impl<S: Serial, A: Audio> Memory<S, A> { } } _ => { - log(LogLevel::Debug, format!("Reading from 0xff{:02x} not implemented yet", addr)); + log( + LogLevel::Debug, + format!("Reading from 0xff{:02x} not implemented yet", addr), + ); self.io[addr as usize] } } @@ -296,10 +302,13 @@ impl<S: Serial, A: Audio> Memory<S, A> { } _ => { if addr != 0x25 && addr != 0x24 && addr != 0x26 && addr < 0x30 && addr > 0x3f { - log(LogLevel::Debug, format!( - "Writing to 0xff{:02x} not implemented yet ({:02x})", - addr, value - )); + log( + LogLevel::Debug, + format!( + "Writing to 0xff{:02x} not implemented yet ({:02x})", + addr, value + ), + ); } } } |