OXYGENHUB
◆ main openmsx / src / SG1000Pause.hh
815 B · C++ · last changed chore(): initial commit 1 month ago source blame history raw
1
#ifndef SG1000PAUSE_HH
2
#define SG1000PAUSE_HH
3
4
#include "MSXDevice.hh"
5
#include "MSXEventListener.hh"
6
#include "Schedulable.hh"
7
8
namespace openmsx {
9
10
/** This button is labeled "hold" on SG-1000, "pause" on SG-1000 mk 2 and
11
  * "reset" on SC-3000. It triggers a non-maskable interrupt when it is
12
  * pressed.
13
  */
14
class SG1000Pause final : public MSXDevice,
15
                          private MSXEventListener, private Schedulable
16
{
17
public:
18
	explicit SG1000Pause(const DeviceConfig& config);
19
	~SG1000Pause() override;
20
21
	template<typename Archive>
22
	void serialize(Archive& ar, unsigned version);
23
24
private:
25
	// MSXEventListener
26
	void signalMSXEvent(const Event& event,
27
	                    EmuTime time) noexcept override;
28
29
	// Schedulable
30
	void executeUntil(EmuTime time) override;
31
};
32
33
} // namespace openmsx
34
35
#endif