1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-06-25 18:30:07 +00:00

Eliminate data-type assumption.

This commit is contained in:
Thomas Harte 2023-03-10 21:04:35 -05:00
parent c9124f13cd
commit da944fde92

View File

@ -261,10 +261,11 @@ void TMS9918<personality>::run_for(const HalfCycles cycles) {
// It is otherwise decremented.
if constexpr (is_sega_vdp(personality)) {
if(this->fetch_pointer_.row >= 0 && this->fetch_pointer_.row <= this->mode_timing_.pixel_lines) {
--this->line_interrupt_counter_;
if(this->line_interrupt_counter_ == 0xff) {
if(!this->line_interrupt_counter_) {
this->line_interrupt_pending_ = true;
this->line_interrupt_counter_ = this->line_interrupt_target_;
} else {
--this->line_interrupt_counter_;
}
} else {
this->line_interrupt_counter_ = this->line_interrupt_target_;