// $Id: MSXAudio.hh 5504 2006-07-07 21:40:55Z m9710797 $ #ifndef MSXAUDIO_HH #define MSXAUDIO_HH #include "MSXDevice.hh" #include namespace openmsx { class Y8950; class Y8950Periphery; class DACSound8U; class MSXAudio : public MSXDevice { public: MSXAudio(MSXMotherBoard& motherBoard, const XMLElement& config, const EmuTime& time); virtual ~MSXAudio(); virtual void reset(const EmuTime& time); virtual byte readIO(word port, const EmuTime& time); virtual byte peekIO(word port, const EmuTime& time) const; virtual void writeIO(word port, byte value, const EmuTime& time); private: void enableY8950(bool enable); void enableDAC(bool enable, const EmuTime& time); std::auto_ptr periphery; std::auto_ptr y8950; std::auto_ptr dac; int registerLatch; byte dacValue; bool dacEnabled; bool y8950Enabled; friend class MusicModulePeriphery; }; } // namespace openmsx #endif