libsidplayfp  1.0.1
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
MOS656X Class Referenceabstract
Inheritance diagram for MOS656X:
component Event c64vic

Public Types

enum  model_t { MOS6567R56A = 0, MOS6567R8, MOS6569, MOS6572 }
 

Public Member Functions

void chip (model_t model)
 
void lightpen ()
 
void reset ()
 
const char * credits () const
 
uint_least16_t getCyclesPerLine () const
 
uint_least16_t getRasterLines () const
 
- Public Member Functions inherited from component
virtual const char * error () const =0
 

Protected Member Functions

 MOS656X (EventContext *context)
 
void event ()
 
void badLineStateChange ()
 
void activateIRQFlag (int flag)
 
bool readDEN () const
 
bool evaluateIsBadLine () const
 
virtual void interrupt (bool state)=0
 
virtual void setBA (bool state)=0
 
uint8_t read (uint_least8_t addr)
 
void write (uint_least8_t addr, uint8_t data)
 

Protected Attributes

event_clock_t m_rasterClk
 
EventContextevent_context
 
uint_least16_t cyclesPerLine
 
uint_least16_t maxRasters
 
uint_least16_t raster_irq
 
uint_least16_t lineCycle
 
uint_least16_t rasterY
 
uint_least16_t yscroll
 
bool areBadLinesEnabled
 
bool isBadLine
 
bool vblanking
 
bool lp_triggered
 
uint8_t irqFlags
 
uint8_t irqMask
 
uint8_t lpx
 
uint8_t lpy
 
uint8_t regs [0x40]
 
EventCallback< MOS656XbadLineStateChangeEvent
 
uint8_t & sprite_enable
 
uint8_t & sprite_y_expansion
 
uint8_t sprite_dma
 
uint8_t sprite_expand_y
 
uint8_t sprite_mc_base [8]
 

Static Protected Attributes

static const int FIRST_DMA_LINE = 0x30
 
static const int LAST_DMA_LINE = 0xf7
 

Additional Inherited Members

- Private Member Functions inherited from Event
 Event (const char *const name)
 

Member Function Documentation

void MOS656X::activateIRQFlag ( int  flag)
inlineprotected

Set an IRQ flag and trigger an IRQ if the corresponding IRQ mask is set. The IRQ only gets activated, i.e. flag 0x80 gets set, if it was not active before.

void MOS656X::badLineStateChange ( )
inlineprotected

AEC state was updated.

void MOS656X::event ( )
protectedvirtual

Event code to be executed. Events are allowed to safely reschedule themselves with the EventScheduler during invocations.

Implements Event.

uint8_t MOS656X::read ( uint_least8_t  addr)
protectedvirtual

Read VIC register.

Parameters
addrRegister to read.

Implements component.

bool MOS656X::readDEN ( ) const
inlineprotected

Read the DEN flag which tells whether the display is enabled

Returns
true if DEN is set, otherwise false
void MOS656X::write ( uint_least8_t  addr,
uint8_t  data 
)
protectedvirtual

Write to VIC register.

Parameters
addrRegister to write to.
dataData byte to write.

Implements component.

Member Data Documentation

bool MOS656X::areBadLinesEnabled
protected

are bad lines enabled for this frame?

uint_least16_t MOS656X::cyclesPerLine
protected

Number of cycles per line.

EventContext& MOS656X::event_context
protected

CPU's event context.

const int MOS656X::FIRST_DMA_LINE = 0x30
staticprotected

First line when we check for bad lines

uint8_t MOS656X::irqFlags
protected

internal IRQ flags

uint8_t MOS656X::irqMask
protected

masks for the IRQ flags

bool MOS656X::isBadLine
protected

is the current line a bad line

const int MOS656X::LAST_DMA_LINE = 0xf7
staticprotected

Last line when we check for bad lines

uint_least16_t MOS656X::lineCycle
protected

Current visible line

bool MOS656X::lp_triggered
protected

Has light pen IRQ been triggered in this frame already?

uint8_t MOS656X::lpx
protected

Light pen coordinates

uint_least16_t MOS656X::rasterY
protected

current raster line

uint8_t MOS656X::regs[0x40]
protected

memory for chip registers

uint8_t MOS656X::sprite_dma
protected

the 8 sprites data

uint8_t& MOS656X::sprite_enable
protected

the 8 sprites data

uint8_t MOS656X::sprite_expand_y
protected

the 8 sprites data

uint8_t MOS656X::sprite_mc_base[8]
protected

the 8 sprites data

uint8_t & MOS656X::sprite_y_expansion
protected

the 8 sprites data

bool MOS656X::vblanking
protected

Set when new frame starts.

uint_least16_t MOS656X::yscroll
protected

vertical scrolling value


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