openMSX
RomPlayBall.hh
Go to the documentation of this file.
1 #ifndef ROMPLAYBALL_HH
2 #define ROMPLAYBALL_HH
3 
4 #include "RomBlocks.hh"
5 #include "SamplePlayer.hh"
6 
7 namespace openmsx {
8 
9 class RomPlayBall final : public Rom16kBBlocks
10 {
11 public:
12  RomPlayBall(const DeviceConfig& config, Rom&& rom);
13 
14  void reset(EmuTime::param time) override;
15  byte peekMem(word address, EmuTime::param time) const override;
16  byte readMem(word address, EmuTime::param time) override;
17  const byte* getReadCacheLine(word address) const override;
18  void writeMem(word address, byte value, EmuTime::param time) override;
19  byte* getWriteCacheLine(word address) const override;
20 
21  template<typename Archive>
22  void serialize(Archive& ar, unsigned version);
23 
24 private:
25  SamplePlayer samplePlayer;
26 };
27 
28 } // namespace openmsx
29 
30 #endif
openmsx::RomPlayBall::reset
void reset(EmuTime::param time) override
This method is called on reset.
Definition: RomPlayBall.cc:23
openmsx::DeviceConfig
Definition: DeviceConfig.hh:19
openmsx::RomPlayBall::peekMem
byte peekMem(word address, EmuTime::param time) const override
Read a byte from a given memory location.
Definition: RomPlayBall.cc:28
openmsx::RomPlayBall
Definition: RomPlayBall.hh:9
openmsx::RomPlayBall::getReadCacheLine
const byte * getReadCacheLine(word address) const override
Test that the memory in the interval [start, start + CacheLine::SIZE) is cacheable for reading.
Definition: RomPlayBall.cc:42
openmsx::RomPlayBall::getWriteCacheLine
byte * getWriteCacheLine(word address) const override
Test that the memory in the interval [start, start + CacheLine::SIZE) is cacheable for writing.
Definition: RomPlayBall.cc:60
openmsx::RomBlocks
Definition: RomBlocks.hh:13
openmsx::RomPlayBall::serialize
void serialize(Archive &ar, unsigned version)
Definition: RomPlayBall.cc:70
openmsx::MSXRom::rom
Rom rom
Definition: MSXRom.hh:20
openmsx::Rom
Definition: Rom.hh:20
openmsx::word
uint16_t word
16 bit unsigned integer
Definition: openmsx.hh:29
openmsx::SamplePlayer
Definition: SamplePlayer.hh:10
SamplePlayer.hh
openmsx::RomPlayBall::writeMem
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.
Definition: RomPlayBall.cc:51
openmsx::RomPlayBall::readMem
byte readMem(word address, EmuTime::param time) override
Read a byte from a location at a certain time from this device.
Definition: RomPlayBall.cc:37
openmsx::RomPlayBall::RomPlayBall
RomPlayBall(const DeviceConfig &config, Rom &&rom)
Definition: RomPlayBall.cc:8
openmsx
Thanks to enen for testing this on a real cartridge:
Definition: Autofire.cc:5
RomBlocks.hh