openMSX
Main Page
Namespaces
Classes
Files
File List
File Members
memory
RomHarryFox.cc
Go to the documentation of this file.
1
// This mapper is used for the game "Harry Fox Yki no Maoh"
2
10
#include "
RomHarryFox.hh
"
11
#include "
Rom.hh
"
12
#include "
serialize.hh
"
13
14
namespace
openmsx {
15
16
RomHarryFox::RomHarryFox
(
const
DeviceConfig
& config, std::unique_ptr<Rom> rom)
17
:
Rom16kBBlocks
(config, std::move(rom))
18
{
19
reset
(
EmuTime::dummy
());
20
}
21
22
void
RomHarryFox::reset
(
EmuTime::param
/*time*/
)
23
{
24
setUnmapped
(0);
25
setRom
(1, 0);
26
setRom
(2, 1);
27
setUnmapped
(3);
28
}
29
30
void
RomHarryFox::writeMem
(
word
address,
byte
value,
EmuTime::param
/*time*/
)
31
{
32
if
((0x6000 <= address) && (address < 0x7000)) {
33
setRom
(1, 2 * (value & 1) + 0);
34
}
else
if
((0x7000 <= address) && (address < 0x8000)) {
35
setRom
(2, 2 * (value & 1) + 1);
36
}
37
}
38
39
byte
*
RomHarryFox::getWriteCacheLine
(
word
address)
const
40
{
41
if
((0x6000 <= address) && (address < 0x8000)) {
42
return
nullptr
;
43
}
else
{
44
return
unmappedWrite
;
45
}
46
}
47
48
REGISTER_MSXDEVICE
(
RomHarryFox
,
"RomHarryFox"
);
49
50
}
// namespace openmsx
Generated on Mon May 20 2013 12:17:00 for openMSX by
1.8.1.2