chore(snd): mask unreadable bits from return values

This commit is contained in:
2021-07-09 21:16:33 -05:00
parent 40ca0abb72
commit 91d19a7e66
3 changed files with 30 additions and 15 deletions

View File

@@ -338,16 +338,16 @@ impl BusIo for Bus {
0x10 => self.snd.ch1.sweep = byte.into(),
0x11 => self.snd.ch1.set_duty(byte),
0x12 => self.snd.ch1.envelope = byte.into(),
0x13 => self.snd.ch1.freq_lo = byte,
0x13 => self.snd.ch1.set_freq_lo(byte),
0x14 => self.snd.ch1.set_freq_hi(byte),
0x16 => self.snd.ch2.set_duty(byte),
0x17 => self.snd.ch2.envelope = byte.into(),
0x18 => self.snd.ch2.freq_lo = byte,
0x18 => self.snd.ch2.set_freq_lo(byte),
0x19 => self.snd.ch2.set_freq_hi(byte),
0x1A => self.snd.ch3.set_enabled(byte),
0x1B => self.snd.ch3.set_len(byte),
0x1C => self.snd.ch3.set_volume(byte),
0x1D => self.snd.ch3.freq_lo = byte,
0x1D => self.snd.ch3.set_freq_lo(byte),
0x1E => self.snd.ch3.set_freq_hi(byte),
0x20 => self.snd.ch4.set_len(byte),
0x21 => self.snd.ch4.envelope = byte.into(),