| 1 |
#ifndef PIONEERLDCONTROL_HH |
| 2 |
#define PIONEERLDCONTROL_HH |
| 3 |
|
| 4 |
#include "LaserdiscPlayer.hh" |
| 5 |
|
| 6 |
#include "Clock.hh" |
| 7 |
#include "IRQHelper.hh" |
| 8 |
#include "MSXDevice.hh" |
| 9 |
#include "Rom.hh" |
| 10 |
|
| 11 |
#include <optional> |
| 12 |
|
| 13 |
namespace openmsx { |
| 14 |
|
| 15 |
class MSXPPI; |
| 16 |
class VDP; |
| 17 |
|
| 18 |
class PioneerLDControl final : public MSXDevice |
| 19 |
{ |
| 20 |
public: |
| 21 |
explicit PioneerLDControl(DeviceConfig& config); |
| 22 |
~PioneerLDControl() override; |
| 23 |
|
| 24 |
void reset(EmuTime time) override; |
| 25 |
[[nodiscard]] byte readMem(uint16_t address, EmuTime time) override; |
| 26 |
[[nodiscard]] byte peekMem(uint16_t address, EmuTime time) const override; |
| 27 |
void writeMem(uint16_t address, byte value, EmuTime time) override; |
| 28 |
[[nodiscard]] const byte* getReadCacheLine(uint16_t address) const override; |
| 29 |
[[nodiscard]] byte* getWriteCacheLine(uint16_t address) override; |
| 30 |
void init() override; |
| 31 |
|
| 32 |
void videoIn(bool enabled); |
| 33 |
|
| 34 |
template<typename Archive> |
| 35 |
void serialize(Archive& ar, unsigned version); |
| 36 |
|
| 37 |
private: |
| 38 |
void updateVideoSource(); |
| 39 |
|
| 40 |
private: |
| 41 |
Rom rom; |
| 42 |
std::optional<LaserdiscPlayer> laserdisc; |
| 43 |
MSXPPI* ppi; |
| 44 |
VDP* vdp; |
| 45 |
|
| 46 |
|
| 47 |
|
| 48 |
|
| 49 |
|
| 50 |
|
| 51 |
|
| 52 |
|
| 53 |
Clock<2 * 500000, 128> clock{EmuTime::zero()}; |
| 54 |
|
| 55 |
|
| 56 |
|
| 57 |
|
| 58 |
IRQHelper irq; |
| 59 |
|
| 60 |
bool extInt; |
| 61 |
bool muteL, muteR; |
| 62 |
bool videoEnabled = false; |
| 63 |
bool superimposing; |
| 64 |
}; |
| 65 |
|
| 66 |
} |
| 67 |
|
| 68 |
#endif |