1
0
mirror of https://github.com/TomHarte/CLK.git synced 2025-04-03 22:29:36 +00:00

Subjectively, this might be more correct. It definitely prevents intermediate frequencies. More research required.

This commit is contained in:
Thomas Harte 2017-08-08 17:58:35 -04:00
parent a7452aebff
commit e3d1f4fe1e

@ -188,23 +188,23 @@ void AY38910::set_register_value(uint8_t value) {
tone_periods_[channel] = (tone_periods_[channel] & 0xff) | (uint16_t)((value&0xf) << 8);
else
tone_periods_[channel] = (tone_periods_[channel] & ~0xff) | value;
tone_counters_[channel] = tone_periods_[channel];
// tone_counters_[channel] = tone_periods_[channel];
}
break;
case 6:
noise_period_ = value & 0x1f;
noise_counter_ = noise_period_;
// noise_counter_ = noise_period_;
break;
case 11:
envelope_period_ = (envelope_period_ & ~0xff) | value;
envelope_divider_ = envelope_period_;
// envelope_divider_ = envelope_period_;
break;
case 12:
envelope_period_ = (envelope_period_ & 0xff) | (int)(value << 8);
envelope_divider_ = envelope_period_;
// envelope_divider_ = envelope_period_;
break;
case 13: