52 , ay8910(
"PSG", *
this, config, getCurrentTime())
55 reset(getCurrentTime());
86 switch (port & 0x07) {
88 registerLatch = value & 0x0F;
98 byte SVIPSG::readA(EmuTime::param time)
100 return ((ports[1]->read(time) & 0x0F) << 4) |
101 ((ports[0]->read(time) & 0x0F) << 0);
104 void SVIPSG::writeB(
byte value, EmuTime::param )
110 switch (~value & 0x14) {
118 switch (~value & 0x0B) {
120 if ((~value & 0x80) || (~value & 0x40)) {
138 template<
typename Archive>
141 ar.template serializeBase<MSXDevice>(*
this);
142 ar.serialize(
"ay8910", ay8910,
143 "registerLatch", registerLatch);
145 ar.serialize(
"portB", portB);
146 if constexpr (Archive::IS_LOADER) {
void reset(EmuTime::param time)
byte readRegister(unsigned reg, EmuTime::param time)
byte peekRegister(unsigned reg, EmuTime::param time) const
void writeRegister(unsigned reg, byte value, EmuTime::param time)
void setLed(Led led, bool status)
void setPrimarySlots(byte value)
An MSXDevice is an emulated hardware component connected to the bus of the emulated MSX.
MSXMotherBoard & getMotherBoard() const
Get the mother board this device belongs to.
EmuTime::param getCurrentTime() const
MSXCPUInterface & getCPUInterface()
LedStatus & getLedStatus()
JoystickPortIf & getJoystickPort(unsigned port)
void powerDown(EmuTime::param time) override
This method is called when MSX is powered down.
SVIPSG(const DeviceConfig &config)
byte peekIO(word port, EmuTime::param time) const override
Read a byte from a given IO port.
void serialize(Archive &ar, unsigned version)
byte readIO(word port, EmuTime::param time) override
Read a byte from an IO port at a certain time from this device.
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.
This file implemented 3 utility functions:
REGISTER_MSXDEVICE(ChakkariCopy, "ChakkariCopy")
uint16_t word
16 bit unsigned integer
#define INSTANTIATE_SERIALIZE_METHODS(CLASS)