Merge branch 'master' of pterpstra.com:m68k-backplane-computer/emu
This commit is contained in:
commit
a31f0eb1ab
@ -149,7 +149,6 @@ pub trait Mmu: Debug {
|
|||||||
) -> NullableResult<u32, BusError>;
|
) -> NullableResult<u32, BusError>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[allow(dead_code)]
|
||||||
pub const fn u64_set_be_byte(val: u64, idx: u8, byte: u8) -> u64 {
|
pub const fn u64_set_be_byte(val: u64, idx: u8, byte: u8) -> u64 {
|
||||||
let mut bytes = val.to_be_bytes();
|
let mut bytes = val.to_be_bytes();
|
||||||
|
22
src/mmu.rs
22
src/mmu.rs
@ -164,32 +164,28 @@ impl Card for MmuCard {
|
|||||||
impl Display for MmuCard {
|
impl Display for MmuCard {
|
||||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
let q1 = if self.map_frames_enabled[0] {
|
let q1 = if self.map_frames_enabled[0] {
|
||||||
Some(self.map_frames[0])
|
format!("{:#x}", self.map_frames[0])
|
||||||
} else {
|
} else {
|
||||||
None
|
"disabled".to_string()
|
||||||
};
|
};
|
||||||
let q2 = if self.map_frames_enabled[1] {
|
let q2 = if self.map_frames_enabled[1] {
|
||||||
Some(self.map_frames[1])
|
format!("{:#x}", self.map_frames[1])
|
||||||
} else {
|
} else {
|
||||||
None
|
"disabled".to_string()
|
||||||
};
|
};
|
||||||
let q3 = if self.map_frames_enabled[2] {
|
let q3 = if self.map_frames_enabled[2] {
|
||||||
Some(self.map_frames[2])
|
format!("{:#x}", self.map_frames[2])
|
||||||
} else {
|
} else {
|
||||||
None
|
"disabled".to_string()
|
||||||
};
|
};
|
||||||
let q4 = if self.map_frames_enabled[3] {
|
let q4 = if self.map_frames_enabled[3] {
|
||||||
Some(self.map_frames[3])
|
format!("{:#x}", self.map_frames[3])
|
||||||
} else {
|
} else {
|
||||||
None
|
"disabled".to_string()
|
||||||
};
|
};
|
||||||
f.write_fmt(format_args!(
|
f.write_fmt(format_args!(
|
||||||
"MMU card, {} (Q1: {:?}, Q2: {:?}, Q3: {:?}, Q4: {:?})",
|
"MMU card, {} (Q1: {q1}, Q2: {q2}, Q3: {q3}, Q4: {q4})",
|
||||||
if self.enabled { "enabled" } else { "disabled" },
|
if self.enabled { "enabled" } else { "disabled" },
|
||||||
q1,
|
|
||||||
q2,
|
|
||||||
q3,
|
|
||||||
q4
|
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user