diff --git a/src/apu.rs b/src/apu.rs index 649aef418e99a0eb0e88426115c8f287a47f289f..1b86fa5ef43c942338d1ab2f746b2c53d5093eff 100644 --- a/src/apu.rs +++ b/src/apu.rs @@ -353,7 +353,7 @@ impl Apu { // 0xFF15 — Not used 0xff15 => 0xff, // 0xFF16 — NR21: Channel 2 length timer & duty cycle - 0xff16 => (self.ch2_wave_duty & 0x03) << 6 | 0x3f, + 0xff16 => ((self.ch2_wave_duty & 0x03) << 6) | 0x3f, // 0xFF17 — NR22: Channel 2 volume & envelope 0xff17 => { (self.ch2_pace & 0x07)