12 template<
unsigned BANK_SIZE_>
21 [[nodiscard]]
byte readMem(
word address, EmuTime::param time)
override;
22 [[nodiscard]]
byte peekMem(
word address, EmuTime::param time)
const override;
25 template<
typename Archive>
26 void serialize(Archive& ar,
unsigned version);
42 unsigned debugBankSizeShift = 0);
56 void setBank(
byte region,
const byte* adr,
int block);
64 void setRom(
byte region,
unsigned block);
84 std::unique_ptr<SRAM>
sram;
void setExtraMemory(const byte *mem, unsigned size)
Inform this base class of extra mapable memory block.
RomBlocks(const DeviceConfig &config, Rom &&rom, unsigned debugBankSizeShift=0)
Constructor.
byte peekMem(word address, EmuTime::param time) const override
Read a byte from a given memory location.
void setBank(byte region, const byte *adr, int block)
Sets the memory visible for reading in a certain region.
static constexpr unsigned NUM_BANKS
std::unique_ptr< SRAM > sram
byte readMem(word address, EmuTime::param time) override
Read a byte from a location at a certain time from this device.
void setBlockMask(int mask)
Sets a mask for the block numbers.
static constexpr unsigned BANK_MASK
unsigned getBaseSizeAlignment() const override
The 'base' and 'size' attribute values need to be at least aligned to CacheLine::SIZE.
void serialize(Archive &ar, unsigned version)
void setRom(byte region, unsigned block)
Selects a block of the ROM image for reading in a certain region.
const byte * bankPtr[NUM_BANKS]
const byte * getReadCacheLine(word address) const override
Test that the memory in the interval [start, start + CacheLine::SIZE) is cacheable for reading.
static constexpr unsigned BANK_SIZE
void setUnmapped(byte region)
Select 'unmapped' memory for this region.
This file implemented 3 utility functions:
uint16_t word
16 bit unsigned integer
constexpr nibble mask[4][13]
REGISTER_BASE_CLASS(Connector, "Connector")
size_t size(std::string_view utf8)