Skip to content

Commit

Permalink
Merge pull request #1456 from TomHarte/CounterSets
Browse files Browse the repository at this point in the history
Correct shift on hcount write.
  • Loading branch information
TomHarte authored Jan 13, 2025
2 parents 61086d5 + 1b1a0f5 commit 733da31
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Machines/Commodore/Plus4/Video.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,6 @@ struct Video {
video_mode_ = VideoMode::Text;
}
}

// printf("Mode: %d %d %d -> %d\n", bitmap_mode_, extended_colour_mode_, multicolour_mode_, int(video_mode_));
};

switch(address) {
Expand Down Expand Up @@ -169,7 +167,8 @@ struct Video {
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_ & 0x07) | ((~value << 1) & ~0x07);
horizontal_counter_ &= 0x1ff;
break;
case 0xff1f:
vertical_sub_count_ = value & 0x7;
Expand Down

0 comments on commit 733da31

Please sign in to comment.