libsidplayfp 2.15.0
|
#include <interrupt.h>
Public Types | |
enum | { INTERRUPT_NONE = 0 , INTERRUPT_UNDERFLOW_A = 1 << 0 , INTERRUPT_UNDERFLOW_B = 1 << 1 , INTERRUPT_ALARM = 1 << 2 , INTERRUPT_SP = 1 << 3 , INTERRUPT_FLAG = 1 << 4 , INTERRUPT_REQUEST = 1 << 7 } |
Public Member Functions | |
virtual void | trigger (uint8_t interruptMask)=0 |
virtual uint8_t | clear () |
virtual void | reset () |
void | set (uint8_t interruptMask) |
Protected Member Functions | |
bool | interruptTriggered () const |
bool | interruptMasked (uint8_t interruptMask) const |
virtual void | triggerInterrupt ()=0 |
bool | ack0 () const |
bool | write0 () const |
void | interrupt () |
void | updateIdr () |
void | setIrq () |
void | clearIrq () |
InterruptSource (EventScheduler &scheduler, MOS652X &parent) | |
void | schedule (int delay) |
void | scheduleIrq () |
bool | isTriggered (uint8_t interruptMask) |
Protected Attributes | |
EventScheduler & | eventScheduler |
Event scheduler. | |
event_clock_t | last_clear = 0 |
Clock when clear was called last. | |
event_clock_t | last_set = 0 |
uint8_t | icr = 0 |
Interrupt control register. | |
uint8_t | idr = 0 |
Interrupt data register. | |
uint8_t | idrTemp = 0 |
bool | scheduled = false |
Have we already scheduled CIA->CPU interrupt transition? | |
bool | asserted = false |
is the irq pin asserted? | |
This is the base class for the MOS6526 interrupt sources. Based on Denise emu code.
anonymous enum |
|
inlineprotected |
Create a new InterruptSource.
scheduler | event scheduler |
parent | the CIA chip which this Interrupt belongs to |
|
inlineprotected |
Check if interrupts were ackowledged during previous cycle.
|
virtual |
Clear interrupt state.
Reimplemented in libsidplayfp::InterruptSource6526.
|
protected |
Signal interrupt to CPU.
|
inlinevirtual |
Clear pending interrupts, but do not signal to CPU we lost them. It is assumed that all components get reset() calls in synchronous manner.
|
inlineprotected |
Schedules an IRQ asserting state transition for next cycle.
void libsidplayfp::InterruptSource::set | ( | uint8_t | interruptMask | ) |
Set interrupt control mask bits.
interruptMask | control mask bits |
|
pure virtual |
Trigger an interrupt.
interruptMask | Interrupt flag number |
Implemented in libsidplayfp::InterruptSource8521, and libsidplayfp::InterruptSource6526.