39 virtual void raise() = 0;
47 void raise() { sink->raise(); }
50 std::unique_ptr<IRQSink> sink;
55 template<
typename SOURCE>
class IntHelper :
public SOURCE
65 : SOURCE(motherboard.getCPU())
66 , request(motherboard.getDebugger(), name,
67 "Outgoing IRQ signal.", false)
72 : SOURCE(motherboard.getCPU(), config)
73 , request(motherboard.getDebugger(), name,
74 "Outgoing IRQ signal.", false)
120 template<
typename Archive>
123 bool pending = request;
124 ar.serialize(
"pending", pending);
virtual ~IRQSink()=default
Helper class for doing interrupt request (IRQ) administration.
void set()
Set the interrupt request on the bus.
IntHelper(const IntHelper &)=delete
IntHelper & operator=(const IntHelper &)=delete
IntHelper(MSXMotherBoard &motherboard, const std::string &name)
Create a new IntHelper.
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, const DeviceConfig &config)
OptionalIRQ(MSXCPU &cpu, const DeviceConfig &config)
This file implemented 3 utility functions: