diff --git a/Machines/Acorn/Electron/Video.cpp b/Machines/Acorn/Electron/Video.cpp index 6c64f598d..ec8f428c7 100644 --- a/Machines/Acorn/Electron/Video.cpp +++ b/Machines/Acorn/Electron/Video.cpp @@ -124,7 +124,11 @@ uint8_t VideoOutput::run_for(const Cycles cycles) { if(vsync_int_ || hsync_int_) { stage = OutputStage::Sync; } else if(in_blank()) { - stage = OutputStage::Blank; + if(h_count_ >= hburst_start && h_count_ < hburst_end) { + stage = OutputStage::ColourBurst; + } else { + stage = OutputStage::Blank; + } } else { stage = OutputStage::Pixels; screen_pitch = (mode_40_ ? 320 : 640) / static_cast(mode_bpp_); @@ -132,8 +136,9 @@ uint8_t VideoOutput::run_for(const Cycles cycles) { if(stage != output_ || screen_pitch != screen_pitch_) { switch(output_) { - case OutputStage::Sync: crt_.output_sync(output_length_); break; - case OutputStage::Blank: crt_.output_blank(output_length_); break; + case OutputStage::Sync: crt_.output_sync(output_length_); break; + case OutputStage::Blank: crt_.output_blank(output_length_); break; + case OutputStage::ColourBurst: crt_.output_default_colour_burst(output_length_); break; case OutputStage::Pixels: if(current_output_target_) { crt_.output_data( diff --git a/Machines/Acorn/Electron/Video.hpp b/Machines/Acorn/Electron/Video.hpp index eeeff4d2e..98993f4ff 100644 --- a/Machines/Acorn/Electron/Video.hpp +++ b/Machines/Acorn/Electron/Video.hpp @@ -81,7 +81,7 @@ class VideoOutput { // CRT output enum class OutputStage { - Sync, Blank, Pixels + Sync, Blank, Pixels, ColourBurst, }; OutputStage output_ = OutputStage::Blank; int output_length_ = 0; @@ -148,7 +148,10 @@ class VideoOutput { // _after_ position increment rather than before/instead. // So it needs to be one higher. Which is baked into // the constant to emphasise the all-divisible-by-8 property. + static constexpr int h_half = h_total / 2; + static constexpr int hburst_start = 856; + static constexpr int hburst_end = 896; // Vertical timing parameters; all in terms of lines. As per the horizontal parameters above, // lines begin with their first visible pixel (or the equivalent position).