diff --git a/Machines/ZX8081/Video.cpp b/Machines/ZX8081/Video.cpp index 5531e7dee..766c6a1f6 100644 --- a/Machines/ZX8081/Video.cpp +++ b/Machines/ZX8081/Video.cpp @@ -29,9 +29,9 @@ Video::Video() : crt_->set_visible_area(Outputs::CRT::Rect(0.1f, 0.1f, 0.8f, 0.8f)); } -void Video::run_for_cycles(int number_of_cycles) { +void Video::run_for(const HalfCycles &half_cycles) { // Just keep a running total of the amount of time that remains owed to the CRT. - cycles_since_update_ += (unsigned int)number_of_cycles << 1; + cycles_since_update_ += (unsigned int)int(half_cycles); } void Video::flush() { diff --git a/Machines/ZX8081/Video.hpp b/Machines/ZX8081/Video.hpp index 9c63021ba..9ae254b8d 100644 --- a/Machines/ZX8081/Video.hpp +++ b/Machines/ZX8081/Video.hpp @@ -10,6 +10,7 @@ #define Machines_ZX8081_Video_hpp #include "../../Outputs/CRT/CRT.hpp" +#include "../../Components/ClockReceiver.hpp" namespace ZX8081 { @@ -23,15 +24,15 @@ namespace ZX8081 { a 1-bit graphic and output over the next 4 cycles, picking between the white level and the black level. */ -class Video { +class Video: public ClockReceiver