2026-02-07 update
Some checks failed
Cargo Build & Test / Rust project - latest (stable) (push) Failing after 8s

This commit is contained in:
2026-02-07 04:52:13 -06:00
parent 825e245df1
commit 22c586f15a
15 changed files with 1062 additions and 162 deletions

View File

@@ -160,6 +160,11 @@ impl APU {
},
}
}
pub fn reset(&mut self) {
*self = Self::init();
}
pub fn read_reg(&mut self, offset: u16) -> u8 {
// println!("APU read: {offset:02X}");
match offset {
@@ -177,6 +182,7 @@ impl APU {
_ => panic!("No register at {:X}", offset),
}
}
pub fn write_reg(&mut self, offset: u16, val: u8) {
// println!("APU write: {offset:02X} <= {val:02X}");
match offset {
@@ -238,6 +244,7 @@ impl APU {
self.pulse_1.q_frame_clock();
self.pulse_2.q_frame_clock(); // TODO: clock all
}
fn h_frame_clock(&mut self) {
self.pulse_1.q_frame_clock();
self.pulse_1.h_frame_clock();
@@ -271,15 +278,19 @@ impl APU {
}
false
}
pub fn peek_nmi(&self) -> bool {
false
}
pub fn nmi_waiting(&mut self) -> bool {
false
}
pub fn peek_irq(&self) -> bool {
self.frame_counter.irq
}
pub fn irq_waiting(&mut self) -> bool {
self.frame_counter.irq
}