2019-12-17 04:06:00 +00:00
|
|
|
pub struct DMC {
|
|
|
|
pub sample: u16,
|
|
|
|
pub enabled: bool,
|
|
|
|
pub interrupt: bool,
|
|
|
|
pub length_counter: usize,
|
|
|
|
pub bytes_remaining: usize,
|
|
|
|
}
|
|
|
|
|
|
|
|
impl DMC {
|
2019-11-27 01:11:51 +00:00
|
|
|
pub fn new() -> Self {
|
2019-12-17 04:06:00 +00:00
|
|
|
DMC {
|
2019-12-05 02:57:05 +00:00
|
|
|
sample: 0,
|
2019-12-15 00:15:06 +00:00
|
|
|
enabled: false,
|
|
|
|
interrupt: false,
|
2020-01-15 02:51:59 +00:00
|
|
|
bytes_remaining: 0,
|
2019-12-15 00:15:06 +00:00
|
|
|
length_counter: 0,
|
2019-11-27 01:11:51 +00:00
|
|
|
}
|
|
|
|
}
|
2019-12-05 02:57:05 +00:00
|
|
|
|
2019-12-26 03:51:54 +00:00
|
|
|
pub fn clock(&mut self) {
|
2020-01-30 06:00:12 +00:00
|
|
|
|
2019-12-26 03:51:54 +00:00
|
|
|
}
|
2020-01-30 06:00:12 +00:00
|
|
|
|
2019-12-22 00:02:32 +00:00
|
|
|
pub fn write_control(&mut self, value: u8) {
|
2020-01-30 06:00:12 +00:00
|
|
|
|
2019-12-05 02:57:05 +00:00
|
|
|
}
|
2020-01-30 06:00:12 +00:00
|
|
|
|
2019-12-05 02:57:05 +00:00
|
|
|
pub fn direct_load(&mut self, value: u8) {
|
2020-01-30 06:00:12 +00:00
|
|
|
|
2019-12-05 02:57:05 +00:00
|
|
|
}
|
2020-01-30 06:00:12 +00:00
|
|
|
|
2019-12-22 00:02:32 +00:00
|
|
|
pub fn write_sample_address(&mut self, value: u8) {
|
2020-01-30 06:00:12 +00:00
|
|
|
|
2019-12-05 02:57:05 +00:00
|
|
|
}
|
2020-01-30 06:00:12 +00:00
|
|
|
|
2019-12-22 00:02:32 +00:00
|
|
|
pub fn write_sample_length(&mut self, value: u8) {
|
2020-01-30 06:00:12 +00:00
|
|
|
|
2019-12-05 02:57:05 +00:00
|
|
|
}
|
2019-11-27 01:11:51 +00:00
|
|
|
}
|