23 , basicBiosRom(getName() +
" BASIC/BIOS",
"rom", config,
"basicbios")
24 , firmwareRom (getName() +
" firmware" ,
"rom", config,
"firmware" )
26 reset(EmuTime::dummy());
31 bool newValue = value & 0x80;
32 if (newValue != firmwareSelected) {
33 firmwareSelected = newValue;
40 firmwareSelected =
false;
51 return firmwareSelected ? &firmwareRom[start & (firmwareRom.
size() - 1)] :
52 &basicBiosRom[start & (basicBiosRom.
size() - 1)];
55template<
typename Archive>
58 ar.template serializeBase<MSXDevice>(*
this);
59 ar.serialize(
"firmwareSelected", firmwareSelected);
#define REGISTER_MSXDEVICE(CLASS, NAME)
FraelSwitchableROM(const DeviceConfig &DeviceConfig)
const byte * getReadCacheLine(word start) const override
Test that the memory in the interval [start, start + CacheLine::SIZE) is cacheable for reading.
void writeIO(word port, byte value, EmuTime::param time) override
Write a byte to a given IO port at a certain time to this device.
byte readMem(word address, EmuTime::param time) override
Read a byte from a location at a certain time from this device.
void serialize(Archive &ar, unsigned version)
void reset(EmuTime::param time) override
This method is called on reset.
An MSXDevice is an emulated hardware component connected to the bus of the emulated MSX.
void invalidateDeviceRCache()
This file implemented 3 utility functions:
uint16_t word
16 bit unsigned integer
#define INSTANTIATE_SERIALIZE_METHODS(CLASS)