openMSX
V9990Rasterizer.hh
Go to the documentation of this file.
1 #ifndef V9990RASTERIZER_HH
2 #define V9990RASTERIZER_HH
3 
4 #include "V9990ModeEnum.hh"
5 #include "EmuTime.hh"
6 #include "openmsx.hh"
7 
8 namespace openmsx {
9 
10 class PostProcessor;
11 
12 /** If this seems awfully familiar, take a look at Rasterizer.hh
13  * It's virtually the same class, but for a different video processor.
14  */
16 {
17 public:
18  virtual ~V9990Rasterizer() = default;
19 
20  /** See V9990::getPostProcessor(). */
21  virtual PostProcessor* getPostProcessor() const = 0;
22 
23  /** Will the output of this Rasterizer be displayed?
24  * There is no point in producing a frame that will not be displayed.
25  * TODO: Is querying the next pipeline step the best way to solve this,
26  * or is it better to explicitly disable the first step in the pipeline?
27  */
28  virtual bool isActive() = 0;
29 
30  /** Resynchronize with VDP - flush caches etc.
31  */
32  virtual void reset() = 0;
33 
34  /** Indicates the start of a new frame.
35  */
36  virtual void frameStart() = 0;
37 
38  /** Indicates the end of the current frame.
39  */
40  virtual void frameEnd(EmuTime::param time) = 0;
41 
42  /** The display mode determines the screens geometry and how V9990
43  * pixels are mapped to pixels on screen.
44  * @param displayMode The new display mode.
45  */
46  virtual void setDisplayMode(enum V9990DisplayMode displayMode) = 0;
47 
48  /** The color mode determines how the V9990 VRAM data gets converted
49  * to pixel colors.
50  * @param colorMode The new color mode.
51  */
52  virtual void setColorMode(enum V9990ColorMode colorMode) = 0;
53 
54  /** Set RGB values for a palette entry
55  * @param index Index in palette
56  * @param r Red component intensity (5 bits)
57  * @param g Green component intensity (5 bits)
58  * @param b Blue component intensity (5 bits)
59  * @param ys Is this entry transparent
60  */
61  virtual void setPalette(int index, byte r, byte g, byte b, bool ys) = 0;
62 
63  /** Is superimpose enabled? */
64  virtual void setSuperimpose(bool enabled) = 0;
65 
66  /** Render a rectangle of border pixels on the host screen.
67  * The units are absolute lines (Y) and V9990 UC ticks (X).
68  * @param fromX X coordinate of render start (inclusive).
69  * @param fromY Y coordinate of render start (inclusive).
70  * @param limitX X coordinate of render end (exclusive).
71  * @param limitY Y coordinate of render end (exclusive).
72  */
73  virtual void drawBorder(
74  int fromX, int fromY,
75  int limitX, int limitY) = 0;
76 
77  /** Render a rectangle of display pixels on the host screen.
78  * @param fromX X coordinate of render start in V9990 UC ticks.
79  * @param fromY Y coordinate of render start in absolute lines.
80  * @param toX X coordinate of render stop in V9990 UC ticks (exclusive).
81  * @param toY Y coordinate of render stop in absolute lines (exclusive).
82  * @param displayX display coordinate of render start: [0..640).
83  * @param displayY display coordinate of render start: [0..480).
84  * @param displayYA similar to displayY but specific for plane A
85  * @param displayYB similar to displayY but specific for plane B
86  * Note: Usually displayY, displayYA and displayYB will all be the
87  * same. Only in case the vertical scroll register is updated
88  * in the middle of a frame they can differ, see
89  * V9990PixelRenderer::updateScrollAYLow()
90  */
91  virtual void drawDisplay(
92  int fromX, int fromY, int toX, int toY,
93  int displayX, int displayY, int displayYA, int displayYB) = 0;
94 
95  /** Is video recording active?
96  */
97  virtual bool isRecording() const = 0;
98 };
99 
100 } // namespace openmsx
101 
102 #endif
virtual PostProcessor * getPostProcessor() const =0
See V9990::getPostProcessor().
bool getEnum() const noexcept
Definition: EnumSetting.hh:96
virtual void frameEnd(EmuTime::param time)=0
Indicates the end of the current frame.
virtual void frameStart()=0
Indicates the start of a new frame.
If this seems awfully familiar, take a look at Rasterizer.hh It's virtually the same class...
virtual void drawBorder(int fromX, int fromY, int limitX, int limitY)=0
Render a rectangle of border pixels on the host screen.
virtual void reset()=0
Resynchronize with VDP - flush caches etc.
virtual void setPalette(int index, byte r, byte g, byte b, bool ys)=0
Set RGB values for a palette entry.
virtual void setColorMode(enum V9990ColorMode colorMode)=0
The color mode determines how the V9990 VRAM data gets converted to pixel colors. ...
virtual void setSuperimpose(bool enabled)=0
Is superimpose enabled?
virtual void drawDisplay(int fromX, int fromY, int toX, int toY, int displayX, int displayY, int displayYA, int displayYB)=0
Render a rectangle of display pixels on the host screen.
virtual ~V9990Rasterizer()=default
virtual void setDisplayMode(enum V9990DisplayMode displayMode)=0
The display mode determines the screens geometry and how V9990 pixels are mapped to pixels on screen...
virtual bool isActive()=0
Will the output of this Rasterizer be displayed? There is no point in producing a frame that will not...
virtual bool isRecording() const =0
Is video recording active?