1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-06-25 18:30:07 +00:00

Transcribe Grauw's line timings.

This commit is contained in:
Thomas Harte 2023-04-22 22:58:23 -04:00
parent 0070a271f8
commit d587d80616

View File

@ -174,7 +174,47 @@ template <Personality personality> class ClockConverter {
int cycles_error_ = 0;
};
}
//
//
//
template <Personality personality, typename Enable = void> 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, <end of line>] 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 <Personality personality> struct LineLayout<personality, std::enable_if_t<personality == Personality::TMS9918A || (is_sega_vdp(personality) && personality != Personality::MDVDP)>> {
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 <Personality personality> struct LineLayout<personality, std::enable_if_t<is_yamaha_vdp(personality)>> {
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 */