openMSX
LDPixelRenderer.cc
Go to the documentation of this file.
1 #include "LDPixelRenderer.hh"
2 #include "LDRasterizer.hh"
3 #include "PostProcessor.hh"
4 #include "Display.hh"
5 #include "VideoSystem.hh"
6 #include "VideoSourceSetting.hh"
7 #include "EventDistributor.hh"
8 #include "FinishFrameEvent.hh"
9 #include "MSXMotherBoard.hh"
10 #include "LaserdiscPlayer.hh"
11 #include "Reactor.hh"
12 
13 namespace openmsx {
14 
16  : motherboard(ld.getMotherBoard())
17  , eventDistributor(motherboard.getReactor().getEventDistributor())
18  , rasterizer(display.getVideoSystem().createLDRasterizer(ld))
19 {
20 }
21 
23 
24 void LDPixelRenderer::frameStart(EmuTime::param time)
25 {
26  rasterizer->frameStart(time);
27 }
28 
29 bool LDPixelRenderer::isActive() const
30 {
31  return motherboard.isActive();
32 }
33 
35 {
36  eventDistributor.distributeEvent(std::make_shared<FinishFrameEvent>(
37  rasterizer->getPostProcessor()->getVideoSource(),
38  motherboard.getVideoSource().getSource(),
39  !isActive()));
40 }
41 
42 void LDPixelRenderer::drawBlank(int r, int g, int b )
43 {
44  rasterizer->drawBlank(r, g, b);
45 }
46 
48 {
49  return rasterizer->getRawFrame();
50 }
51 
52 } // namespace openmsx
Represents the output window/screen of openMSX.
Definition: Display.hh:31
RawFrame * getRawFrame() override
void frameEnd() override
Signals the end of a frame.
void distributeEvent(const EventPtr &event)
Schedule the given event for delivery.
LDPixelRenderer(LaserdiscPlayer &ld, Display &display)
A video frame as output by the VDP scanline conversion unit, before any postprocessing filters are ap...
Definition: RawFrame.hh:25
void frameStart(EmuTime::param time) override
Signals the start of a new frame.
Thanks to enen for testing this on a real cartridge:
Definition: Autofire.cc:5
int g
void drawBlank(int r, int g, int b) override
VideoSourceSetting & getVideoSource()