| 1 |
#include "SNPSG.hh" |
| 2 |
|
| 3 |
#include "serialize.hh" |
| 4 |
|
| 5 |
namespace openmsx { |
| 6 |
|
| 7 |
SNPSG::SNPSG(const DeviceConfig& config) |
| 8 |
: MSXDevice(config) |
| 9 |
, sn76489(config) |
| 10 |
{ |
| 11 |
reset(getCurrentTime()); |
| 12 |
} |
| 13 |
|
| 14 |
void SNPSG::reset(EmuTime time) |
| 15 |
{ |
| 16 |
sn76489.reset(time); |
| 17 |
} |
| 18 |
|
| 19 |
void SNPSG::writeIO(uint16_t , byte value, EmuTime time) |
| 20 |
{ |
| 21 |
|
| 22 |
sn76489.write(value, time); |
| 23 |
} |
| 24 |
|
| 25 |
template<typename Archive> |
| 26 |
void SNPSG::serialize(Archive& ar, unsigned ) |
| 27 |
{ |
| 28 |
ar.template serializeBase<MSXDevice>(*this); |
| 29 |
ar.serialize("sn76489", sn76489); |
| 30 |
} |
| 31 |
INSTANTIATE_SERIALIZE_METHODS(SNPSG); |
| 32 |
REGISTER_MSXDEVICE(SNPSG, "SN76489 PSG"); |
| 33 |
|
| 34 |
} |