| e8555c89 Andy McCall |
1 |
#include "RomSuperSwangi.hh" |
| 2 |
|
| 3 |
#include "CacheLine.hh" |
| 4 |
|
| 5 |
namespace openmsx { |
| 6 |
|
| 7 |
RomSuperSwangi::RomSuperSwangi(const DeviceConfig& config, Rom&& rom_) |
| 8 |
: Rom16kBBlocks(config, std::move(rom_)) |
| 9 |
{ |
| 10 |
reset(EmuTime::dummy()); |
| 11 |
} |
| 12 |
|
| 13 |
void RomSuperSwangi::reset(EmuTime ) |
| 14 |
{ |
| 15 |
setUnmapped(0); |
| 16 |
setRom(1, 0); |
| 17 |
setRom(2, 0); |
| 18 |
setUnmapped(3); |
| 19 |
} |
| 20 |
|
| 21 |
void RomSuperSwangi::writeMem(uint16_t address, byte value, EmuTime ) |
| 22 |
{ |
| 23 |
if (address == 0x8000) { |
| 24 |
setRom(2, value >> 1); |
| 25 |
} |
| 26 |
} |
| 27 |
|
| 28 |
byte* RomSuperSwangi::getWriteCacheLine(uint16_t address) |
| 29 |
{ |
| 30 |
if (address == (0x8000 & CacheLine::HIGH)) return nullptr; |
| 31 |
return unmappedWrite.data(); |
| 32 |
} |
| 33 |
|
| 34 |
REGISTER_MSXDEVICE(RomSuperSwangi, "RomSuperSwangi"); |
| 35 |
|
| 36 |
} |