// $Id: Rom.hh 6098 2007-02-19 12:25:30Z m9710797 $ #ifndef ROM_HH #define ROM_HH #include "openmsx.hh" #include "noncopyable.hh" #include #include #include namespace openmsx { class MSXMotherBoard; class EmuTime; class XMLElement; class File; class RomInfo; class GlobalCliComm; class RomDebuggable; class Rom : private noncopyable { public: Rom(MSXMotherBoard& motherBoard, const std::string& name, const std::string& description, const XMLElement& config); Rom(MSXMotherBoard& motherBoard, const std::string& name, const std::string& description, const XMLElement& config, const std::string& id); virtual ~Rom(); const byte& operator[](unsigned address) const { assert(address < size); return rom[address]; } unsigned getSize() const { return size; } const RomInfo& getInfo() const; const std::string& getName() const; const std::string& getDescription() const; const std::string& getSHA1Sum() const; private: void init(GlobalCliComm& cliComm, const XMLElement& config); void read(const XMLElement& config); bool checkSHA1(const XMLElement& config); MSXMotherBoard& motherBoard; std::string name; const std::string description; unsigned size; const byte* rom; byte* extendedRom; std::auto_ptr file; std::auto_ptr info; std::auto_ptr romDebuggable; mutable std::string sha1sum; }; } // namespace openmsx #endif