From d587d806166a93fd35ec25c40b9356c163abdbda Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Sat, 22 Apr 2023 22:58:23 -0400 Subject: [PATCH] Transcribe Grauw's line timings. --- .../9918/Implementation/ClockConverter.hpp | 42 ++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/Components/9918/Implementation/ClockConverter.hpp b/Components/9918/Implementation/ClockConverter.hpp index 641f4db8d..443d046ca 100644 --- a/Components/9918/Implementation/ClockConverter.hpp +++ b/Components/9918/Implementation/ClockConverter.hpp @@ -174,7 +174,47 @@ template class ClockConverter { int cycles_error_ = 0; }; -} + +// +// +// +template struct LineLayout; + +// Line layout is: +// +// [0, EndOfSync] sync +// (EndOfSync, StartOfColourBurst] blank +// (StartOfColourBurst, EndOfColourBurst] colour burst +// (EndOfColourBurst, EndOfLeftErase] blank +// (EndOfLeftErase, EndOfLeftBorder] border colour +// (EndOfLeftBorder, EndOfPixels] pixel content +// (EndOfPixels, EndOfRightBorder] border colour +// [EndOfRightBorder, ] blank +// +// ... with minor caveats: +// * horizontal adjust on the Yamaha VDPs is applied to EndOfLeftBorder and EndOfPixels; and +// * the Sega VDPs may programatically extend the left border. + +template struct LineLayout> { + constexpr static int EndOfSync = 26; +// constexpr static int StartOfColourBurst = 30; +// constexpr static int EndOfColourBurst = 30; + constexpr static int EndOfLeftErase = 50; + constexpr static int EndOfLeftBorder = 63; + constexpr static int EndOfPixels = 319; + constexpr static int EndOfRightBorder = 334; +}; + +template struct LineLayout> { + constexpr static int EndOfSync = 100; +// constexpr static int StartOfColourBurst = 30; +// constexpr static int EndOfColourBurst = 30; + constexpr static int EndOfLeftErase = 202; + constexpr static int EndOfLeftBorder = 258; + constexpr static int EndOfPixels = 1282; + constexpr static int EndOfRightBorder = 1341; +}; + } #endif /* ClockConverter_hpp */