Compare commits

...

2 Commits

2 changed files with 1 additions and 12 deletions

View File

@ -44,10 +44,8 @@ impl BusIo for Apu {
0x17 => self.ch2.envelope(), 0x17 => self.ch2.envelope(),
0x19 => self.ch2.freq_hi(), 0x19 => self.ch2.freq_hi(),
0x1A => self.ch3.enabled(), 0x1A => self.ch3.enabled(),
0x1B => self.ch3.len(),
0x1C => self.ch3.volume(), 0x1C => self.ch3.volume(),
0x1E => self.ch3.freq_hi(), 0x1E => self.ch3.freq_hi(),
0x20 => self.ch4.len(),
0x21 => self.ch4.envelope(), 0x21 => self.ch4.envelope(),
0x22 => self.ch4.poly(), 0x22 => self.ch4.poly(),
0x23 => self.ch4.frequency(), 0x23 => self.ch4.frequency(),
@ -691,11 +689,6 @@ impl Channel3 {
self.enabled = (byte >> 7) & 0x01 == 0x01; self.enabled = (byte >> 7) & 0x01 == 0x01;
} }
/// 0xFF1B | NR31 - Sound Length
pub(crate) fn len(&self) -> u8 {
self.len | 0xFF
}
/// 0xFF1B | NR31 - Sound Length /// 0xFF1B | NR31 - Sound Length
pub(crate) fn set_len(&mut self, byte: u8) { pub(crate) fn set_len(&mut self, byte: u8) {
self.len = byte; self.len = byte;
@ -806,11 +799,6 @@ pub(crate) struct Channel4 {
} }
impl Channel4 { impl Channel4 {
/// 0xFF20 | NR41 - Channel 4 Sound Length
pub(crate) fn len(&self) -> u8 {
self.len | 0xFF
}
/// 0xFF20 | NR41 - Channel 4 Sound Length /// 0xFF20 | NR41 - Channel 4 Sound Length
pub(crate) fn set_len(&mut self, byte: u8) { pub(crate) fn set_len(&mut self, byte: u8) {
self.len = byte & 0x3F; self.len = byte & 0x3F;

View File

@ -12,6 +12,7 @@ use crate::bus::BusIo;
use crate::cpu::{Cpu, Flags, HaltState, ImeState, Register as CpuRegister, RegisterPair}; use crate::cpu::{Cpu, Flags, HaltState, ImeState, Register as CpuRegister, RegisterPair};
#[allow(clippy::upper_case_acronyms)] #[allow(clippy::upper_case_acronyms)]
#[derive(Clone, Copy)]
pub(crate) enum Instruction { pub(crate) enum Instruction {
NOP, NOP,
STOP, STOP,