openMSX
Renderer.hh
Go to the documentation of this file.
1 #ifndef RENDERER_HH
2 #define RENDERER_HH
3 
4 #include "VRAMObserver.hh"
5 #include "openmsx.hh"
6 #include <cstdint>
7 
8 namespace openmsx {
9 
10 class PostProcessor;
11 class DisplayMode;
12 class RawFrame;
13 
22 class Renderer : public VRAMObserver
23 {
24 public:
25  virtual ~Renderer() = default;
26 
28  virtual PostProcessor* getPostProcessor() const = 0;
29 
32  virtual void reInit() = 0;
33 
39  virtual void frameStart(EmuTime::param time) = 0;
40 
45  virtual void frameEnd(EmuTime::param time) = 0;
46 
51  virtual void updateTransparency(bool enabled, EmuTime::param time) = 0;
52 
57  virtual void updateSuperimposing(const RawFrame* videoSource,
58  EmuTime::param time) = 0;
59 
64  virtual void updateForegroundColor(int color, EmuTime::param time) = 0;
65 
70  virtual void updateBackgroundColor(int color, EmuTime::param time) = 0;
71 
76  virtual void updateBlinkForegroundColor(int color, EmuTime::param time) = 0;
77 
82  virtual void updateBlinkBackgroundColor(int color, EmuTime::param time) = 0;
83 
88  virtual void updateBlinkState(bool enabled, EmuTime::param time) = 0;
89 
97  virtual void updatePalette(int index, int grb, EmuTime::param time) = 0;
98 
103  virtual void updateVerticalScroll(int scroll, EmuTime::param time) = 0;
104 
110  virtual void updateHorizontalScrollLow(byte scroll, EmuTime::param time) = 0;
111 
117  virtual void updateHorizontalScrollHigh(byte scroll, EmuTime::param time) = 0;
118 
124  virtual void updateBorderMask(bool masked, EmuTime::param time) = 0;
125 
131  virtual void updateMultiPage(bool multiPage, EmuTime::param time) = 0;
132 
140  virtual void updateHorizontalAdjust(int adjust, EmuTime::param time) = 0;
141 
148  virtual void updateDisplayEnabled(bool enabled, EmuTime::param time) = 0;
149 
154  virtual void updateDisplayMode(DisplayMode mode, EmuTime::param time) = 0;
155 
160  virtual void updateNameBase(int addr, EmuTime::param time) = 0;
161 
166  virtual void updatePatternBase(int addr, EmuTime::param time) = 0;
167 
172  virtual void updateColorBase(int addr, EmuTime::param time) = 0;
173 
178  virtual void updateSpritesEnabled(bool enabled, EmuTime::param time) = 0;
179 
184  static const uint16_t GRAPHIC7_SPRITE_PALETTE[16];
185 
186 protected:
187  Renderer() = default;
188 };
189 
190 } // namespace openmsx
191 
192 #endif
virtual void updateHorizontalAdjust(int adjust, EmuTime::param time)=0
Informs the renderer of a horizontal adjust change.
virtual void updatePatternBase(int addr, EmuTime::param time)=0
Informs the renderer of a pattern table base address change.
virtual void updateDisplayMode(DisplayMode mode, EmuTime::param time)=0
Informs the renderer of a VDP display mode change.
virtual PostProcessor * getPostProcessor() const =0
See VDP::getPostProcessor.
uint8_t byte
8 bit unsigned integer
Definition: openmsx.hh:26
Renderer()=default
virtual void updateColorBase(int addr, EmuTime::param time)=0
Informs the renderer of a color table base address change.
virtual void updateSpritesEnabled(bool enabled, EmuTime::param time)=0
Informs the renderer of a VDP sprites enabled change.
Represents a VDP display mode.
Definition: DisplayMode.hh:14
virtual void updatePalette(int index, int grb, EmuTime::param time)=0
Informs the renderer of a VDP palette change.
virtual void frameStart(EmuTime::param time)=0
Signals the start of a new frame.
virtual void updateBackgroundColor(int color, EmuTime::param time)=0
Informs the renderer of a VDP background color change.
virtual void updateVerticalScroll(int scroll, EmuTime::param time)=0
Informs the renderer of a vertical scroll change.
virtual void updateBlinkState(bool enabled, EmuTime::param time)=0
Informs the renderer of a VDP blinking state change.
A video frame as output by the VDP scanline conversion unit, before any postprocessing filters are ap...
Definition: RawFrame.hh:25
Abstract base class for Renderers.
Definition: Renderer.hh:22
Interface that can be registered at VRAMWindow, to be called when the contents of the VRAM inside tha...
Definition: VRAMObserver.hh:11
virtual ~Renderer()=default
Thanks to enen for testing this on a real cartridge:
Definition: Autofire.cc:5
virtual void updateMultiPage(bool multiPage, EmuTime::param time)=0
Informs the renderer of a horizontal scroll change: the multi page setting has changed.
virtual void updateDisplayEnabled(bool enabled, EmuTime::param time)=0
Informs the renderer of a VDP display enabled change.
virtual void updateTransparency(bool enabled, EmuTime::param time)=0
Informs the renderer of a VDP transparency enable/disable change.
virtual void updateHorizontalScrollHigh(byte scroll, EmuTime::param time)=0
Informs the renderer of a horizontal scroll change: the higher scroll value has changed.
Abstract base class for post processors.
static const uint16_t GRAPHIC7_SPRITE_PALETTE[16]
Sprite palette in Graphic 7 mode.
Definition: Renderer.hh:184
virtual void updateHorizontalScrollLow(byte scroll, EmuTime::param time)=0
Informs the renderer of a horizontal scroll change: the lower scroll value has changed.
virtual void updateBlinkForegroundColor(int color, EmuTime::param time)=0
Informs the renderer of a VDP blink foreground color change.
virtual void updateForegroundColor(int color, EmuTime::param time)=0
Informs the renderer of a VDP foreground color change.
virtual void updateBorderMask(bool masked, EmuTime::param time)=0
Informs the renderer of a horizontal scroll change: the border mask has been enabled/disabled.
virtual void updateNameBase(int addr, EmuTime::param time)=0
Informs the renderer of a name table base address change.
virtual void reInit()=0
Reinitialise Renderer state.
virtual void frameEnd(EmuTime::param time)=0
Signals the end of a frame.
virtual void updateSuperimposing(const RawFrame *videoSource, EmuTime::param time)=0
Informs the renderer of a VDP superimposing change.
virtual void updateBlinkBackgroundColor(int color, EmuTime::param time)=0
Informs the renderer of a VDP blink background color change.
constexpr AdjustTables adjust
Definition: Y8950.cc:204