14 , mixer(getMotherBoard().getMSXMixer())
16 getPluggingController(),
"pcminput"))
18 , reference(getCurrentTime())
31 reference.
reset(time);
47 switch (port & 0x01) {
66 result = (getComp(time) ? 0x80 : 0x00) | (status & 0x1F);
76 switch (port & 0x01) {
84 dac->writeDAC(DValue, time);
95 byte change = status ^ value;
98 if ((change & 0x01) && ((status & 0x01) == 0)) {
99 dac->writeDAC(DValue, time);
102 if ((change & 0x10) && (status & 0x10)) {
103 hold = getSample(time);
105 hardwareMute(!(status & 0x02));
114 result = (connector->readSample(time) / 256) + 0x80;
125 byte sample = (status & 0x10) ? hold : getSample(time);
126 return sample >= DValue;
129 void MSXTurboRPCM::hardwareMute(
bool mute)
131 if (mute == hwMute)
return;
142 template<
typename Archive>
145 ar.template serializeBase<MSXDevice>(*this);
147 ar.serialize(
"audioConnector", *connector);
148 ar.serialize(
"reference", reference);
149 ar.serialize(
"status", status);
150 ar.serialize(
"DValue", DValue);
151 ar.serialize(
"hold", hold);
152 ar.serialize(
"DAC", *dac);
154 hardwareMute(!(status & 0x02));