openMSX
TurboRFDC.hh
Go to the documentation of this file.
1#ifndef TURBORFDC_HH
2#define TURBORFDC_HH
3
4#include "MSXFDC.hh"
6#include "TC8566AF.hh"
7#include <span>
8
9namespace openmsx {
10
11class TurboRFDC final : public MSXFDC
12{
13public:
14 enum Type { BOTH, R7FF2, R7FF8 };
15
16 explicit TurboRFDC(const DeviceConfig& config);
17
18 void reset(EmuTime::param time) override;
19 [[nodiscard]] byte readMem(word address, EmuTime::param time) override;
20 [[nodiscard]] byte peekMem(word address, EmuTime::param time) const override;
21 void writeMem(word address, byte value, EmuTime::param time) override;
22 [[nodiscard]] const byte* getReadCacheLine(word start) const override;
23 [[nodiscard]] byte* getWriteCacheLine(word address) const override;
24
25 template<typename Archive>
26 void serialize(Archive& ar, unsigned version);
27
28private:
29 void setBank(byte value);
30
31private:
32 TC8566AF controller;
33 RomBlockDebuggable romBlockDebug;
34 std::span<const byte, 0x4000> memory;
35 const byte blockMask;
36 byte bank;
37 const Type type;
38};
39
40} // namespace openmsx
41
42#endif
void reset(EmuTime::param time) override
This method is called on reset.
Definition TurboRFDC.cc:62
void serialize(Archive &ar, unsigned version)
Definition TurboRFDC.cc:223
byte peekMem(word address, EmuTime::param time) const override
Read a byte from a given memory location.
Definition TurboRFDC.cc:102
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.
Definition TurboRFDC.cc:165
const byte * getReadCacheLine(word start) const override
Test that the memory in the interval [start, start + CacheLine::SIZE) is cacheable for reading.
Definition TurboRFDC.cc:154
byte * getWriteCacheLine(word address) const override
Test that the memory in the interval [start, start + CacheLine::SIZE) is cacheable for writing.
Definition TurboRFDC.cc:211
byte readMem(word address, EmuTime::param time) override
Read a byte from a location at a certain time from this device.
Definition TurboRFDC.cc:68
This file implemented 3 utility functions:
Definition Autofire.cc:9
uint16_t word
16 bit unsigned integer
Definition openmsx.hh:29