Skip to content

Commit

Permalink
Ignore Wave RAM writes when DAC disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
IsaacMarovitz committed Jan 4, 2024
1 parent f6e4fc8 commit a67a3bf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/sound/sc3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,11 @@ impl Memory for SC3 {
self.period &= 0b0000_0000_1111_1111;
self.period |= ((v & 0b0000_0111) as u16) << 8;
},
0xFF30..=0xFF3F => self.wave_ram[a as usize - 0xFF30] = v,
0xFF30..=0xFF3F => {
if !self.dac_enabled {
self.wave_ram[a as usize - 0xFF30] = v;
}
},
_ => panic!("Write to unsupported SC3 address ({:#06x})!", a),
}
}
Expand Down

0 comments on commit a67a3bf

Please sign in to comment.