Event.Phase
Modifier and Type | Field and Description |
---|---|
protected long |
ciaEventPauseTime
This is a tri-state:
when -1: cia is completely stopped when 0: cia 1-clock events are
ticking. otherwise: cycleskipevent is ticking, and the value is the
first phi1 clock of skipping.
|
protected static int |
CIAT_COUNT2 |
protected static int |
CIAT_COUNT3 |
protected static int |
CIAT_CR_FLOAD |
protected static int |
CIAT_CR_MASK |
protected static int |
CIAT_CR_ONESHOT |
protected static int |
CIAT_CR_START |
protected static int |
CIAT_LOAD |
protected static int |
CIAT_LOAD1 |
protected static int |
CIAT_ONESHOT |
protected static int |
CIAT_ONESHOT0 |
protected static int |
CIAT_OUT |
protected static int |
CIAT_PHI2IN |
protected static int |
CIAT_STEP |
protected byte |
lastControlValue
Copy of regs[CRA/B]
|
protected short |
latch
Timer start value (Latch).
|
protected boolean |
pbToggle
PB6/PB7 Flipflop to signal underflows.
|
protected int |
state
CRA/CRB control register / state.
|
protected short |
timer
Current timer value.
|
name, next, triggerTime
Constructor and Description |
---|
Timer(String eventName)
Create a new timer.
|
Modifier and Type | Method and Description |
---|---|
void |
clock()
Execute one CIA state transition.
|
void |
event()
Timer ticking event.
|
boolean |
getPbToggle()
Get PB6/PB7 Flipflop state.
|
int |
getTimer()
Get current timer value.
|
void |
reset()
Reset timer.
|
abstract void |
serialPort()
Handle the serial port.
|
void |
setControlRegister(byte cr)
Set CRA/CRB control register.
|
void |
setLatchHigh(byte high)
Set high byte of Timer start value (Latch).
|
void |
setLatchLow(byte low)
Set low byte of Timer start value (Latch).
|
void |
setPbToggle(boolean state)
Set PB6/PB7 Flipflop state.
|
void |
syncWithCpu()
Perform cycle skipping manually.
|
abstract void |
underFlow()
Signal timer underflow.
|
void |
wakeUpAfterSyncWithCpu()
Counterpart of syncWithCpu(), starts the event ticking if it is
needed.
|
protected static final int CIAT_CR_START
protected static final int CIAT_STEP
protected static final int CIAT_CR_ONESHOT
protected static final int CIAT_CR_FLOAD
protected static final int CIAT_PHI2IN
protected static final int CIAT_CR_MASK
protected static final int CIAT_COUNT2
protected static final int CIAT_COUNT3
protected static final int CIAT_ONESHOT0
protected static final int CIAT_ONESHOT
protected static final int CIAT_LOAD1
protected static final int CIAT_LOAD
protected static final int CIAT_OUT
protected int state
protected byte lastControlValue
protected short timer
protected short latch
protected boolean pbToggle
protected long ciaEventPauseTime
public Timer(String eventName)
eventName
- The name of the new timer.public final void setControlRegister(byte cr)
cr
- Control register valuepublic final int getTimer()
public final boolean getPbToggle()
public final void setPbToggle(boolean state)
state
- PB6/PB7 flipflop statepublic final void setLatchHigh(byte high)
high
- high byte of latchpublic final void setLatchLow(byte low)
low
- low byte of latchpublic final void reset()
public final void syncWithCpu()
public final void wakeUpAfterSyncWithCpu()
public void clock()
public abstract void serialPort()
public abstract void underFlow()
Copyright © 2018 Ken Händel. All rights reserved.