| 1 |
#ifndef MSXMODEM_HH |
| 2 |
#define MSXMODEM_HH |
| 3 |
|
| 4 |
#include "MSXDevice.hh" |
| 5 |
#include "Rom.hh" |
| 6 |
#include "SRAM.hh" |
| 7 |
#include <array> |
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
namespace openmsx { |
| 20 |
|
| 21 |
class MSXModem final : public MSXDevice |
| 22 |
{ |
| 23 |
public: |
| 24 |
explicit MSXModem(DeviceConfig& config); |
| 25 |
|
| 26 |
void reset(EmuTime time) override; |
| 27 |
void writeMem(uint16_t address, uint8_t value, EmuTime time) override; |
| 28 |
[[nodiscard]] uint8_t readMem(uint16_t address, EmuTime time) override; |
| 29 |
[[nodiscard]] uint8_t peekMem(uint16_t address, EmuTime time) const override; |
| 30 |
[[nodiscard]] uint8_t* getWriteCacheLine(uint16_t address) override; |
| 31 |
[[nodiscard]] const uint8_t* getReadCacheLine(uint16_t address) const override; |
| 32 |
|
| 33 |
template<typename Archive> |
| 34 |
void serialize(Archive& ar, unsigned version); |
| 35 |
|
| 36 |
private: |
| 37 |
Rom rom; |
| 38 |
SRAM sram; |
| 39 |
uint8_t bank; |
| 40 |
uint8_t selectedNCUreg; |
| 41 |
}; |
| 42 |
|
| 43 |
} |
| 44 |
|
| 45 |
#endif |