| e8555c89 Andy McCall |
1 |
#ifndef MSXFMPAC_HH |
| 2 |
#define MSXFMPAC_HH |
| 3 |
|
| 4 |
#include "MSXMusic.hh" |
| 5 |
|
| 6 |
#include "RomBlockDebuggable.hh" |
| 7 |
#include "SRAM.hh" |
| 8 |
#include "serialize_meta.hh" |
| 9 |
|
| 10 |
namespace openmsx { |
| 11 |
|
| 12 |
class MSXFmPac final : public MSXMusicBase |
| 13 |
{ |
| 14 |
public: |
| 15 |
explicit MSXFmPac(DeviceConfig& config); |
| 16 |
|
| 17 |
void reset(EmuTime time) override; |
| 18 |
void writeIO(uint16_t port, byte value, EmuTime time) override; |
| 19 |
[[nodiscard]] byte readMem(uint16_t address, EmuTime time) override; |
| 20 |
void writeMem(uint16_t address, byte value, EmuTime time) override; |
| 21 |
[[nodiscard]] const byte* getReadCacheLine(uint16_t address) const override; |
| 22 |
[[nodiscard]] byte* getWriteCacheLine(uint16_t address) override; |
| 23 |
|
| 24 |
template<typename Archive> |
| 25 |
void serialize(Archive& ar, unsigned version); |
| 26 |
|
| 27 |
private: |
| 28 |
void checkSramEnable(); |
| 29 |
|
| 30 |
private: |
| 31 |
SRAM sram; |
| 32 |
RomBlockDebuggable romBlockDebug; |
| 33 |
byte enable; |
| 34 |
byte bank; |
| 35 |
byte r1ffe, r1fff; |
| 36 |
bool sramEnabled; |
| 37 |
}; |
| 38 |
SERIALIZE_CLASS_VERSION(MSXFmPac, 3); |
| 39 |
|
| 40 |
} |
| 41 |
|
| 42 |
#endif |