openMSX
RomSynthesizer.hh
Go to the documentation of this file.
1 #ifndef ROMSYNTHESIZER_HH
2 #define ROMSYNTHESIZER_HH
3 
4 #include "RomBlocks.hh"
5 
6 namespace openmsx {
7 
8 class DACSound8U;
9 
10 class RomSynthesizer final : public Rom16kBBlocks
11 {
12 public:
13  RomSynthesizer(const DeviceConfig& config, std::unique_ptr<Rom> rom);
15 
16  void reset(EmuTime::param time) override;
17  void writeMem(word address, byte value, EmuTime::param time) override;
18  byte* getWriteCacheLine(word address) const override;
19 
20  template<typename Archive>
21  void serialize(Archive& ar, unsigned version);
22 
23 private:
24  const std::unique_ptr<DACSound8U> dac;
25 };
26 
27 } // namespace openmsx
28 
29 #endif
void reset(EmuTime::param time) override
This method is called on reset.
unsigned char byte
8 bit unsigned integer
Definition: openmsx.hh:33
void writeMem(word address, byte value, EmuTime::param time) override
Write a given byte to a given location at a certain time to this device.
RomSynthesizer(const DeviceConfig &config, std::unique_ptr< Rom > rom)
byte * getWriteCacheLine(word address) const override
Test that the memory in the interval [start, start + CacheLine::SIZE) is cacheable for writing...
Thanks to enen for testing this on a real cartridge:
Definition: Autofire.cc:7
unsigned short word
16 bit unsigned integer
Definition: openmsx.hh:38
void serialize(Archive &ar, unsigned version)
const std::unique_ptr< Rom > rom
Definition: MSXRom.hh:24