15 if (
auto size =
rom.
size() / 1024;
16 size !=
one_of(128u, 256u, 512u, 1024u)) {
18 "MegaCart only supports ROMs of 128kB, 256kB, 512kB and 1024kB "
19 "size and not of ", size,
"kB.");
21 reset(EmuTime::dummy());
41 if (address >= 0xFFC0) {
#define REGISTER_MSXDEVICE(CLASS, NAME)
void invalidateDeviceRCache()
void setUnmapped(unsigned region)
Select 'unmapped' memory for this region.
byte readMem(word address, EmuTime::param time) override
Read a byte from a location at a certain time from this device.
void setRom(unsigned region, unsigned block)
Selects a block of the ROM image for reading in a certain region.
const byte * getReadCacheLine(word address) const override
Test that the memory in the interval [start, start + CacheLine::SIZE) is cacheable for reading.
void reset(EmuTime::param time) override
This method is called on reset.
RomColecoMegaCart(const DeviceConfig &config, Rom &&rom)
const byte * getReadCacheLine(word start) const override
Test that the memory in the interval [start, start + CacheLine::SIZE) is cacheable for reading.
byte readMem(word address, EmuTime::param time) override
Read a byte from a location at a certain time from this device.
This file implemented 3 utility functions:
uint16_t word
16 bit unsigned integer