13 , rom(getName() +
" ROM",
"rom", config)
14 , ym2413(getName(), config)
17 if (!std::has_single_bit(sz)) {
18 throw MSXException(
"MSX-Music ROM-size must be a non-zero power of two");
56template<
typename Archive>
59 ar.template serializeBase<MSXDevice>(*
this);
61 if (ar.versionAtLeast(version, 2)) {
62 ar.serialize(
"ym2413",
ym2413);
80template<
typename Archive>
83 ar.template serializeInlinedBase<MSXMusicBase>(*
this, version);
118 if ((0x7FF0 <= address) && (address < 0x8000)) {
119 return control | 0xFC;
120 }
else if ((control & 1) == 0) {
136 }
else if ((control & 1) == 0) {
145 if ((0x7FF0 <= address) && (address < 0x8000)) {
160template<
typename Archive>
163 ar.template serializeInlinedBase<MSXMusicBase>(*
this, version);
164 ar.serialize(
"control", control);
An MSXDevice is an emulated hardware component connected to the bus of the emulated MSX.
void invalidateDeviceRCache()
static std::array< byte, 0x10000 > unmappedRead
static std::array< byte, 0x10000 > unmappedWrite
EmuTime::param getCurrentTime() const
const byte * getReadCacheLine(word start) const override
Test that the memory in the interval [start, start + CacheLine::SIZE) is cacheable for reading.
void writeIO(word port, byte value, EmuTime::param time) override
Write a byte to a given IO port at a certain time to this device.
void reset(EmuTime::param time) override
This method is called on reset.
void writePort(bool port, byte value, EmuTime::param time)
byte readMem(word address, EmuTime::param time) override
Read a byte from a location at a certain time from this device.
void serialize(Archive &ar, unsigned version)
byte peekMem(word address, EmuTime::param time) const override
Read a byte from a given memory location.
MSXMusicBase(const DeviceConfig &config)
MSXMusicWX(const DeviceConfig &config)
const byte * getReadCacheLine(word start) const override
Test that the memory in the interval [start, start + CacheLine::SIZE) is cacheable for reading.
byte peekMem(word address, EmuTime::param time) const override
Read a byte from a given memory location.
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.
void serialize(Archive &ar, unsigned version)
void reset(EmuTime::param time) override
This method is called on reset.
byte * getWriteCacheLine(word start) const override
Test that the memory in the interval [start, start + CacheLine::SIZE) is cacheable for writing.
byte readMem(word address, EmuTime::param time) override
Read a byte from a location at a certain time from this device.
MSXMusic(const DeviceConfig &config)
void serialize(Archive &ar, unsigned version)
void writePort(bool port, byte value, EmuTime::param time)
void serialize(Archive &ar, unsigned version)
void reset(EmuTime::param time)
This file implemented 3 utility functions:
REGISTER_MSXDEVICE(ChakkariCopy, "ChakkariCopy")
uint16_t word
16 bit unsigned integer
#define INSTANTIATE_SERIALIZE_METHODS(CLASS)