openMSX
MSXS1985.hh
Go to the documentation of this file.
1/*
2 * This class implements the
3 * backup RAM
4 * bitmap function
5 * of the S1985 MSX-engine
6 *
7 * TODO explanation
8 */
9
10#ifndef S1985_HH
11#define S1985_HH
12
13#include "MSXDevice.hh"
14#include "MSXSwitchedDevice.hh"
15#include <memory>
16
17namespace openmsx {
18
19class SRAM;
20
21class MSXS1985 final : public MSXDevice, public MSXSwitchedDevice
22{
23public:
24 explicit MSXS1985(const DeviceConfig& config);
25 ~MSXS1985() override;
26
27 // MSXDevice
28 void reset(EmuTime::param time) override;
29
30 // MSXSwitchedDevice
31 [[nodiscard]] byte readSwitchedIO(word port, EmuTime::param time) override;
32 [[nodiscard]] byte peekSwitchedIO(word port, EmuTime::param time) const override;
33 void writeSwitchedIO(word port, byte value, EmuTime::param time) override;
34
35 template<typename Archive>
36 void serialize(Archive& ar, unsigned version);
37
38private:
39 std::unique_ptr<SRAM> sram;
40 nibble address;
41 byte color1;
42 byte color2;
43 byte pattern;
44};
46
47} // namespace openmsx
48
49#endif
An MSXDevice is an emulated hardware component connected to the bus of the emulated MSX.
Definition MSXDevice.hh:36
byte readSwitchedIO(word port, EmuTime::param time) override
Definition MSXS1985.cc:49
byte peekSwitchedIO(word port, EmuTime::param time) const override
Definition MSXS1985.cc:60
void reset(EmuTime::param time) override
This method is called on reset.
Definition MSXS1985.cc:44
void serialize(Archive &ar, unsigned version)
Definition MSXS1985.cc:96
void writeSwitchedIO(word port, byte value, EmuTime::param time) override
Definition MSXS1985.cc:74
~MSXS1985() override
Definition MSXS1985.cc:39
This file implemented 3 utility functions:
Definition Autofire.cc:11
uint8_t nibble
4 bit integer
Definition openmsx.hh:23
uint16_t word
16 bit unsigned integer
Definition openmsx.hh:29
#define SERIALIZE_CLASS_VERSION(CLASS, VERSION)