// $Id: SunriseIDE.hh 5418 2006-05-27 16:33:41Z m9710797 $ #ifndef SUNRISEIDE_HH #define SUNRISEIDE_HH #include "MSXDevice.hh" #include namespace openmsx { class IDEDevice; class Rom; class SunriseIDE : public MSXDevice { public: SunriseIDE(MSXMotherBoard& motherBoard, const XMLElement& config, const EmuTime& time); virtual ~SunriseIDE(); virtual void reset(const EmuTime& time); virtual byte readMem(word address, const EmuTime& time); virtual void writeMem(word address, byte value, const EmuTime& time); virtual const byte* getReadCacheLine(word start) const; private: void writeControl(byte value); byte readDataLow(const EmuTime& time); byte readDataHigh(const EmuTime& time); word readData(const EmuTime& time); byte readReg(nibble reg, const EmuTime& time); void writeDataLow(byte value); void writeDataHigh(byte value, const EmuTime& time); void writeData(word value, const EmuTime& time); void writeReg(nibble reg, byte value, const EmuTime& time); const std::auto_ptr rom; const byte* internalBank; bool ideRegsEnabled; bool softReset; byte readLatch; byte writeLatch; byte selectedDevice; std::auto_ptr device[2]; }; } // namespace openmsx #endif