mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-29 12:50:28 +00:00
Merge pull request #1316 from TomHarte/SMSScrolling
This commit is contained in:
commit
981f8a9aac
@ -222,13 +222,13 @@ void TMS9918<personality>::run_for(const HalfCycles cycles) {
|
|||||||
// Latch scrolling position, if necessary.
|
// Latch scrolling position, if necessary.
|
||||||
// ---------------------------------------
|
// ---------------------------------------
|
||||||
if constexpr (is_sega_vdp(personality)) {
|
if constexpr (is_sega_vdp(personality)) {
|
||||||
if(!this->fetch_pointer_.row) {
|
// TODO: where did this magic constant come from? https://www.smspower.org/forums/17970-RoadRashHow#111000 mentioned in passing
|
||||||
// TODO: where did this magic constant come from? https://www.smspower.org/forums/17970-RoadRashHow#111000 mentioned in passing
|
// that "the vertical scroll register is latched at the start of the active display" and this is two clocks before that, so it's
|
||||||
// that "the vertical scroll register is latched at the start of the active display" and this is two clocks before that, so it's
|
// not uncompelling. I can just no longer find my source.
|
||||||
// not uncompelling. I can just no longer find my source.
|
constexpr auto latch_time = LineLayout<personality>::EndOfLeftBorder - 2;
|
||||||
constexpr auto latch_time = LineLayout<personality>::EndOfLeftBorder - 2;
|
static_assert(latch_time > 0);
|
||||||
static_assert(latch_time > 0);
|
if(this->fetch_pointer_.column < latch_time && end_column >= latch_time) {
|
||||||
if(this->fetch_pointer_.column < latch_time && end_column >= latch_time) {
|
if(!this->fetch_pointer_.row) {
|
||||||
Storage<personality>::latched_vertical_scroll_ = Storage<personality>::vertical_scroll_;
|
Storage<personality>::latched_vertical_scroll_ = Storage<personality>::vertical_scroll_;
|
||||||
|
|
||||||
if(Storage<personality>::mode4_enable_) {
|
if(Storage<personality>::mode4_enable_) {
|
||||||
|
Loading…
Reference in New Issue
Block a user