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
#define REGISTER_MSXDEVICE(CLASS, NAME)
Definition MSXDevice.hh:356
void setUnmapped(unsigned region)
Select 'unmapped' memory for this region.
Definition RomBlocks.cc:92
void setRom(unsigned region, unsigned block)
Selects a block of the ROM image for reading in a certain region.
Definition RomBlocks.cc:104
RomPadial8kB(const DeviceConfig &config, Rom &&rom)
void reset(EmuTime::param time) override
This method is called on reset.
This file implemented 3 utility functions:
Definition Autofire.cc:11
STL namespace.
constexpr auto xrange(T e)
Definition xrange.hh:132