41 enum Type { NotConnected, Maskable, NonMaskable };
47template<
typename SOURCE>
class IntHelper :
public SOURCE
56 template<
typename ...Args>
59 : SOURCE(motherboard.getCPU(),
std::forward<Args>(args)...)
60 , request(motherboard.getDebugger(), name,
61 "Outgoing IRQ signal.", false)
92 inline void set(
bool s) {
107 template<
typename Archive>
110 bool pending = request;
111 ar.serialize(
"pending", pending);
112 if constexpr (Archive::IS_LOADER) {
Helper class for doing interrupt request (IRQ) administration.
void set()
Set the interrupt request on the bus.
IntHelper(const IntHelper &)=delete
void reset()
Reset the interrupt request on the bus.
~IntHelper()
Destroy this IntHelper.
void serialize(Archive &ar, unsigned)
bool getState() const
Get the interrupt state.
void set(bool s)
Convenience function: calls set() or reset().
IntHelper(MSXMotherBoard &motherboard, const std::string &name, Args &&...args)
Create a new IntHelper.
IntHelper & operator=(const IntHelper &)=delete
OptionalIRQ(MSXCPU &cpu, const DeviceConfig &config)
This file implemented 3 utility functions: