29 "The size of this ROM image is larger than 256kB, "
30 "which is not supported on real Konami mapper chips!");
38void RomKonami::bankSwitch(
unsigned page,
unsigned block)
43 if (page == 2 || page == 3) {
46 }
else if (page == 4 || page == 5) {
56 for (
auto i :
xrange(2, 6)) {
64 if (0x6000 <= address && address < 0xC000) {
65 bankSwitch(address >> 13, value);
71 return (0x6000 <= address && address < 0xC000) ? nullptr :
unmappedWrite.data();
74template<
typename Archive>
77 ar.template serializeBase<Rom8kBBlocks>(*
this);
#define REGISTER_MSXDEVICE(CLASS, NAME)
void printWarning(std::string_view message)
MSXMotherBoard & getMotherBoard() const
Get the mother board this device belongs to.
static std::array< byte, 0x10000 > unmappedWrite
MSXCliComm & getMSXCliComm()
void setBlockMask(int mask)
Sets a mask for the block numbers.
void setRom(unsigned region, unsigned block)
Selects a block of the ROM image for reading in a certain region.
RomKonami(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.
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.
void serialize(Archive &ar, unsigned version)
This file implemented 3 utility functions:
uint16_t word
16 bit unsigned integer
#define INSTANTIATE_SERIALIZE_METHODS(CLASS)
constexpr auto xrange(T e)