41 enum Type { NotConnected, Maskable, NonMaskable };
47template<
typename SOURCE>
class IntHelper :
public SOURCE
58 template<
typename ...Args>
61 : SOURCE(motherboard.getCPU(),
std::forward<Args>(args)...)
62 , request(motherboard.getDebugger(), name,
63 "Outgoing IRQ signal.", false)
94 inline void set(
bool s) {
109 template<
typename Archive>
112 bool pending = request;
113 ar.serialize(
"pending", pending);
114 if constexpr (Archive::IS_LOADER) {
Helper class for doing interrupt request (IRQ) administration.
void set()
Set the interrupt request on the bus.
IntHelper & operator=(IntHelper &&)=delete
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(IntHelper &&)=delete
IntHelper & operator=(const IntHelper &)=delete
This file implemented 3 utility functions: