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 
12 namespace openmsx {
13 
14 RomPadial8kB::RomPadial8kB(const DeviceConfig& config, Rom&& rom_)
15  : RomAscii8kB(config, std::move(rom_))
16 {
17  reset(EmuTime::dummy());
18 }
19 
20 void RomPadial8kB::reset(EmuTime::param /*time*/)
21 {
22  setRom(0, 0);
23  setRom(1, 0);
24  for (int i = 2; i < 6; ++i) {
25  setRom(i, i - 2);
26  }
27  setUnmapped(6);
28  setUnmapped(7);
29 }
30 
31 REGISTER_MSXDEVICE(RomPadial8kB, "RomPadial8kB");
32 
33 } // namespace openmsx
#define REGISTER_MSXDEVICE(CLASS, NAME)
Definition: MSXDevice.hh:307