1
0
mirror of https://github.com/TomHarte/CLK.git synced 2026-04-21 17:16:44 +00:00

Correct shift on hcount write.

This commit is contained in:
Thomas Harte
2025-01-12 21:59:22 -05:00
parent 61086d5360
commit 972619c1fe
+2 -3
View File
@@ -100,8 +100,6 @@ public:
video_mode_ = VideoMode::Text;
}
}
// printf("Mode: %d %d %d -> %d\n", bitmap_mode_, extended_colour_mode_, multicolour_mode_, int(video_mode_));
};
switch(address) {
@@ -169,7 +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_ & 0x07) | ((~value << 2) & 0x1f8);
horizontal_counter_ = (horizontal_counter_ & 0x03) | ((~value << 1) & ~0x3);
horizontal_counter_ &= 511;
break;
case 0xff1f:
vertical_sub_count_ = value & 0x7;