libsidplayfp 2.6.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 |
Clock when clear was called last. | |
event_clock_t | last_set |
uint8_t | icr |
Interrupt control register. | |
uint8_t | idr |
Interrupt data register. | |
uint8_t | idrTemp |
bool | scheduled |
Have we already scheduled CIA->CPU interrupt transition? | |
bool | asserted |
is the irq pin asserted? | |
This is the base class for the MOS6526 interrupt sources. Based on Denise emu code.
|
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.
Clear pending interrupts, but do not signal to CPU we lost them. It is assumed that all components get reset() calls in synchronous manner.
Schedules an IRQ asserting state transition for next cycle.
Set interrupt control mask bits.
interruptMask | control mask bits |
Trigger an interrupt.
interruptMask | Interrupt flag number |
Implemented in libsidplayfp::InterruptSource8521, and libsidplayfp::InterruptSource6526.