openMSX
V9990DisplayTiming.hh
Go to the documentation of this file.
1 #ifndef V9990DISPLAYTIMING_HH
2 #define V9990DISPLAYTIMING_HH
3 
4 namespace openmsx {
5 
12 {
13  const int cycle;
14  const int blank;
15  const int border1;
16  const int display;
17  const int border2;
18 };
19 
21 {
22 public:
31  static constexpr int UC_TICKS_PER_SECOND = 3579545 * 12; // 42.9MHz
32 
36  static constexpr int UC_TICKS_PER_LINE = 2736;
37 
41  static constexpr auto lineMCLK = V9990DisplayPeriod{
42  V9990DisplayTiming::UC_TICKS_PER_LINE, 400, 112, 2048, 112};
43 
47  static constexpr auto lineXTAL = V9990DisplayPeriod{
48  V9990DisplayTiming::UC_TICKS_PER_LINE, 372, 0, 2304, 0};
49 
53  static constexpr auto displayNTSC_MCLK = V9990DisplayPeriod{262, 15, 14, 212, 14};
54 
58  static constexpr auto displayNTSC_XTAL = V9990DisplayPeriod{262, 15, 0, 240, 0};
59 
63  static constexpr auto displayPAL_MCLK = V9990DisplayPeriod{313, 15, 41, 212, 37};
64 
68  static constexpr auto displayPAL_XTAL = V9990DisplayPeriod{313, 15, 0, 290, 0};
69 
70 
75  static constexpr int getUCTicksPerFrame(bool palTiming) {
76  return palTiming ? (displayPAL_MCLK.cycle * UC_TICKS_PER_LINE)
78  }
79 };
80 
81 } // openmsx
82 
83 #endif
openmsx::V9990DisplayPeriod
A period, either horizontal or vertical, starts with a synchronisation pulse followed by a blank peri...
Definition: V9990DisplayTiming.hh:11
openmsx::V9990DisplayPeriod::cycle
const int cycle
Definition: V9990DisplayTiming.hh:13
openmsx::V9990DisplayPeriod::border1
const int border1
Definition: V9990DisplayTiming.hh:15
openmsx::V9990DisplayTiming::UC_TICKS_PER_LINE
static constexpr int UC_TICKS_PER_LINE
The number of clockticks per line is independent of the crystal used or the display mode (NTSC/PAL)
Definition: V9990DisplayTiming.hh:36
openmsx::V9990DisplayTiming::lineXTAL
static constexpr auto lineXTAL
Horizontal (line) timing when using XTAL: 'Overscan' modes without border.
Definition: V9990DisplayTiming.hh:47
openmsx::V9990DisplayTiming::displayNTSC_MCLK
static constexpr auto displayNTSC_MCLK
NTSC display timing, when using MCLK: Normal display mode with borders.
Definition: V9990DisplayTiming.hh:53
openmsx::V9990DisplayTiming::displayPAL_MCLK
static constexpr auto displayPAL_MCLK
PAL display timing, when using MCLK: Normal display mode with borders.
Definition: V9990DisplayTiming.hh:63
openmsx::V9990DisplayTiming
Definition: V9990DisplayTiming.hh:20
openmsx::V9990DisplayTiming::lineMCLK
static constexpr auto lineMCLK
Horizontal (line) timing when using MCLK: 'Normal' display modes.
Definition: V9990DisplayTiming.hh:41
openmsx::V9990DisplayPeriod::border2
const int border2
Definition: V9990DisplayTiming.hh:17
openmsx::V9990DisplayPeriod::display
const int display
Definition: V9990DisplayTiming.hh:16
openmsx::V9990DisplayTiming::displayPAL_XTAL
static constexpr auto displayPAL_XTAL
PAL display timing, when using XTAL: Overscan mode without borders.
Definition: V9990DisplayTiming.hh:68
openmsx::V9990DisplayTiming::displayNTSC_XTAL
static constexpr auto displayNTSC_XTAL
NTSC display timing, when using XTAL: Overscan mode without borders.
Definition: V9990DisplayTiming.hh:58
openmsx
Thanks to enen for testing this on a real cartridge:
Definition: Autofire.cc:5
openmsx::V9990DisplayPeriod::blank
const int blank
Definition: V9990DisplayTiming.hh:14
openmsx::V9990DisplayTiming::UC_TICKS_PER_SECOND
static constexpr int UC_TICKS_PER_SECOND
The V9990 has an internal clock (MCLK @ 14MHz) and a terminal for an external clock (XTAL1),...
Definition: V9990DisplayTiming.hh:31
openmsx::V9990DisplayTiming::getUCTicksPerFrame
static constexpr int getUCTicksPerFrame(bool palTiming)
Get the number of UC ticks in 1 frame.
Definition: V9990DisplayTiming.hh:75