openMSX
RomSuperLodeRunner.cc
Go to the documentation of this file.
1 #include "RomSuperLodeRunner.hh"
2 #include "serialize.hh"
3 #include <cassert>
4 
5 namespace openmsx {
6 
8  const DeviceConfig& config, Rom&& rom_)
9  : Rom16kBBlocks(config, std::move(rom_))
10 {
11  reset(EmuTime::dummy());
12 }
13 
14 void RomSuperLodeRunner::reset(EmuTime::param /*time*/)
15 {
16  setUnmapped(0);
17  setUnmapped(1);
18  setRom(2, 0);
19  setUnmapped(3);
20 }
21 
22 void RomSuperLodeRunner::globalWrite(word address, byte value, EmuTime::param /*time*/)
23 {
24  assert(address == 0);
25  (void)address;
26  setRom(2, value);
27 }
28 
29 REGISTER_MSXDEVICE(RomSuperLodeRunner, "RomSuperLodeRunner");
30 
31 } // namespace openmsx
void setRom(byte region, unsigned block)
Selects a block of the ROM image for reading in a certain region.
Definition: RomBlocks.cc:98
void globalWrite(word address, byte value, EmuTime::param time) override
Global writes.
uint8_t byte
8 bit unsigned integer
Definition: openmsx.hh:26
STL namespace.
RomSuperLodeRunner(const DeviceConfig &config, Rom &&rom)
REGISTER_MSXDEVICE(ChakkariCopy, "ChakkariCopy")
void reset(EmuTime::param time) override
This method is called on reset.
Thanks to enen for testing this on a real cartridge:
Definition: Autofire.cc:5
uint16_t word
16 bit unsigned integer
Definition: openmsx.hh:29
void setUnmapped(byte region)
Select &#39;unmapped&#39; memory for this region.
Definition: RomBlocks.cc:85