1
0
mirror of https://github.com/TomHarte/CLK.git synced 2025-08-15 14:27:29 +00:00

Experimental: is this meant to be a compare-before-increment?

This commit is contained in:
Thomas Harte
2017-08-07 23:02:29 -04:00
parent d73dcbb268
commit 46278ff297

View File

@@ -96,6 +96,8 @@ template <class T> class CRTC6845 {
if(bus_state_.row_address == registers_[9]) { if(bus_state_.row_address == registers_[9]) {
line_address_ = bus_state_.refresh_address; line_address_ = bus_state_.refresh_address;
bus_state_.row_address = 0; bus_state_.row_address = 0;
bool is_at_end_of_frame = line_counter_ == registers_[4];
line_counter_++; line_counter_++;
// check for end of visible lines // check for end of visible lines
@@ -111,7 +113,7 @@ template <class T> class CRTC6845 {
} }
// check for entry into the overflow area // check for entry into the overflow area
if(line_counter_ == registers_[4]) { if(is_at_end_of_frame) {
if(registers_[5]) { if(registers_[5]) {
is_in_adjustment_period_ = true; is_in_adjustment_period_ = true;
} else { } else {