openMSX
Public Member Functions | List of all members
openmsx::V9990SDLRasterizer< Pixel > Class Template Referencefinal

Rasterizer using SDL. More...

#include <V9990SDLRasterizer.hh>

Inheritance diagram for openmsx::V9990SDLRasterizer< Pixel >:
Inheritance graph
[legend]
Collaboration diagram for openmsx::V9990SDLRasterizer< Pixel >:
Collaboration graph
[legend]

Public Member Functions

 V9990SDLRasterizer (V9990 &vdp, Display &display, VisibleSurface &screen, std::unique_ptr< PostProcessor > postProcessor)
 
 ~V9990SDLRasterizer () override
 
PostProcessorgetPostProcessor () const override
 See V9990::getPostProcessor(). More...
 
bool isActive () override
 Will the output of this Rasterizer be displayed? There is no point in producing a frame that will not be displayed. More...
 
void reset () override
 Resynchronize with VDP - flush caches etc. More...
 
void frameStart () override
 Indicates the start of a new frame. More...
 
void frameEnd (EmuTime::param time) override
 Indicates the end of the current frame. More...
 
void setDisplayMode (V9990DisplayMode displayMode) override
 The display mode determines the screens geometry and how V9990 pixels are mapped to pixels on screen. More...
 
void setColorMode (V9990ColorMode colorMode) override
 The color mode determines how the V9990 VRAM data gets converted to pixel colors. More...
 
void setPalette (int index, byte r, byte g, byte b, bool ys) override
 Set RGB values for a palette entry. More...
 
void setSuperimpose (bool enabled) override
 Is superimpose enabled? More...
 
void drawBorder (int fromX, int fromY, int limitX, int limitY) override
 Render a rectangle of border pixels on the host screen. More...
 
void drawDisplay (int fromX, int fromY, int toX, int toY, int displayX, int displayY, int displayYA, int displayYB) override
 Render a rectangle of display pixels on the host screen. More...
 
bool isRecording () const override
 Is video recording active? More...
 
- Public Member Functions inherited from openmsx::V9990Rasterizer
virtual ~V9990Rasterizer ()=default
 

Detailed Description

template<class Pixel>
class openmsx::V9990SDLRasterizer< Pixel >

Rasterizer using SDL.

Definition at line 26 of file V9990SDLRasterizer.hh.

Constructor & Destructor Documentation

◆ V9990SDLRasterizer()

template<class Pixel >
openmsx::V9990SDLRasterizer< Pixel >::V9990SDLRasterizer ( V9990 vdp,
Display display,
VisibleSurface screen,
std::unique_ptr< PostProcessor postProcessor 
)

◆ ~V9990SDLRasterizer()

template<class Pixel >
openmsx::V9990SDLRasterizer< Pixel >::~V9990SDLRasterizer ( )
override

Member Function Documentation

◆ drawBorder()

template<class Pixel >
void openmsx::V9990SDLRasterizer< Pixel >::drawBorder ( int  fromX,
int  fromY,
int  limitX,
int  limitY 
)
overridevirtual

Render a rectangle of border pixels on the host screen.

The units are absolute lines (Y) and V9990 UC ticks (X).

Parameters
fromXX coordinate of render start (inclusive).
fromYY coordinate of render start (inclusive).
limitXX coordinate of render end (exclusive).
limitYY coordinate of render end (exclusive).

Implements openmsx::V9990Rasterizer.

Definition at line 120 of file V9990SDLRasterizer.cc.

References openmsx::V9990::getBackDropColor(), openmsx::V9990::getLineWidth(), openmsx::V9990::isOverScan(), gl::max(), gl::min(), openmsx::V9990DisplayTiming::UC_TICKS_PER_LINE, and openmsx::V9990::UCtoX().

◆ drawDisplay()

template<class Pixel >
void openmsx::V9990SDLRasterizer< Pixel >::drawDisplay ( int  fromX,
int  fromY,
int  toX,
int  toY,
int  displayX,
int  displayY,
int  displayYA,
int  displayYB 
)
overridevirtual

Render a rectangle of display pixels on the host screen.

Parameters
fromXX coordinate of render start in V9990 UC ticks.
fromYY coordinate of render start in absolute lines.
toXX coordinate of render stop in V9990 UC ticks (exclusive).
toYY coordinate of render stop in absolute lines (exclusive).
displayXdisplay coordinate of render start: [0..640).
displayYdisplay coordinate of render start: [0..480).
displayYAsimilar to displayY but specific for plane A
displayYBsimilar to displayY but specific for plane B Note: Usually displayY, displayYA and displayYB will all be the same. Only in case the vertical scroll register is updated in the middle of a frame they can differ, see V9990PixelRenderer::updateScrollAYLow()

Implements openmsx::V9990Rasterizer.

Definition at line 156 of file V9990SDLRasterizer.cc.

References g, openmsx::V9990::getCursorYOffset(), openmsx::RenderSettings::getDisableSprites(), openmsx::V9990::getEvenOdd(), openmsx::V9990::getLineWidth(), openmsx::V9990::getRollMask(), openmsx::V9990::getScrollAX(), openmsx::V9990::getScrollAY(), openmsx::RenderSettings::isColorMatrixIdentity(), openmsx::V9990::isEvenOddEnabled(), openmsx::OutputSurface::mapKeyedRGB255(), openmsx::OutputSurface::mapRGB(), openmsx::P1, openmsx::P2, openmsx::V9990::spritesEnabled(), openmsx::RenderSettings::transformComponent(), openmsx::RenderSettings::transformRGB(), and openmsx::V9990::UCtoX().

◆ frameEnd()

template<class Pixel >
void openmsx::V9990SDLRasterizer< Pixel >::frameEnd ( EmuTime::param  time)
overridevirtual

◆ frameStart()

template<class Pixel >
void openmsx::V9990SDLRasterizer< Pixel >::frameStart ( )
overridevirtual

◆ getPostProcessor()

template<class Pixel >
PostProcessor * openmsx::V9990SDLRasterizer< Pixel >::getPostProcessor ( ) const
overridevirtual

See V9990::getPostProcessor().

Implements openmsx::V9990Rasterizer.

Definition at line 54 of file V9990SDLRasterizer.cc.

◆ isActive()

template<class Pixel >
bool openmsx::V9990SDLRasterizer< Pixel >::isActive ( )
overridevirtual

Will the output of this Rasterizer be displayed? There is no point in producing a frame that will not be displayed.

TODO: Is querying the next pipeline step the best way to solve this, or is it better to explicitly disable the first step in the pipeline?

Implements openmsx::V9990Rasterizer.

Definition at line 60 of file V9990SDLRasterizer.cc.

References openmsx::MSXDevice::getMotherBoard(), openmsx::MSXMotherBoard::isActive(), and openmsx::MSXMotherBoard::isFastForwarding().

◆ isRecording()

template<class Pixel >
bool openmsx::V9990SDLRasterizer< Pixel >::isRecording ( ) const
overridevirtual

◆ reset()

template<class Pixel >
void openmsx::V9990SDLRasterizer< Pixel >::reset ( )
overridevirtual

◆ setColorMode()

template<class Pixel >
void openmsx::V9990SDLRasterizer< Pixel >::setColorMode ( V9990ColorMode  colorMode)
overridevirtual

The color mode determines how the V9990 VRAM data gets converted to pixel colors.

Parameters
colorModeThe new color mode.

Implements openmsx::V9990Rasterizer.

Definition at line 113 of file V9990SDLRasterizer.cc.

Referenced by openmsx::V9990SDLRasterizer< Pixel >::reset().

◆ setDisplayMode()

template<class Pixel >
void openmsx::V9990SDLRasterizer< Pixel >::setDisplayMode ( V9990DisplayMode  displayMode)
overridevirtual

The display mode determines the screens geometry and how V9990 pixels are mapped to pixels on screen.

Parameters
displayModeThe new display mode.

Implements openmsx::V9990Rasterizer.

Definition at line 106 of file V9990SDLRasterizer.cc.

Referenced by openmsx::V9990SDLRasterizer< Pixel >::reset().

◆ setPalette()

template<class Pixel >
void openmsx::V9990SDLRasterizer< Pixel >::setPalette ( int  index,
byte  r,
byte  g,
byte  b,
bool  ys 
)
overridevirtual

Set RGB values for a palette entry.

Parameters
indexIndex in palette
rRed component intensity (5 bits)
gGreen component intensity (5 bits)
bBlue component intensity (5 bits)
ysIs this entry transparent

Implements openmsx::V9990Rasterizer.

Definition at line 338 of file V9990SDLRasterizer.cc.

References g, openmsx::OutputSurface::getKeyColor(), openmsx::V9990::getPalette(), and openmsx::V9990::isSuperimposing().

◆ setSuperimpose()

template<class Pixel >
void openmsx::V9990SDLRasterizer< Pixel >::setSuperimpose ( bool  enabled)
overridevirtual

Is superimpose enabled?

Implements openmsx::V9990Rasterizer.

Definition at line 363 of file V9990SDLRasterizer.cc.


The documentation for this class was generated from the following files: