39 , irq(getMotherBoard(),
"PioneerLDControl.IRQdisplayoff")
43 laserdisc = make_unique<LaserdiscPlayer>(
54 ppi = references.size() >= 1 ?
55 dynamic_cast<MSXPPI*
>(references[0]) :
nullptr;
57 throw MSXException(
"Invalid PioneerLDControl configuration: "
58 "need reference to PPI device.");
61 vdp = references.size() == 2 ?
62 dynamic_cast<VDP*
>(references[1]) :
nullptr;
64 throw MSXException(
"Invalid PioneerLDControl configuration: "
65 "need reference to VDP device.");
76 superimposing =
false;
80 if (laserdisc.get()) laserdisc->setMuting(mutel, muter, time);
86 if (address == 0x7fff) {
99 if (address == 0x7fff) {
106 }
else if (address == 0x7ffe) {
110 if (laserdisc.get() && laserdisc->extAck(time)) {
113 }
else if (0x4000 <= address && address < 0x6000) {
114 val = (*rom)[address & 0x1fff];
121 if ((start & CacheLine::HIGH) == (0x7FFE & CacheLine::HIGH)) {
123 }
else if (0x4000 <= start && start < 0x6000) {
124 return &(*rom)[start & 0x1fff];
132 if (address == 0x7fff) {
134 superimposing = !(value & 1);
146 if (!mutel && !(value & 0x80)) {
147 muter = !(ppi->
peekIO(2, time) & 0x10);
149 mutel = !(value & 0x80);
150 if (laserdisc.get()) laserdisc->setMuting(mutel, muter, time);
152 }
else if (address == 0x7ffe) {
153 if (laserdisc.get()) laserdisc->extControl(value & 1, time);
159 if ((start & CacheLine::HIGH) == (0x7FFE & CacheLine::HIGH)) {
168 if (videoEnabled && !enabled) {
175 videoEnabled = enabled;
179 void PioneerLDControl::updateVideoSource()
181 auto* videoSource = (videoEnabled && superimposing && laserdisc.get())
182 ? laserdisc->getRawFrame()
187 template<
typename Archive>
190 ar.serialize(
"clock", clock);
191 ar.serialize(
"mutel", mutel);
192 ar.serialize(
"muter", muter);
196 videoEnabled =
false;
198 ar.serialize(
"superimposing", superimposing);
199 ar.serialize(
"extint", extint);
200 ar.serialize(
"irq", irq);
201 if (laserdisc.get()) {
202 ar.serialize(
"laserdisc", *laserdisc);
207 if (laserdisc.get()) {