|
libsidplayfp 2.6.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 |
| CRA/CRB control register / state. | |
Static Protected Attributes | |
| static const int_least32_t | CIAT_CR_START = 0x01 |
| static const int_least32_t | CIAT_STEP = 0x04 |
| static const int_least32_t | CIAT_CR_ONESHOT = 0x08 |
| static const int_least32_t | CIAT_CR_FLOAD = 0x10 |
| static const int_least32_t | CIAT_PHI2IN = 0x20 |
| static const int_least32_t | CIAT_CR_MASK = CIAT_CR_START | CIAT_CR_ONESHOT | CIAT_CR_FLOAD | CIAT_PHI2IN |
| static const int_least32_t | CIAT_COUNT2 = 0x100 |
| static const int_least32_t | CIAT_COUNT3 = 0x200 |
| static const int_least32_t | CIAT_ONESHOT0 = 0x08 << 8 |
| static const int_least32_t | CIAT_ONESHOT = 0x08 << 16 |
| static const int_least32_t | CIAT_LOAD1 = 0x10 << 8 |
| static const int_least32_t | CIAT_LOAD = 0x10 << 16 |
| static const int_least32_t | CIAT_OUT = 0x80000000 |
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 |
Get PB6/PB7 Flipflop state.
| reg | value of the control register |
|
inline |
Get current state value.
|
inline |
Get current timer value.
Set high byte of Timer start value (Latch).
| data | high byte of latch |
Set low byte of Timer start value (Latch).
| data | low byte of latch |
| void libsidplayfp::Timer::reset | ( | ) |
Reset timer.
Set CRA/CRB control register.
| cr | control register value |
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!