openMSX
V9990DisplayTiming.cc
Go to the documentation of this file.
1 #include "V9990DisplayTiming.hh"
2 
3 namespace openmsx {
4 
5 /* Horizontal display timing: MCLK or XTAL1 */
6 const V9990DisplayPeriod V9990DisplayTiming::lineMCLK = V9990DisplayPeriod(
7  V9990DisplayTiming::UC_TICKS_PER_LINE, 400, 112, 2048, 112 );
8 const V9990DisplayPeriod V9990DisplayTiming::lineXTAL = V9990DisplayPeriod(
9  V9990DisplayTiming::UC_TICKS_PER_LINE, 372, 0, 2304, 0 );
10 
11 /* Vertical display timing: NTSC or PAL */
12 const V9990DisplayPeriod V9990DisplayTiming::displayNTSC_MCLK =
13  V9990DisplayPeriod(262, 15, 14, 212, 14);
14 const V9990DisplayPeriod V9990DisplayTiming::displayNTSC_XTAL =
15  V9990DisplayPeriod(262, 15, 0, 240, 0);
16 const V9990DisplayPeriod V9990DisplayTiming::displayPAL_MCLK =
17  V9990DisplayPeriod(313, 15, 41, 212, 37);
18 const V9990DisplayPeriod V9990DisplayTiming::displayPAL_XTAL =
19  V9990DisplayPeriod(313, 15, 0, 290, 0);
20 
21 
23  int cycle_, int blank_, int border1_, int display_, int border2_)
24  : cycle(cycle_), blank(blank_), border1(border1_)
25  , display(display_), border2(border2_)
26 {
27 }
28 
30 {
31  return palTiming ? (displayPAL_MCLK.cycle * UC_TICKS_PER_LINE)
32  : (displayNTSC_MCLK.cycle * UC_TICKS_PER_LINE);
33 }
34 
35 } // openmsx
static const V9990DisplayPeriod lineMCLK
Horizontal (line) timing when using MCLK: 'Normal' display modes.
static const V9990DisplayPeriod displayPAL_XTAL
PAL display timing, when using XTAL: Overscan mode without borders.
static const V9990DisplayPeriod displayPAL_MCLK
PAL display timing, when using MCLK: Normal display mode with borders.
static const V9990DisplayPeriod displayNTSC_XTAL
NTSC display timing, when using XTAL: Overscan mode without borders.
static const V9990DisplayPeriod lineXTAL
Horizontal (line) timing when using XTAL: 'Overscan' modes without border.
static const int UC_TICKS_PER_LINE
The number of clockticks per line is independent of the crystal used or the display mode (NTSC/PAL) ...
Thanks to enen for testing this on a real cartridge:
Definition: Autofire.cc:5
V9990DisplayPeriod(int cycle, int blank, int border1, int display, int border2)
static const V9990DisplayPeriod displayNTSC_MCLK
NTSC display timing, when using MCLK: Normal display mode with borders.
static int getUCTicksPerFrame(bool palTiming)
Get the number of UC ticks in 1 frame.