mirror of
https://github.com/TomHarte/CLK.git
synced 2025-08-15 14:27:29 +00:00
Imposed counter size limits.
This commit is contained in:
@@ -104,7 +104,7 @@ template <class T> class CRTC6845 {
|
|||||||
bus_state_.row_address = 0;
|
bus_state_.row_address = 0;
|
||||||
|
|
||||||
bool is_at_end_of_frame = line_counter_ == registers_[4];
|
bool is_at_end_of_frame = line_counter_ == registers_[4];
|
||||||
line_counter_++;
|
line_counter_ = (line_counter_ + 1) & 0x7f;
|
||||||
|
|
||||||
// check for end of visible lines
|
// check for end of visible lines
|
||||||
if(line_counter_ == registers_[6]) {
|
if(line_counter_ == registers_[6]) {
|
||||||
@@ -131,7 +131,7 @@ template <class T> class CRTC6845 {
|
|||||||
line_counter_ = 0;
|
line_counter_ = 0;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
bus_state_.row_address++;
|
bus_state_.row_address = (bus_state_.row_address + 1) & 0x1f;
|
||||||
}
|
}
|
||||||
bus_state_.refresh_address = line_address_;
|
bus_state_.refresh_address = line_address_;
|
||||||
}
|
}
|
||||||
@@ -141,6 +141,7 @@ template <class T> class CRTC6845 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bus_state_.display_enable = character_is_visible_ && line_is_visible_;
|
bus_state_.display_enable = character_is_visible_ && line_is_visible_;
|
||||||
|
bus_state_.refresh_address &= 0x3fff;
|
||||||
bus_handler_.perform_bus_cycle(bus_state_);
|
bus_handler_.perform_bus_cycle(bus_state_);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user