aboutsummaryrefslogtreecommitdiff
path: root/src/mmio.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/mmio.rs')
-rw-r--r--src/mmio.rs9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mmio.rs b/src/mmio.rs
index d9f2a5a..8c8739f 100644
--- a/src/mmio.rs
+++ b/src/mmio.rs
@@ -1,10 +1,11 @@
use crate::io::{Audio, Serial};
use crate::state::Memory;
+use crate::logs::{log, LogLevel};
impl<S: Serial, A: Audio> Memory<S, A> {
pub fn r_io(&self, addr: u8) -> u8 {
if addr > 0x50 {
- println!("Reading from 0xff{:02x} not implemented yet", addr);
+ log(LogLevel::Debug, format!("Reading from 0xff{:02x} not implemented yet", addr));
}
match addr {
0x00 => {
@@ -55,7 +56,7 @@ impl<S: Serial, A: Audio> Memory<S, A> {
}
}
_ => {
- println!("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]
}
}
@@ -295,10 +296,10 @@ impl<S: Serial, A: Audio> Memory<S, A> {
}
_ => {
if addr != 0x25 && addr != 0x24 && addr != 0x26 && addr < 0x30 && addr > 0x3f {
- println!(
+ log(LogLevel::Debug, format!(
"Writing to 0xff{:02x} not implemented yet ({:02x})",
addr, value
- );
+ ));
}
}
}