OXYGENHUB
◆ main openmsx / src / MSXToshibaTcx200x.hh
999 B · C++ · last changed chore(): initial commit 1 month ago source blame history raw
1
#ifndef MSXTOSHIBATCX200X_HH
2
#define MSXTOSHIBATCX200X_HH
3
4
#include "BooleanSetting.hh"
5
#include "MSXDevice.hh"
6
#include "Rom.hh"
7
#include "SRAM.hh"
8
9
namespace openmsx {
10
11
class MSXToshibaTcx200x final : public MSXDevice
12
{
13
public:
14
	explicit MSXToshibaTcx200x(DeviceConfig& config);
15
16
	void reset(EmuTime time) override;
17
18
	[[nodiscard]] byte readMem(uint16_t address, EmuTime time) override;
19
	[[nodiscard]] byte peekMem(uint16_t address, EmuTime time) const override;
20
	void writeMem(uint16_t address, byte value, EmuTime time) override;
21
	[[nodiscard]] const byte* getReadCacheLine(uint16_t start) const override;
22
	[[nodiscard]] byte* getWriteCacheLine(uint16_t start) override;
23
24
	template<typename Archive>
25
	void serialize(Archive& ar, unsigned version);
26
27
private:
28
	[[nodiscard]] bool sramEnabled() const;
29
	[[nodiscard]] byte getSelectedSegment() const;
30
31
private:
32
	Rom rs232Rom;
33
	Rom wordProcessorRom;
34
	SRAM sram;
35
	byte controlReg;
36
	BooleanSetting copyButtonPressed;
37
};
38
39
} // namespace openmsx
40
41
#endif