1
0
mirror of https://github.com/TomHarte/CLK.git synced 2026-04-20 10:17:05 +00:00

Adopt painful pulse test, temporarily (?).

This commit is contained in:
Thomas Harte
2025-11-11 18:26:00 -05:00
parent 37152a1fad
commit 735afcfabb
2 changed files with 9 additions and 2 deletions
+4 -1
View File
@@ -39,7 +39,10 @@ void SID::write(const Numeric::SizedInt<5> address, const uint8_t value) {
// The top bit of the phase counter is inverted; since it'll be compared directly with the
// pulse width, invert that bit too.
oscillator().pulse_width =
((oscillator().pitch & 0x0f'f0'00'00) | uint32_t(value << 28)) ^ 0x8000'0000;
(
(oscillator().pitch & 0x0f'f0'00'00) |
uint32_t(value << 28)
) ^ 0x8000'0000;
break;
case 0x04: case 0x0b: case 0x12:
voice().set_control(value);