1#ifndef MSXMULTIMEMDEVICE_HH
2#define MSXMULTIMEMDEVICE_HH
15 [[nodiscard]]
bool canAdd(
unsigned base,
unsigned size);
16 void add(
MSXDevice& device,
unsigned base,
unsigned size);
18 [[nodiscard]]
bool empty()
const {
return ranges.size() == 1; }
19 [[nodiscard]] std::vector<MSXDevice*>
getDevices()
const;
22 [[nodiscard]]
const std::string&
getName()
const override;
24 [[nodiscard]]
byte readMem(
word address, EmuTime::param time)
override;
25 [[nodiscard]]
byte peekMem(
word address, EmuTime::param time)
const override;
26 void writeMem(
word address,
byte value, EmuTime::param time)
override;
32 Range(
unsigned base_,
unsigned size_,
MSXDevice& device_);
33 [[nodiscard]]
constexpr bool operator==(
const Range&)
const =
default;
40 [[nodiscard]]
const Range& searchRange(
unsigned address)
const;
41 [[nodiscard]] MSXDevice* searchDevice(
unsigned address)
const;
An MSXDevice is an emulated hardware component connected to the bus of the emulated MSX.
void add(MSXDevice &device, unsigned base, unsigned size)
~MSXMultiMemDevice() override
bool canAdd(unsigned base, unsigned size)
byte peekMem(word address, EmuTime::param time) const override
Read a byte from a given memory location.
const byte * getReadCacheLine(word start) const override
Test that the memory in the interval [start, start + CacheLine::SIZE) is cacheable for reading.
const std::string & getName() const override
Returns a human-readable name for this device.
byte readMem(word address, EmuTime::param time) override
Read a byte from a location at a certain time from this device.
std::vector< MSXDevice * > getDevices() const
byte * getWriteCacheLine(word start) override
Test that the memory in the interval [start, start + CacheLine::SIZE) is cacheable for writing.
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 remove(MSXDevice &device, unsigned base, unsigned size)
void getNameList(TclObject &result) const override
Returns list of name(s) of this device.
This file implemented 3 utility functions:
bool operator==(const BooleanInput &x, const BooleanInput &y)
uint16_t word
16 bit unsigned integer