From 0f38e89312fda77de1b12ddc8800ce7f832b5497 Mon Sep 17 00:00:00 2001 From: Alex Janka Date: Mon, 20 Feb 2023 10:01:32 +1100 Subject: [PATCH] pulse channel control register empty bits are high rather than low --- src/processor/memory/mmio/apu/channels.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/processor/memory/mmio/apu/channels.rs b/src/processor/memory/mmio/apu/channels.rs index afd98c0..f18d483 100644 --- a/src/processor/memory/mmio/apu/channels.rs +++ b/src/processor/memory/mmio/apu/channels.rs @@ -268,7 +268,7 @@ impl PwmChannel { } pub(super) fn get_control(&self) -> u8 { - set_or_clear_bit(0, 6, self.length_enable) + set_or_clear_bit(0xFF, 6, self.length_enable) } fn set_wave_timer(&mut self) {