fix(apu): disable APU writes when APU is disabled

This commit is contained in:
2022-11-26 12:20:42 -04:00
parent 002e33b48b
commit 46e29245b7
11 changed files with 172 additions and 105 deletions

View File

@@ -6,6 +6,10 @@ pub fn create() Self {
return .{ .timer = 0 };
}
pub fn reset(self: *Self) void {
self.timer = 0;
}
pub fn tick(self: *Self, enabled: bool, ch_enable: *bool) void {
if (enabled) {
if (self.timer == 0) return;