openMSX
Main Page
Namespaces
Classes
Files
File List
File Members
memory
RomSuperLodeRunner.cc
Go to the documentation of this file.
1
#include "
RomSuperLodeRunner.hh
"
2
#include "
MSXCPUInterface.hh
"
3
#include "
Rom.hh
"
4
#include "
serialize.hh
"
5
#include <cassert>
6
7
namespace
openmsx {
8
9
RomSuperLodeRunner::RomSuperLodeRunner
(
10
const
DeviceConfig
& config, std::unique_ptr<Rom> rom)
11
:
Rom16kBBlocks
(config, std::move(rom))
12
{
13
getCPUInterface
().
registerGlobalWrite
(*
this
, 0x0000);
14
reset
(
EmuTime::dummy
());
15
}
16
17
RomSuperLodeRunner::~RomSuperLodeRunner
()
18
{
19
getCPUInterface
().
unregisterGlobalWrite
(*
this
, 0x0000);
20
}
21
22
void
RomSuperLodeRunner::reset
(
EmuTime::param
/*time*/
)
23
{
24
setUnmapped
(0);
25
setUnmapped
(1);
26
setRom
(2, 0);
27
setUnmapped
(3);
28
}
29
30
void
RomSuperLodeRunner::globalWrite
(
word
address,
byte
value,
EmuTime::param
/*time*/
)
31
{
32
assert(address == 0);
33
(void)address;
34
setRom
(2, value);
35
}
36
37
REGISTER_MSXDEVICE
(
RomSuperLodeRunner
,
"RomSuperLodeRunner"
);
38
39
}
// namespace openmsx
Generated on Mon May 20 2013 12:17:00 for openMSX by
1.8.1.2