| 1 |
#ifndef PROGRAMMABLEDEVICE_HH |
| 2 |
#define PROGRAMMABLEDEVICE_HH |
| 3 |
|
| 4 |
#include "MSXDevice.hh" |
| 5 |
#include "StringSetting.hh" |
| 6 |
#include "TclCallback.hh" |
| 7 |
|
| 8 |
namespace openmsx { |
| 9 |
|
| 10 |
class ProgrammableDevice final : public MSXDevice |
| 11 |
, private Observer<Setting> |
| 12 |
{ |
| 13 |
public: |
| 14 |
explicit ProgrammableDevice(const DeviceConfig& config); |
| 15 |
~ProgrammableDevice() override; |
| 16 |
|
| 17 |
void writeIO(uint16_t port, byte value, EmuTime time) override; |
| 18 |
[[nodiscard]] byte readIO(uint16_t port, EmuTime time) override; |
| 19 |
void reset(EmuTime time) override; |
| 20 |
|
| 21 |
private: |
| 22 |
void update(const Setting& setting) noexcept override; |
| 23 |
|
| 24 |
private: |
| 25 |
StringSetting portListSetting; |
| 26 |
TclCallback resetCallback; |
| 27 |
TclCallback inCallback; |
| 28 |
TclCallback outCallback; |
| 29 |
}; |
| 30 |
|
| 31 |
} |
| 32 |
|
| 33 |
#endif |