openMSX
MSXS1990.hh
Go to the documentation of this file.
1#ifndef MSXS1990_HH
2#define MSXS1990_HH
3
4#include "MSXDevice.hh"
5#include "FirmwareSwitch.hh"
6#include "SimpleDebuggable.hh"
7
8namespace openmsx {
9
15class MSXS1990 final : public MSXDevice
16{
17public:
18 explicit MSXS1990(const DeviceConfig& config);
19
20 void reset(EmuTime::param time) override;
21 [[nodiscard]] byte readIO(word port, EmuTime::param time) override;
22 [[nodiscard]] byte peekIO(word port, EmuTime::param time) const override;
23 void writeIO(word port, byte value, EmuTime::param time) override;
24
25 template<typename Archive>
26 void serialize(Archive& ar, unsigned version);
27
28private:
29 [[nodiscard]] byte readRegister(byte reg) const;
30 void writeRegister(byte reg, byte value);
31 void setCPUStatus(byte value);
32
33private:
34 struct Debuggable final : SimpleDebuggable {
35 Debuggable(MSXMotherBoard& motherBoard, const std::string& name);
36 [[nodiscard]] byte read(unsigned address) override;
37 void write(unsigned address, byte value) override;
38 } debuggable;
39
40 FirmwareSwitch firmwareSwitch;
41 byte registerSelect;
42 byte cpuStatus;
43};
44
45} // namespace openmsx
46
47#endif
An MSXDevice is an emulated hardware component connected to the bus of the emulated MSX.
Definition MSXDevice.hh:36
This class implements the MSX-engine found in a MSX Turbo-R (S1990)
Definition MSXS1990.hh:16
void serialize(Archive &ar, unsigned version)
Definition MSXS1990.cc:115
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.
Definition MSXS1990.cc:43
void reset(EmuTime::param time) override
This method is called on reset.
Definition MSXS1990.cc:20
byte readIO(word port, EmuTime::param time) override
Read a byte from an IO port at a certain time from this device.
Definition MSXS1990.cc:26
byte peekIO(word port, EmuTime::param time) const override
Read a byte from a given IO port.
Definition MSXS1990.cc:31
This file implemented 3 utility functions:
Definition Autofire.cc:11
uint16_t word
16 bit unsigned integer
Definition openmsx.hh:29