9 , ymf262(getName(), config, false)
25 switch (port & 0x03) {
31 return ymf262.
readReg(opl3latch);
39 switch (port & 0x03) {
45 return ymf262.
peekReg(opl3latch);
53 switch (port & 0x03) {
58 opl3latch = value | 0x100;
62 ymf262.
writeReg(opl3latch, value, time);
69template<
typename Archive>
72 ar.template serializeBase<MSXDevice>(*
this);
73 ar.serialize(
"ymf262", ymf262,
74 "opl3latch", opl3latch);
#define REGISTER_MSXDEVICE(CLASS, NAME)
An MSXDevice is an emulated hardware component connected to the bus of the emulated MSX.
EmuTime::param getCurrentTime() const
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.
MSXOPL3Cartridge(const DeviceConfig &config)
byte peekIO(word port, EmuTime::param time) const override
Read a byte from a given IO port.
void reset(EmuTime::param time) override
This method is called on reset.
byte readIO(word port, EmuTime::param time) override
Read a byte from an IO port at a certain time from this device.
void serialize(Archive &ar, unsigned version)
uint8_t readReg(unsigned reg) const
void reset(EmuTime::param time)
uint8_t peekStatus() const
void writeReg(unsigned r, uint8_t v, EmuTime::param time)
uint8_t peekReg(unsigned reg) const
This file implemented 3 utility functions:
uint16_t word
16 bit unsigned integer
#define INSTANTIATE_SERIALIZE_METHODS(CLASS)