11 , ram(config,
getName() +
" RAM",
"ML-TS2 RAM", 0x2000)
13 reset(EmuTime::dummy());
25 if (address == 0x7f00) {
27 }
else if (address == 0x7f01) {
29 }
else if (address == 0x7f02) {
31 }
else if (address == 0x7f03) {
33 }
else if (address == 0x7FC0) {
34 byte bank = ((value & 0x10) >> 2) |
35 ((value & 0x04) >> 1) |
36 ((value & 0x01) >> 0);
37 std::cerr <<
"Setting MLTS2 mapper page 1 to bank " << int(bank) <<
'\n';
39 }
else if ((0x6000 <= address) && (address < 0x8000)) {
40 ram[address & 0x1FFF] = value;
54 if (address == 0x7f00) {
56 }
else if (address == 0x7f01) {
58 }
else if (address == 0x7f02) {
60 }
else if (address == 0x7f03) {
62 }
else if ((0x6000 <= address) && (address < 0x8000)) {
63 return ram[address & 0x1FFF];
72 if ((0x6000 <= address) && (address < 0x8000)) {
73 return &ram[address & 0x1FFF];
81 if ((0x6000 <= address) && (address < 0x8000)) {
82 return const_cast<byte*
>(&ram[address & 0x1FFF]);
87template<
typename Archive>
90 ar.template serializeBase<Rom8kBBlocks>(*
this);
static std::array< byte, 0x10000 > unmappedWrite
byte peekMem(word address, EmuTime::param time) const override
Read a byte from a given memory location.
void setRom(unsigned region, unsigned block)
Selects a block of the ROM image for reading in a certain region.
const byte * getReadCacheLine(word address) const override
Test that the memory in the interval [start, start + CacheLine::SIZE) is cacheable for reading.
void writeMem(word address, byte value, EmuTime::param time) override
Write a given byte to a given location at a certain time to this device.
RomMitsubishiMLTS2(const DeviceConfig &config, Rom &&rom)
byte peekMem(word address, EmuTime::param time) const override
Read a byte from a given memory location.
byte readMem(word address, EmuTime::param time) override
Read a byte from a location at a certain time from this device.
byte * getWriteCacheLine(word address) const override
Test that the memory in the interval [start, start + CacheLine::SIZE) is cacheable for writing.
const byte * getReadCacheLine(word address) const override
Test that the memory in the interval [start, start + CacheLine::SIZE) is cacheable for reading.
void reset(EmuTime::param time) override
This method is called on reset.
void serialize(Archive &ar, unsigned version)
std::string getName(KeyCode keyCode)
Translate key code to key name.
This file implemented 3 utility functions:
REGISTER_MSXDEVICE(ChakkariCopy, "ChakkariCopy")
uint16_t word
16 bit unsigned integer
#define INSTANTIATE_SERIALIZE_METHODS(CLASS)