1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-09-27 18:55:48 +00:00

Switched to post-tests increment. Seems to give proper screen width, but also eliminates that 'compare to +1' step that felt unlikely.

This commit is contained in:
Thomas Harte 2017-08-01 15:19:25 -04:00
parent 6ac7132799
commit ee27e16fb1

View File

@ -41,9 +41,6 @@ template <class T> class CRTC6845 {
}
}
// advance horizontal counter
character_counter_++;
// check for start of horizontal sync
if(character_counter_ == registers_[2]) {
hsync_down_counter_ = registers_[3] & 15;
@ -61,7 +58,7 @@ template <class T> class CRTC6845 {
}
// check for end-of-line
if(character_counter_ == registers_[0]+1) {
if(character_counter_ == registers_[0]) {
character_counter_ = 0;
character_is_visible_ = true;
@ -117,6 +114,9 @@ template <class T> class CRTC6845 {
bus_state_.refresh_address = line_address_;
}
}
} else {
// advance horizontal counter
character_counter_++;
}
bus_state_.display_enable = character_is_visible_ && line_is_visible_;