1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-11-29 12:50:28 +00:00

Corrects tone frequency.

This commit is contained in:
Thomas Harte 2021-06-26 23:51:43 -04:00
parent fcd267a3f9
commit f8b7c59616

View File

@ -21,7 +21,7 @@ void Dave::write(uint16_t address, uint8_t value) {
channels_[address >> 1].reload = (channels_[address >> 1].reload & 0xff00) | value; channels_[address >> 1].reload = (channels_[address >> 1].reload & 0xff00) | value;
break; break;
case 1: case 3: case 5: case 1: case 3: case 5:
channels_[address >> 1].reload = uint16_t((channels_[address >> 1].reload & 0x00ff) | ((value & 0xf) << 4)); channels_[address >> 1].reload = uint16_t((channels_[address >> 1].reload & 0x00ff) | ((value & 0xf) << 8));
channels_[address >> 1].distortion = Channel::Distortion((value >> 4)&3); channels_[address >> 1].distortion = Channel::Distortion((value >> 4)&3);
channels_[address >> 1].high_pass = value & 0x40; channels_[address >> 1].high_pass = value & 0x40;
channels_[address >> 1].ring_modulate = value & 0x80; channels_[address >> 1].ring_modulate = value & 0x80;