mirror of
https://github.com/TomHarte/CLK.git
synced 2025-01-14 13:33:42 +00:00
Merge pull request #188 from TomHarte/AYFidelity
Switches to guessing that the AY doesn't reset its dividers upon frequency changes
This commit is contained in:
commit
1e4f9d4eda
@ -188,23 +188,23 @@ void AY38910::set_register_value(uint8_t value) {
|
|||||||
tone_periods_[channel] = (tone_periods_[channel] & 0xff) | (uint16_t)((value&0xf) << 8);
|
tone_periods_[channel] = (tone_periods_[channel] & 0xff) | (uint16_t)((value&0xf) << 8);
|
||||||
else
|
else
|
||||||
tone_periods_[channel] = (tone_periods_[channel] & ~0xff) | value;
|
tone_periods_[channel] = (tone_periods_[channel] & ~0xff) | value;
|
||||||
tone_counters_[channel] = tone_periods_[channel];
|
// tone_counters_[channel] = tone_periods_[channel];
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 6:
|
case 6:
|
||||||
noise_period_ = value & 0x1f;
|
noise_period_ = value & 0x1f;
|
||||||
noise_counter_ = noise_period_;
|
// noise_counter_ = noise_period_;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 11:
|
case 11:
|
||||||
envelope_period_ = (envelope_period_ & ~0xff) | value;
|
envelope_period_ = (envelope_period_ & ~0xff) | value;
|
||||||
envelope_divider_ = envelope_period_;
|
// envelope_divider_ = envelope_period_;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 12:
|
case 12:
|
||||||
envelope_period_ = (envelope_period_ & 0xff) | (int)(value << 8);
|
envelope_period_ = (envelope_period_ & 0xff) | (int)(value << 8);
|
||||||
envelope_divider_ = envelope_period_;
|
// envelope_divider_ = envelope_period_;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 13:
|
case 13:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user