mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-22 12:33:29 +00:00
Ensure Yamaha refresh program is used.
This commit is contained in:
parent
2744a9b6b0
commit
8567c934b1
@ -300,13 +300,22 @@ void TMS9918<personality>::run_for(const HalfCycles cycles) {
|
||||
break;
|
||||
}
|
||||
|
||||
if(
|
||||
const bool is_refresh =
|
||||
(this->screen_mode_ == ScreenMode::Blank) ||
|
||||
this->is_vertical_blank())
|
||||
next_line_buffer.line_mode = LineMode::Refresh;
|
||||
this->is_vertical_blank();
|
||||
|
||||
// TODO: an actual sprites-enabled flag.
|
||||
Storage<personality>::begin_line(this->screen_mode_, next_line_buffer.line_mode == LineMode::Refresh, false);
|
||||
Storage<personality>::begin_line(this->screen_mode_, is_refresh, false);
|
||||
|
||||
if(is_refresh) {
|
||||
// The Yamaha handles refresh lines via its own microprogram; other VDPs
|
||||
// can fall back on the regular refresh mechanic.
|
||||
if constexpr (is_yamaha_vdp(personality)) {
|
||||
next_line_buffer.line_mode = LineMode::Yamaha;
|
||||
} else {
|
||||
next_line_buffer.line_mode = LineMode::Refresh;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -223,6 +223,14 @@ template <Personality personality> struct Storage<personality, std::enable_if_t<
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// Seed to _something_ meaningful.
|
||||
//
|
||||
// TODO: this is a workaround [/hack], in effect, for the main TMS' habit of starting
|
||||
// in a randomised position, which means that start-of-line isn't announced.
|
||||
//
|
||||
// Do I really want that behaviour?
|
||||
next_event_ = refresh_events;
|
||||
}
|
||||
|
||||
private:
|
||||
|
Loading…
Reference in New Issue
Block a user