closer to being able to run a cycle?

This commit is contained in:
2025-06-30 07:17:17 -04:00
parent 0c475127f6
commit 8ed93fc90e
11 changed files with 199 additions and 20 deletions
+2
View File
@@ -24,6 +24,8 @@ impl BenEaterPC {
// tick the clock.
// tick the memory
// tick the VIA
} else {
self.cpu.tick();
}
}
}
+16 -2
View File
@@ -1,5 +1,12 @@
pub enum Via6522Port {
A(u8),
B(u8)
}
#[derive(Default)]
pub struct Via6522 {
data_bus: u8,
address_bus: u16,
port_a_state: u8,
port_b_data: u8,
port_a_direction: u8,
@@ -15,8 +22,15 @@ impl Via6522 {
}
}
pub fn set_a_direction(&mut self, new_direction: u8) {
pub fn set_port_direction(&mut self, port: Via6522Port) {
match port {
Via6522Port::A(x) => {
self.port_a_direction = x;
},
Via6522Port::B(x) => {
self.port_b_direction = x;
}
}
}
/// check for output pins and see what they say