16 assert(devices.empty());
23 "Overlapping IO-port ranges for \"",
26 devices.push_back(device);
43 for (
const auto* dev : devices) {
44 const auto& name = dev->getName();
57 for (
auto& dev : devices) {
58 result &= dev->readIO(port, time);
67 for (
const auto& dev : devices) {
68 result &= dev->peekIO(port, time);
75 for (
auto& dev : devices) {
76 dev->writeIO(port, value, time);
An MSXDevice is an emulated hardware component connected to the bus of the emulated MSX.
virtual const std::string & getName() const
Returns a human-readable name for this device.
void addDevice(MSXDevice *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.
byte readIO(word port, EmuTime::param time) override
Read a byte from an IO port at a certain time from this device.
~MSXMultiIODevice() override
void getNameList(TclObject &result) const override
Returns list of name(s) of this device.
void removeDevice(MSXDevice *device)
MSXMultiIODevice(const HardwareConfig &hwConf)
byte peekIO(word port, EmuTime::param time) const override
Read a byte from a given IO port.
const std::string & getName() const override
Returns a human-readable name for this device.
void addListElement(const T &t)
zstring_view getString() const
This file implemented 3 utility functions:
uint16_t word
16 bit unsigned integer
auto rfind_unguarded(RANGE &range, const VAL &val, Proj proj={})
Similar to the find(_if)_unguarded functions above, but searches from the back to front.
constexpr bool contains(ITER first, ITER last, const VAL &val)
Check if a range contains a given value, using linear search.