14 , romBlockDebug(*this,
std::span{&conversion, 1}, 0x4000, 0x8000, 15)
17 throw MSXException(
"Dooly ROM-size must be exactly 32kB");
28 if ((0x4000 <= address) && (address < 0xc000)) {
29 byte value =
rom[address - 0x4000];
34 return (value & 0xf8) | (value << 2 & 0x04) | (value >> 1 & 0x03);
36 return (value & 0xf8) | (value >> 2 & 0x01) | (value << 1 & 0x06);
40 switch (value & 0x07) {
48 if (conversion == 2)
return (value & 0xf8) | (((value << 2 & 0x04) | (value >> 1 & 0x03)) ^ 0x07);
49 if (conversion == 5)
return value ^ 0x07;
50 if (conversion == 6)
return (value & 0xf8) | (((value >> 2 & 0x01) | (value << 1 & 0x06)) ^ 0x07);
77 if ((0x8000 <= address) && (address < 0x9000)) {
78 conversion = value & 0x07;
91template<
typename Archive>
94 ar.template serializeBase<MSXDevice>(*
this);
95 ar.serialize(
"conversion", conversion);
#define REGISTER_MSXDEVICE(CLASS, NAME)
static std::array< byte, 0x10000 > unmappedWrite
byte readMem(word address, EmuTime::param time) override
Read a byte from a location at a certain time from this device.
void reset(EmuTime::param time) override
This method is called on reset.
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 peekMem(word address, EmuTime::param time) const override
Read a byte from a given memory location.
void serialize(Archive &ar, unsigned version)
RomDooly(const DeviceConfig &config, Rom &&rom)
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
#define INSTANTIATE_SERIALIZE_METHODS(CLASS)