| 1 |
#ifndef FRAELSWITCHABLEROM_HH |
| 2 |
#define FRAELSWITCHABLEROM_HH |
| 3 |
|
| 4 |
#include "MSXDevice.hh" |
| 5 |
#include "Rom.hh" |
| 6 |
|
| 7 |
namespace openmsx { |
| 8 |
|
| 9 |
class FraelSwitchableROM final : public MSXDevice |
| 10 |
{ |
| 11 |
public: |
| 12 |
explicit FraelSwitchableROM(DeviceConfig& DeviceConfig); |
| 13 |
|
| 14 |
void reset(EmuTime time) override; |
| 15 |
|
| 16 |
[[nodiscard]] byte readMem(uint16_t address, EmuTime time) override; |
| 17 |
[[nodiscard]] const byte* getReadCacheLine(uint16_t start) const override; |
| 18 |
|
| 19 |
void writeIO(uint16_t port, byte value, EmuTime time) override; |
| 20 |
|
| 21 |
template<typename Archive> |
| 22 |
void serialize(Archive& ar, unsigned version); |
| 23 |
|
| 24 |
private: |
| 25 |
Rom basicBiosRom; |
| 26 |
Rom firmwareRom; |
| 27 |
bool firmwareSelected; |
| 28 |
}; |
| 29 |
|
| 30 |
} |
| 31 |
|
| 32 |
#endif |