| 1 |
#ifndef COLECOSUPERGAMEMODULE_HH |
| 2 |
#define COLECOSUPERGAMEMODULE_HH |
| 3 |
|
| 4 |
#include "CheckedRam.hh" |
| 5 |
#include "Rom.hh" |
| 6 |
|
| 7 |
#include "AY8910.hh" |
| 8 |
#include "MSXDevice.hh" |
| 9 |
|
| 10 |
namespace openmsx { |
| 11 |
|
| 12 |
class ColecoSuperGameModule final : public MSXDevice |
| 13 |
{ |
| 14 |
public: |
| 15 |
explicit ColecoSuperGameModule(DeviceConfig& config); |
| 16 |
~ColecoSuperGameModule() override; |
| 17 |
|
| 18 |
void reset(EmuTime time) override; |
| 19 |
[[nodiscard]] byte readIO(uint16_t port, EmuTime time) override; |
| 20 |
[[nodiscard]] byte peekIO(uint16_t port, EmuTime time) const override; |
| 21 |
void writeIO(uint16_t port, byte value, EmuTime time) override; |
| 22 |
[[nodiscard]] byte peekMem(uint16_t address, EmuTime time) const override; |
| 23 |
[[nodiscard]] byte readMem(uint16_t address, EmuTime time) override; |
| 24 |
void writeMem(uint16_t address, byte value, EmuTime time) override; |
| 25 |
[[nodiscard]] const byte* getReadCacheLine(uint16_t start) const override; |
| 26 |
[[nodiscard]] byte* getWriteCacheLine(uint16_t start) override; |
| 27 |
|
| 28 |
template<typename Archive> |
| 29 |
void serialize(Archive& ar, unsigned version); |
| 30 |
|
| 31 |
private: |
| 32 |
AY8910 psg; |
| 33 |
CheckedRam sgmRam; |
| 34 |
CheckedRam mainRam; |
| 35 |
Rom biosRom; |
| 36 |
byte psgLatch; |
| 37 |
bool ramEnabled; |
| 38 |
bool ramAtBiosEnabled; |
| 39 |
}; |
| 40 |
|
| 41 |
} |
| 42 |
|
| 43 |
#endif |