openMSX
|
Abstract base class for Renderers. More...
#include <Renderer.hh>
Public Member Functions | |
virtual | ~Renderer ()=default |
virtual PostProcessor * | getPostProcessor () const =0 |
See VDP::getPostProcessor. | |
virtual void | reInit ()=0 |
Reinitialize Renderer state. | |
virtual void | frameStart (EmuTime::param time)=0 |
Signals the start of a new frame. | |
virtual void | frameEnd (EmuTime::param time)=0 |
Signals the end of a frame. | |
virtual void | updateTransparency (bool enabled, EmuTime::param time)=0 |
Informs the renderer of a VDP transparency enable/disable change. | |
virtual void | updateSuperimposing (const RawFrame *videoSource, EmuTime::param time)=0 |
Informs the renderer of a VDP superimposing change. | |
virtual void | updateForegroundColor (byte color, EmuTime::param time)=0 |
Informs the renderer of a VDP foreground color change. | |
virtual void | updateBackgroundColor (byte color, EmuTime::param time)=0 |
Informs the renderer of a VDP background color change. | |
virtual void | updateBlinkForegroundColor (byte color, EmuTime::param time)=0 |
Informs the renderer of a VDP blink foreground color change. | |
virtual void | updateBlinkBackgroundColor (byte color, EmuTime::param time)=0 |
Informs the renderer of a VDP blink background color change. | |
virtual void | updateBlinkState (bool enabled, EmuTime::param time)=0 |
Informs the renderer of a VDP blinking state change. | |
virtual void | updatePalette (unsigned index, int grb, EmuTime::param time)=0 |
Informs the renderer of a VDP palette change. | |
virtual void | updateVerticalScroll (int scroll, EmuTime::param time)=0 |
Informs the renderer of a vertical scroll change. | |
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 | updateHorizontalScrollHigh (byte scroll, EmuTime::param time)=0 |
Informs the renderer of a horizontal scroll change: the higher scroll value has changed. | |
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 | updateMultiPage (bool multiPage, EmuTime::param time)=0 |
Informs the renderer of a horizontal scroll change: the multi page setting has changed. | |
virtual void | updateHorizontalAdjust (int adjust, EmuTime::param time)=0 |
Informs the renderer of a horizontal adjust change. | |
virtual void | updateDisplayEnabled (bool enabled, EmuTime::param time)=0 |
Informs the renderer of a VDP display enabled change. | |
virtual void | updateDisplayMode (DisplayMode mode, EmuTime::param time)=0 |
Informs the renderer of a VDP display mode change. | |
virtual void | updateNameBase (unsigned addr, EmuTime::param time)=0 |
Informs the renderer of a name table base address change. | |
virtual void | updatePatternBase (unsigned addr, EmuTime::param time)=0 |
Informs the renderer of a pattern table base address change. | |
virtual void | updateColorBase (unsigned 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. | |
Public Member Functions inherited from openmsx::VRAMObserver | |
virtual void | updateVRAM (unsigned offset, EmuTime::param time)=0 |
Informs the observer of a change in VRAM contents. | |
virtual void | updateWindow (bool enabled, EmuTime::param time)=0 |
Informs the observer that the entire VRAM window will change. | |
Static Public Attributes | |
static constexpr std::array< uint16_t, 16 > | GRAPHIC7_SPRITE_PALETTE |
Sprite palette in Graphic 7 mode. | |
Protected Member Functions | |
Renderer ()=default | |
Protected Member Functions inherited from openmsx::VRAMObserver | |
~VRAMObserver ()=default | |
Abstract base class for Renderers.
A Renderer is a class that converts VDP state to visual information (for example, pixels on a screen).
The update methods are called exactly before the change occurs in the VDP, so that the renderer can update itself to the specified time using the old settings.
Definition at line 23 of file Renderer.hh.
|
virtualdefault |
|
protecteddefault |
|
pure virtual |
Signals the end of a frame.
time | The moment in emulated time the frame ends. Note: this is the same time stamp as the start of the next frame. |
Implemented in openmsx::DummyRenderer, and openmsx::PixelRenderer.
|
pure virtual |
Signals the start of a new frame.
The Renderer can use this to get fixed-per-frame settings from the VDP, such as PAL/NTSC timing.
time | The moment in emulated time the frame starts. |
Implemented in openmsx::DummyRenderer, and openmsx::PixelRenderer.
|
pure virtual |
Implemented in openmsx::DummyRenderer, and openmsx::PixelRenderer.
|
pure virtual |
Reinitialize Renderer state.
Implemented in openmsx::DummyRenderer, and openmsx::PixelRenderer.
|
pure virtual |
Informs the renderer of a VDP background color change.
color | The new background color. |
time | The moment in emulated time this change occurs. |
Implemented in openmsx::DummyRenderer, and openmsx::PixelRenderer.
|
pure virtual |
Informs the renderer of a VDP blink background color change.
color | The new blink background color. |
time | The moment in emulated time this change occurs. |
Implemented in openmsx::DummyRenderer, and openmsx::PixelRenderer.
|
pure virtual |
Informs the renderer of a VDP blink foreground color change.
color | The new blink foreground color. |
time | The moment in emulated time this change occurs. |
Implemented in openmsx::DummyRenderer, and openmsx::PixelRenderer.
|
pure virtual |
Informs the renderer of a VDP blinking state change.
enabled | The new blink state. |
time | The moment in emulated time this change occurs. |
Implemented in openmsx::DummyRenderer, and openmsx::PixelRenderer.
|
pure virtual |
Informs the renderer of a horizontal scroll change: the border mask has been enabled/disabled.
masked | true iff enabled. |
time | The moment in emulated time this change occurs. |
Implemented in openmsx::DummyRenderer, and openmsx::PixelRenderer.
|
pure virtual |
Informs the renderer of a color table base address change.
addr | The new base address. |
time | The moment in emulated time this change occurs. |
Implemented in openmsx::DummyRenderer, and openmsx::PixelRenderer.
|
pure virtual |
Informs the renderer of a VDP display enabled change.
Both the regular border start/end and forced blanking by clearing the display enable bit are considered display enabled changes.
enabled | The new display enabled state. |
time | The moment in emulated time this change occurs. |
Implemented in openmsx::DummyRenderer, and openmsx::PixelRenderer.
Referenced by openmsx::VDPVRAM::updateDisplayEnabled().
|
pure virtual |
Informs the renderer of a VDP display mode change.
mode | The new display mode. |
time | The moment in emulated time this change occurs. |
Implemented in openmsx::DummyRenderer, and openmsx::PixelRenderer.
Referenced by openmsx::VDPVRAM::updateDisplayMode().
|
pure virtual |
Informs the renderer of a VDP foreground color change.
color | The new foreground color. |
time | The moment in emulated time this change occurs. |
Implemented in openmsx::DummyRenderer, and openmsx::PixelRenderer.
|
pure virtual |
Informs the renderer of a horizontal adjust change.
Note that there is no similar method for vertical adjust updates, because vertical adjust is calculated at start of frame and then fixed.
adjust | The new adjust value. |
time | The moment in emulated time this change occurs. |
Implemented in openmsx::DummyRenderer, and openmsx::PixelRenderer.
|
pure virtual |
Informs the renderer of a horizontal scroll change: the higher scroll value has changed.
scroll | The new scroll value. |
time | The moment in emulated time this change occurs. |
Implemented in openmsx::DummyRenderer, and openmsx::PixelRenderer.
|
pure virtual |
Informs the renderer of a horizontal scroll change: the lower scroll value has changed.
scroll | The new scroll value. |
time | The moment in emulated time this change occurs. |
Implemented in openmsx::DummyRenderer, and openmsx::PixelRenderer.
|
pure virtual |
Informs the renderer of a horizontal scroll change: the multi page setting has changed.
multiPage | The new multi page flag. |
time | The moment in emulated time this change occurs. |
Implemented in openmsx::DummyRenderer, and openmsx::PixelRenderer.
|
pure virtual |
Informs the renderer of a name table base address change.
addr | The new base address. |
time | The moment in emulated time this change occurs. |
Implemented in openmsx::DummyRenderer, and openmsx::PixelRenderer.
|
pure virtual |
Informs the renderer of a VDP palette change.
index | The index [0..15] in the palette that changes. |
grb | The new definition for the changed palette index: bit 10..8 is green, bit 6..4 is red and bit 2..0 is blue; all other bits are zero. |
time | The moment in emulated time this change occurs. |
Implemented in openmsx::DummyRenderer, and openmsx::PixelRenderer.
|
pure virtual |
Informs the renderer of a pattern table base address change.
addr | The new base address. |
time | The moment in emulated time this change occurs. |
Implemented in openmsx::DummyRenderer, and openmsx::PixelRenderer.
|
pure virtual |
Informs the renderer of a VDP sprites enabled change.
enabled | The new sprites enabled state. |
time | The moment in emulated time this change occurs. |
Implemented in openmsx::DummyRenderer, and openmsx::PixelRenderer.
Referenced by openmsx::VDPVRAM::updateSpritesEnabled().
|
pure virtual |
Informs the renderer of a VDP superimposing change.
videoSource | Video that should be superimposed, nullptr if none. |
time | The moment in emulated time this change occurs. |
Implemented in openmsx::DummyRenderer, and openmsx::PixelRenderer.
|
pure virtual |
Informs the renderer of a VDP transparency enable/disable change.
enabled | The new transparency state. |
time | The moment in emulated time this change occurs. |
Implemented in openmsx::DummyRenderer, and openmsx::PixelRenderer.
|
pure virtual |
Informs the renderer of a vertical scroll change.
scroll | The new scroll value. |
time | The moment in emulated time this change occurs. |
Implemented in openmsx::DummyRenderer, and openmsx::PixelRenderer.
|
staticconstexpr |
Sprite palette in Graphic 7 mode.
See page 98 of the V9938 data book. Each palette entry is a word in GRB format: bit 10..8 is green, bit 6..4 is red and bit 2..0 is blue.
Definition at line 186 of file Renderer.hh.