10static constexpr byte ID = 0xF7;
15 , rom(getName(),
"Kanji-12 ROM", config)
17 if (rom.
size() !=
one_of(0x20000u, 0x40000u)) {
18 throw MSXException(
"MSXKanji12: wrong kanji ROM, it should be either 128kB or 256kB.");
21 reset(EmuTime::dummy());
32 switch (port & 0x0F) {
42 switch (port & 0x0F) {
48 if (address < rom.
size()) {
60 switch (port & 0x0F) {
66 byte col = narrow<byte>(((address - 0x800) / 18) % 192);
67 address = 0x800 + (row * 192 + col) * 18;
71 byte row = narrow<byte>((address - 0x800) / (18 * 192));
73 address = 0x800 + (row * 192 + col) * 18;
84template<
typename Archive>
87 ar.template serializeBase<MSXDevice>(*
this);
90 ar.serialize(
"address", address);
#define REGISTER_MSXDEVICE(CLASS, NAME)
An MSXDevice is an emulated hardware component connected to the bus of the emulated MSX.
byte readSwitchedIO(word port, EmuTime::param time) override
byte peekSwitchedIO(word port, EmuTime::param time) const override
void getExtraDeviceInfo(TclObject &result) const override
void reset(EmuTime::param time) override
This method is called on reset.
void writeSwitchedIO(word port, byte value, EmuTime::param time) override
MSXKanji12(const DeviceConfig &config)
void serialize(Archive &ar, unsigned version)
void getInfo(TclObject &result) const
Add dict values with info to result.
This file implemented 3 utility functions:
uint8_t byte
8 bit unsigned integer
uint16_t word
16 bit unsigned integer
#define INSTANTIATE_SERIALIZE_METHODS(CLASS)