openMSX
PioneerLDControl.hh
Go to the documentation of this file.
1#ifndef PIONEERLDCONTROL_HH
2#define PIONEERLDCONTROL_HH
3
4#include "LaserdiscPlayer.hh"
5#include "MSXDevice.hh"
6#include "Clock.hh"
7#include "IRQHelper.hh"
8#include "Rom.hh"
9#include <optional>
10
11namespace openmsx {
12
13class MSXPPI;
14class VDP;
15
16class PioneerLDControl final : public MSXDevice
17{
18public:
19 explicit PioneerLDControl(const DeviceConfig& config);
21
22 void reset(EmuTime::param time) override;
23 [[nodiscard]] byte readMem(word address, EmuTime::param time) override;
24 [[nodiscard]] byte peekMem(word address, EmuTime::param time) const override;
25 void writeMem(word address, byte value, EmuTime::param time) override;
26 [[nodiscard]] const byte* getReadCacheLine(word address) const override;
27 [[nodiscard]] byte* getWriteCacheLine(word address) override;
28 void init() override;
29
30 void videoIn(bool enabled);
31
32 template<typename Archive>
33 void serialize(Archive& ar, unsigned version);
34
35private:
36 void updateVideoSource();
37
38private:
39 Rom rom;
40 std::optional<LaserdiscPlayer> laserdisc; // can be nullopt
41 MSXPPI* ppi;
42 VDP* vdp;
43
51 Clock<2 * 500000, 128> clock{EmuTime::zero()}; // 2*500kHz / 128 = 7812.5Hz
52
56 IRQHelper irq;
57
58 bool extInt;
59 bool muteL, muteR;
60 bool videoEnabled = false;
61 bool superimposing;
62};
63
64} // namespace openmsx
65
66#endif
Represents a clock with a fixed frequency.
Definition Clock.hh:19
An MSXDevice is an emulated hardware component connected to the bus of the emulated MSX.
Definition MSXDevice.hh:36
void serialize(Archive &ar, unsigned version)
const byte * getReadCacheLine(word address) const override
Test that the memory in the interval [start, start + CacheLine::SIZE) is cacheable for reading.
void writeMem(word address, byte value, EmuTime::param time) override
Write a given byte to a given location at a certain time to this device.
byte readMem(word address, EmuTime::param time) override
Read a byte from a location at a certain time from this device.
byte * getWriteCacheLine(word address) override
Test that the memory in the interval [start, start + CacheLine::SIZE) is cacheable for writing.
byte peekMem(word address, EmuTime::param time) const override
Read a byte from a given memory location.
void reset(EmuTime::param time) override
This method is called on reset.
Unified implementation of MSX Video Display Processors (VDPs).
Definition VDP.hh:67
This file implemented 3 utility functions:
Definition Autofire.cc:11
uint16_t word
16 bit unsigned integer
Definition openmsx.hh:29