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 & 0b111;
36 }
else if ((0x6000 <= address) && (address < 0x8000)) {
37 ram[address & 0x1FFF] = value;
51 if (address == 0x7f00) {
53 }
else if (address == 0x7f01) {
55 }
else if (address == 0x7f02) {
57 }
else if (address == 0x7f03) {
59 }
else if ((0x6000 <= address) && (address < 0x8000)) {
60 return ram[address & 0x1FFF];
69 if ((0x6000 <= address) && (address < 0x8000)) {
70 return &ram[address & 0x1FFF];
78 if ((0x6000 <= address) && (address < 0x8000)) {
79 return &ram[address & 0x1FFF];
84template<
typename Archive>
87 ar.template serializeBase<Rom8kBBlocks>(*
this);
#define REGISTER_MSXDEVICE(CLASS, NAME)
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) 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)
This file implemented 3 utility functions:
uint16_t word
16 bit unsigned integer
#define INSTANTIATE_SERIALIZE_METHODS(CLASS)