| 1 |
#ifndef VIDEO9000_HH |
| 2 |
#define VIDEO9000_HH |
| 3 |
|
| 4 |
#include "VideoLayer.hh" |
| 5 |
#include "VideoSystemChangeListener.hh" |
| 6 |
|
| 7 |
#include "EventListener.hh" |
| 8 |
#include "MSXDevice.hh" |
| 9 |
|
| 10 |
namespace openmsx { |
| 11 |
|
| 12 |
class VDP; |
| 13 |
class V9990; |
| 14 |
class PostProcessor; |
| 15 |
|
| 16 |
class Video9000 final : public MSXDevice |
| 17 |
, private VideoSystemChangeListener |
| 18 |
, private VideoLayer |
| 19 |
, private EventListener |
| 20 |
{ |
| 21 |
public: |
| 22 |
explicit Video9000(const DeviceConfig& config); |
| 23 |
~Video9000() override; |
| 24 |
|
| 25 |
|
| 26 |
void init() override; |
| 27 |
void reset(EmuTime time) override; |
| 28 |
void writeIO(uint16_t port, uint8_t value, EmuTime time) override; |
| 29 |
|
| 30 |
template<typename Archive> |
| 31 |
void serialize(Archive& ar, unsigned version); |
| 32 |
|
| 33 |
private: |
| 34 |
void recalculate(); |
| 35 |
void recalculateVideoSource(); |
| 36 |
|
| 37 |
|
| 38 |
void preVideoSystemChange() noexcept override; |
| 39 |
void postVideoSystemChange() noexcept override; |
| 40 |
|
| 41 |
|
| 42 |
void paint(OutputSurface& output) override; |
| 43 |
void takeRawScreenShot(std::optional<unsigned> height, const std::string& filename) override; |
| 44 |
|
| 45 |
|
| 46 |
bool signalEvent(const Event& event) override; |
| 47 |
|
| 48 |
|
| 49 |
void update(const Setting& setting) noexcept override; |
| 50 |
|
| 51 |
private: |
| 52 |
VideoSourceSetting& videoSourceSetting; |
| 53 |
VDP* vdp; |
| 54 |
V9990* v9990; |
| 55 |
Layer* activeLayer = nullptr; |
| 56 |
PostProcessor* v99x8Layer = nullptr; |
| 57 |
PostProcessor* v9990Layer = nullptr; |
| 58 |
uint8_t value = 0x10; |
| 59 |
}; |
| 60 |
|
| 61 |
} |
| 62 |
|
| 63 |
#endif |