openMSX
MSXToshibaTcx200x.hh
Go to the documentation of this file.
1#ifndef MSXTOSHIBATCX200X_HH
2#define MSXTOSHIBATCX200X_HH
3
4#include "MSXDevice.hh"
5#include "Rom.hh"
6#include "SRAM.hh"
7#include "BooleanSetting.hh"
8
9namespace openmsx {
10
11class MSXToshibaTcx200x final : public MSXDevice
12{
13public:
14 explicit MSXToshibaTcx200x(const DeviceConfig& config);
15
16 void reset(EmuTime::param time) override;
17
18 [[nodiscard]] byte readMem(word address, EmuTime::param time) override;
19 [[nodiscard]] byte peekMem(word address, EmuTime::param time) const override;
20 void writeMem(word address, byte value, EmuTime::param time) override;
21 [[nodiscard]] const byte* getReadCacheLine(word start) const override;
22 [[nodiscard]] byte* getWriteCacheLine(word start) override;
23
24 template<typename Archive>
25 void serialize(Archive& ar, unsigned version);
26
27private:
28 [[nodiscard]] bool sramEnabled() const;
29 [[nodiscard]] byte getSelectedSegment() const;
30
31private:
32 Rom rs232Rom;
33 Rom wordProcessorRom;
34 SRAM sram;
35 byte controlReg;
36 BooleanSetting copyButtonPressed;
37};
38
39} // namespace openmsx
40
41#endif
An MSXDevice is an emulated hardware component connected to the bus of the emulated MSX.
Definition MSXDevice.hh:36
void reset(EmuTime::param time) override
This method is called on reset.
void serialize(Archive &ar, unsigned version)
const byte * getReadCacheLine(word start) const override
Test that the memory in the interval [start, start + CacheLine::SIZE) is cacheable for reading.
void writeMem(word address, byte value, EmuTime::param time) override
Write a given byte to a given location at a certain time to this device.
byte readMem(word address, EmuTime::param time) override
Read a byte from a location at a certain time from this device.
byte peekMem(word address, EmuTime::param time) const override
Read a byte from a given memory location.
byte * getWriteCacheLine(word start) override
Test that the memory in the interval [start, start + CacheLine::SIZE) is cacheable for writing.
This file implemented 3 utility functions:
Definition Autofire.cc:11
uint16_t word
16 bit unsigned integer
Definition openmsx.hh:29