9 , sram(getName() +
" SRAM", 4 * 13, config)
10 , rp5c01(getCommandController(), sram, getCurrentTime(), getName())
26 return port & 0x01 ? rp5c01.
readPort(registerLatch, time) | 0xF0 : 0xFF;
31 return port & 0x01 ? rp5c01.
peekPort(registerLatch) | 0xF0 : 0xFF;
36 switch (port & 0x01) {
38 registerLatch = value & 0x0F;
41 rp5c01.
writePort(registerLatch, value & 0x0F, time);
48template<
typename Archive>
51 ar.template serializeBase<MSXDevice>(*
this);
52 ar.serialize(
"sram", sram,
54 "registerLatch", registerLatch);
#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 reset(EmuTime::param time) override
This method is called on reset.
byte peekIO(word port, EmuTime::param time) const override
Read a byte from a given IO port.
MSXRTC(const DeviceConfig &config)
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)
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.
nibble readPort(nibble port, EmuTime::param time)
void reset(EmuTime::param time)
nibble peekPort(nibble port) const
void writePort(nibble port, nibble value, EmuTime::param time)
This file implemented 3 utility functions:
uint16_t word
16 bit unsigned integer
#define INSTANTIATE_SERIALIZE_METHODS(CLASS)