diff --git a/Machines/Oric/Video.cpp b/Machines/Oric/Video.cpp index b14aab6b1..69016395c 100644 --- a/Machines/Oric/Video.cpp +++ b/Machines/Oric/Video.cpp @@ -111,6 +111,10 @@ void VideoOutput::set_colour_rom(const std::vector &rom) { // } } +bool VideoOutput::vsync() { + return counter_ >= v_sync_start_position_ && counter_ < v_sync_end_position_; +} + void VideoOutput::run_for(const Cycles cycles) { // Horizontal: 0-39: pixels; otherwise blank; 48-53 sync, 54-56 colour burst. // Vertical: 0-223: pixels; otherwise blank; 256-259 (50Hz) or 234-238 (60Hz) sync. @@ -123,7 +127,7 @@ void VideoOutput::run_for(const Cycles cycles) { int h_counter = counter_ & 63; int cycles_run_for = 0; - if(counter_ >= v_sync_start_position_ && counter_ < v_sync_end_position_) { + if(vsync()) { // this is a sync line cycles_run_for = v_sync_end_position_ - counter_; clamp(crt_.output_sync((v_sync_end_position_ - v_sync_start_position_) * 6)); diff --git a/Machines/Oric/Video.hpp b/Machines/Oric/Video.hpp index 165c10e83..e00a16d69 100644 --- a/Machines/Oric/Video.hpp +++ b/Machines/Oric/Video.hpp @@ -24,6 +24,8 @@ class VideoOutput { void run_for(const Cycles cycles); + bool vsync(); + void set_scan_target(Outputs::Display::ScanTarget *scan_target); void set_display_type(Outputs::Display::DisplayType display_type); Outputs::Display::DisplayType get_display_type() const;