libsidplayfp  2.0.2
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
libsidplayfp::InterruptSource Class Reference

#include <interrupt.h>

Inheritance diagram for libsidplayfp::InterruptSource:
Inheritance graph
[legend]
Collaboration diagram for libsidplayfp::InterruptSource:
Collaboration graph
[legend]

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)
 
virtual uint8_t clear ()
 
virtual void reset ()
 
void set (uint8_t interruptMask)
 

Protected Member Functions

bool interruptMasked () const
 
bool interruptTriggered () const
 
void triggerInterrupt ()
 
void triggerBug ()
 
 InterruptSource (EventScheduler &scheduler, MOS6526 &parent)
 
 Event (const char *const name)
 
virtual void event ()=0
 

Protected Attributes

MOS6526parent
 Pointer to the MOS6526 which this Interrupt belongs to.
 
EventSchedulereventScheduler
 Event scheduler.
 

Detailed Description

This is the base class for the MOS6526 interrupt sources.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
INTERRUPT_NONE 

no interrupt

INTERRUPT_UNDERFLOW_A 

underflow Timer A

INTERRUPT_UNDERFLOW_B 

underflow Timer B

INTERRUPT_ALARM 

alarm clock

INTERRUPT_SP 

serial port

INTERRUPT_FLAG 

external flag

INTERRUPT_REQUEST 

control bit

Constructor & Destructor Documentation

◆ InterruptSource()

libsidplayfp::InterruptSource::InterruptSource ( EventScheduler scheduler,
MOS6526 parent 
)
inlineprotected

Create a new InterruptSource.

Parameters
schedulerevent scheduler
parentthe MOS6526 which this Interrupt belongs to

Member Function Documentation

◆ clear()

virtual uint8_t libsidplayfp::InterruptSource::clear ( )
inlinevirtual

Clear interrupt state.

Returns
old interrupt state

Reimplemented in libsidplayfp::InterruptSource6526, and libsidplayfp::InterruptSource8521.

◆ reset()

virtual void libsidplayfp::InterruptSource::reset ( )
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.

Reimplemented in libsidplayfp::InterruptSource6526.

◆ set()

void libsidplayfp::InterruptSource::set ( uint8_t  interruptMask)
inline

Set interrupt control mask bits.

Parameters
interruptMaskcontrol mask bits

◆ trigger()

virtual void libsidplayfp::InterruptSource::trigger ( uint8_t  interruptMask)
inlinevirtual

Trigger an interrupt.

Parameters
interruptMaskInterrupt flag number

Reimplemented in libsidplayfp::InterruptSource6526, and libsidplayfp::InterruptSource8521.


The documentation for this class was generated from the following file: