10 reset(EmuTime::dummy());
24 unsigned bbb = (address >> 11) & 0b111;
25 if ((bbb < 2) || (bbb & 1))
return;
26 unsigned region = (bbb >> 1) - 1;
27 if ((address & 1) == 0) {
28 blockReg[region] = uint16_t((blockReg[region] & 0xFF00) | value);
30 blockReg[region] = uint16_t((blockReg[region] & 0x00FF) | ((value & 0b1111) << 8));
32 setRom(region, blockReg[region]);
37 unsigned bbb = (address >> 11) & 0b111;
38 return ((bbb < 2) || (bbb & 1)) ?
unmappedWrite.data() :
nullptr;
41template<
typename Archive>
44 ar.template serializeBase<Rom16kBBlocks>(*
this);
45 ar.serialize(
"blockReg", blockReg);
#define REGISTER_MSXDEVICE(CLASS, NAME)
static std::array< byte, 0x10000 > unmappedWrite
void setUnmapped(unsigned region)
Select 'unmapped' memory for this region.
void setRom(unsigned region, unsigned block)
Selects a block of the ROM image for reading in a certain region.
void reset(EmuTime::param time) override
This method is called on reset.
void serialize(Archive &ar, unsigned version)
RomNeo16(const DeviceConfig &config, Rom &&rom)
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.
byte * getWriteCacheLine(word address) override
Test that the memory in the interval [start, start + CacheLine::SIZE) is cacheable for writing.
This file implemented 3 utility functions:
uint16_t word
16 bit unsigned integer
constexpr auto xrange(T e)