9[[nodiscard]]
static unsigned calcBaseAddr(
const DeviceConfig& config)
11 int base = config.getChild(
"mem").getAttributeValueAsInt(
"base", 0);
12 int first = config.getChild(
"rom").getChildDataAsInt(
"firstblock", 0);
13 return first * 0x2000 - base;
18 , panasonicMemory(getMotherBoard().getPanasonicMemory())
19 , baseAddr(calcBaseAddr(config))
32 unsigned addr = address + baseAddr;
33 return &panasonicMemory.
getRomBlock(addr >> 13)[addr & 0x1FFF];
#define REGISTER_MSXDEVICE(CLASS, NAME)
std::span< const byte, 0x2000 > getRomBlock(unsigned block) const
const byte * getReadCacheLine(word address) const override
Test that the memory in the interval [start, start + CacheLine::SIZE) is cacheable for reading.
RomDRAM(const DeviceConfig &config, Rom &&rom)
byte readMem(word address, EmuTime::param time) override
Read a byte from a location at a certain time from this device.
This file implemented 3 utility functions:
uint16_t word
16 bit unsigned integer