69 , i8255(*this, getCurrentTime(), config.getGlobalSettings().getInvalidPpiModeSetting())
70 , sram(getName() +
" SRAM", 0x1000, config)
83 return i8255.
read(port & 0x03, time);
88 return i8255.
peek(port & 0x03, time);
93 i8255.
write(port & 0x03, value, time);
99byte MSXHBI55::readA(EmuTime::param time)
103byte MSXHBI55::peekA(EmuTime::param )
const
107byte MSXHBI55::readB(EmuTime::param time)
111byte MSXHBI55::peekB(EmuTime::param )
const
115nibble MSXHBI55::readC0(EmuTime::param time)
119nibble MSXHBI55::peekC0(EmuTime::param )
const
121 return readStuff() & 0x0F;
123nibble MSXHBI55::readC1(EmuTime::param time)
127nibble MSXHBI55::peekC1(EmuTime::param )
const
129 return readStuff() >> 4;
132void MSXHBI55::writeA(
byte , EmuTime::param )
136void MSXHBI55::writeB(
byte , EmuTime::param )
140void MSXHBI55::writeC0(
nibble value, EmuTime::param )
142 lastC = (lastC & 0xf0) | value;
145void MSXHBI55::writeC1(
nibble value, EmuTime::param )
147 lastC =
byte((lastC & 0x0f) | (value << 4));
151void MSXHBI55::writeStuff()
154 if ((
B & 0x70) != 0x40) {
164 unsigned addr = ((
B & 0x0f) << 8) |
A;
177byte MSXHBI55::readStuff()
const
180 if ((
B & 0x70) != 0x40) {
188 unsigned addr = ((
B & 0x0f) << 8) |
A;
204template<
typename Archive>
207 ar.template serializeBase<MSXDevice>(*
this);
208 ar.serialize(
"i8255", i8255,
210 if (ar.versionAtLeast(version, 2)) {
211 ar.serialize(
"lastC", lastC);
213 assert(Archive::IS_LOADER);
215 ar.serialize(
"writeLatch", writeLatch);
#define REGISTER_MSXDEVICE(CLASS, NAME)
void reset(EmuTime::param time)
byte peek(byte port, EmuTime::param time) const
byte read(byte port, EmuTime::param time)
void write(byte port, byte value, EmuTime::param time)
An MSXDevice is an emulated hardware component connected to the bus of the emulated MSX.
EmuTime::param getCurrentTime() const
void reset(EmuTime::param time) override
This method is called on reset.
byte peekIO(word port, EmuTime::param time) const override
Read a byte from a given IO port.
byte readIO(word port, EmuTime::param time) override
Read a byte from an IO port at a certain time from this device.
void writeIO(word port, byte value, EmuTime::param time) override
Write a byte to a given IO port at a certain time to this device.
void serialize(Archive &ar, unsigned version)
MSXHBI55(const DeviceConfig &config)
void write(size_t addr, byte value)
This file implemented 3 utility functions:
uint8_t byte
8 bit unsigned integer
uint8_t nibble
4 bit integer
uint16_t word
16 bit unsigned integer
std::array< const EDStorage, 4 > A
#define INSTANTIATE_SERIALIZE_METHODS(CLASS)