1
0
mirror of https://github.com/TomHarte/CLK.git synced 2026-04-26 03:29:40 +00:00

Keep three least bits.

This commit is contained in:
Thomas Harte
2025-01-12 22:07:56 -05:00
parent 972619c1fe
commit 1b1a0f553d
+2 -2
View File
@@ -167,8 +167,8 @@ public:
case 0xff1d: vertical_counter_ = (vertical_counter_ & 0xff00) | value; break;
case 0xff1e:
// TODO: possibly should be deferred, if falling out of phase?
horizontal_counter_ = (horizontal_counter_ & 0x03) | ((~value << 1) & ~0x3);
horizontal_counter_ &= 511;
horizontal_counter_ = (horizontal_counter_ & 0x07) | ((~value << 1) & ~0x07);
horizontal_counter_ &= 0x1ff;
break;
case 0xff1f:
vertical_sub_count_ = value & 0x7;