openMSX
RomPadial8kB.cc
Go to the documentation of this file.
1// Padial 8kB
2//
3// The address to change banks:
4// bank 1: 0x6000 - 0x67ff (0x6000 used)
5// bank 2: 0x6800 - 0x6fff (0x6800 used)
6// bank 3: 0x7000 - 0x77ff (0x7000 used)
7// bank 4: 0x7800 - 0x7fff (0x7800 used)
8
9#include "RomPadial8kB.hh"
10#include "serialize.hh"
11#include "xrange.hh"
12
13namespace openmsx {
14
16 : RomAscii8kB(config, std::move(rom_))
17{
18 reset(EmuTime::dummy());
19}
20
21void RomPadial8kB::reset(EmuTime::param /*time*/)
22{
23 setRom(0, 0);
24 setRom(1, 0);
25 for (auto i : xrange(2, 6)) {
26 setRom(i, i - 2);
27 }
28 setUnmapped(6);
29 setUnmapped(7);
30}
31
33
34} // namespace openmsx
void setRom(byte region, unsigned block)
Selects a block of the ROM image for reading in a certain region.
Definition: RomBlocks.cc:105
void setUnmapped(byte region)
Select 'unmapped' memory for this region.
Definition: RomBlocks.cc:92
RomPadial8kB(const DeviceConfig &config, Rom &&rom)
Definition: RomPadial8kB.cc:15
void reset(EmuTime::param time) override
This method is called on reset.
Definition: RomPadial8kB.cc:21
This file implemented 3 utility functions:
Definition: Autofire.cc:9
REGISTER_MSXDEVICE(ChakkariCopy, "ChakkariCopy")
STL namespace.
constexpr auto xrange(T e)
Definition: xrange.hh:133