feat: implement 0xff24 sound register

This commit is contained in:
2021-01-17 18:58:57 -06:00
parent 251f4e8d6d
commit 92218a227d
2 changed files with 41 additions and 5 deletions

View File

@@ -101,8 +101,9 @@ impl Bus {
0xFF0F => self.interrupt.flag.into(),
0xFF11 => self.sound.ch1.sound_duty.into(),
0xFF12 => self.sound.ch1.vol_envelope.into(),
0xFF25 => self.sound.select.into(),
0xFF26 => self.sound.status.into(),
0xFF24 => self.sound.control.channel.into(),
0xFF25 => self.sound.control.select.into(),
0xFF26 => self.sound.control.status.into(),
_ => unimplemented!("Unable to read {:#06X} in I/O Registers", addr),
}
}
@@ -162,8 +163,9 @@ impl Bus {
0xFF0F => self.interrupt.flag = byte.into(),
0xFF11 => self.sound.ch1.sound_duty = byte.into(),
0xFF12 => self.sound.ch1.vol_envelope = byte.into(),
0xFF25 => self.sound.select = byte.into(),
0xFF26 => self.sound.status = byte.into(), // FIXME: Should we control which bytes are written to here?
0xFF24 => self.sound.control.channel = byte.into(),
0xFF25 => self.sound.control.select = byte.into(),
0xFF26 => self.sound.control.status = byte.into(), // FIXME: Should we control which bytes are written to here?
_ => unimplemented!("Unable to write to {:#06X} in I/O Registers", addr),
};
}