This commit is contained in:
2025-07-22 15:51:21 -04:00
parent d5efabdd36
commit b40c3c503f
8 changed files with 122 additions and 36 deletions
+27
View File
@@ -0,0 +1,27 @@
use std::collections::BTreeMap;
use crate::computers::ram_rom::RamRomComputer;
use crate::traits::bus_device::BusDevice;
impl RamRomComputer {
pub fn tick2(&mut self, address: u16, control: u8, data: u8) -> (u8) {
println!("RAM ROM Computer tick starting");
// tick the parts
let (_, new_data) = self.rom.tick(address, data, control == 1);
let (_, new_data2) = self.ram.tick(address, data, control == 1, true);
// map of memory
// 0x0000 -> 0x3fff -> RAM (HM62256)
// 0x4000 -> 0x7fff -> ROM (At28C256)
match address {
0x0000..=0x3fff => {
self.data_bus = new_data
}
0x4000 ..=0x7fff => {
self.data_bus = new_data2
}
_ => {}
};
0
}
}