libsidplayfp 2.15.0
|
#include <timer.h>
Public Member Functions | |
void | setControlRegister (uint8_t cr) |
void | syncWithCpu () |
void | wakeUpAfterSyncWithCpu () |
void | reset () |
void | latchLo (uint8_t data) |
void | latchHi (uint8_t data) |
void | setPbToggle (bool state) |
int_least32_t | getState () const |
uint_least16_t | getTimer () const |
bool | getPb (uint8_t reg) const |
Protected Member Functions | |
Timer (const char *name, EventScheduler &scheduler, MOS652X &parent) | |
Protected Attributes | |
MOS652X & | parent |
Pointer to the MOS6526 which this Timer belongs to. | |
int_least32_t | state = 0 |
CRA/CRB control register / state. | |
This is the base class for the MOS6526 timers.
|
inlineprotected |
Create a new timer.
name | component name |
context | event context |
parent | the MOS6526 which this Timer belongs to |
|
inline |
Get PB6/PB7 Flipflop state.
reg | value of the control register |
|
inline |
Get current state value.
|
inline |
Get current timer value.
void libsidplayfp::Timer::latchHi | ( | uint8_t | data | ) |
Set high byte of Timer start value (Latch).
data | high byte of latch |
void libsidplayfp::Timer::latchLo | ( | uint8_t | data | ) |
Set low byte of Timer start value (Latch).
data | low byte of latch |
void libsidplayfp::Timer::reset | ( | ) |
Reset timer.
void libsidplayfp::Timer::setControlRegister | ( | uint8_t | cr | ) |
Set CRA/CRB control register.
cr | control register value |
|
inline |
Set PB6/PB7 Flipflop state.
state | PB6/PB7 flipflop state |
void libsidplayfp::Timer::syncWithCpu | ( | ) |
Perform cycle skipping manually.
Clocks the CIA up to the state it should be in, and stops all events.
void libsidplayfp::Timer::wakeUpAfterSyncWithCpu | ( | ) |
Counterpart of syncWithCpu(), starts the event ticking if it is needed. No clock() call or anything such is permissible here!