13template<
unsigned BANK_SIZE_>
22 [[nodiscard]]
byte readMem(
word address, EmuTime::param time)
override;
23 [[nodiscard]]
byte peekMem(
word address, EmuTime::param time)
const override;
26 template<
typename Archive>
27 void serialize(Archive& ar,
unsigned version);
43 unsigned debugBankSizeShift = 0);
57 void setBank(
unsigned region,
const byte* adr,
byte block);
65 void setRom(
unsigned region,
unsigned block);
84 std::array<const byte*, NUM_BANKS>
bankPtr;
85 std::unique_ptr<SRAM>
sram;
90 std::span<const byte> extraMem;
void setBank(unsigned region, const byte *adr, byte block)
Sets the memory visible for reading in a certain region.
void setUnmapped(unsigned region)
Select 'unmapped' memory for this region.
void setExtraMemory(std::span< const byte > mem)
Inform this base class of extra mappable memory block.
byte peekMem(word address, EmuTime::param time) const override
Read a byte from a given memory location.
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 setRom(unsigned region, unsigned block)
Selects a block of the ROM image for reading in a certain region.
void serialize(Archive &ar, unsigned version)
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
std::array< byte, NUM_BANKS > blockNr
std::array< const byte *, NUM_BANKS > bankPtr
This file implemented 3 utility functions:
uint16_t word
16 bit unsigned integer