public abstract class VIACore extends Object
24jan97 a.fachat new interrupt handling, hopefully according to the specs now. All interrupts (note: not timer events (i.e. alarms) are put into one interrupt flag. if an interrupt condition changes, the function (i.e. cpp macro) update_myviairq() id called, that checks the IRQ line state. This is now possible, as ettore has decoupled A_* alarm events from interrupts for performance reasons. A new function for signaling rising/falling edges on the control lines is introduced: myvia_signal(VIA_SIG_[CA1|CA2|CB1|CB2], VIA_SIG_[RISE|FALL]) which signals the corresponding edge to the VIA. The constants are defined in via.h. Except for shift register and input latching everything should be ok now.
Modifier and Type | Field and Description |
---|---|
protected int |
ca2State |
protected int |
cb2State |
protected boolean |
enabled |
protected int |
ier |
protected int |
ifr |
protected byte |
ila |
protected byte |
ilb |
protected byte |
oldpa |
protected byte |
oldpb |
protected int |
pb7 |
protected int |
pb7o |
protected int |
pb7sx |
protected int |
pb7x |
protected int |
pb7xx |
protected long |
tai |
protected char |
tal |
protected long |
tau |
protected long |
tbi |
protected char |
tbl |
protected long |
tbu |
protected byte[] |
via
Registers
|
protected static int |
VIA_ACR
Auxiliary control register.
|
protected static int |
VIA_DDRA
Data direction register for port A.
|
protected static int |
VIA_DDRB
Data direction register for port B.
|
protected static int |
VIA_IER
Interrupt control register.
|
protected static int |
VIA_IFR
Interrupt flag register.
|
protected static int |
VIA_IM_CA1
Handshake.
|
protected static int |
VIA_IM_CA2
Handshake.
|
protected static int |
VIA_IM_CB1
Handshake.
|
protected static int |
VIA_IM_CB2
Handshake.
|
protected static int |
VIA_IM_IRQ
Control Bit.
|
protected static int |
VIA_IM_SR
Shift Register completion.
|
protected static int |
VIA_IM_T1
Timer 1 underflow.
|
protected static int |
VIA_IM_T2
Timer 2 underflow.
|
protected static int |
VIA_PCR
Peripheral control register.
|
protected static int |
VIA_PRA
Port A.
|
protected static int |
VIA_PRA_NHS
Port A with no handshake.
|
protected static int |
VIA_PRB
Port B.
|
static int |
VIA_SIG_CA1 |
protected static int |
VIA_SIG_CA2 |
static int |
VIA_SIG_CB1 |
protected static int |
VIA_SIG_CB2 |
static int |
VIA_SIG_FALL |
static int |
VIA_SIG_RISE |
protected static int |
VIA_SR
Serial port shift register.
|
protected static int |
VIA_T1CH
Timer 1 count high.
|
protected static int |
VIA_T1CL
Timer 1 count low.
|
protected static int |
VIA_T1LH
Timer 1 latch high.
|
protected static int |
VIA_T1LL
Timer 1 latch low.
|
protected static int |
VIA_T2CH
Timer 2 latch/count high.
|
protected static int |
VIA_T2CL
Timer 2 count low - read only.
|
protected static int |
VIA_T2LL
Timer 2 latch low - write only.
|
Modifier | Constructor and Description |
---|---|
protected |
VIACore(String name) |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
alarmSet(Event alarm,
long ti) |
protected abstract void |
alarmUnset(Event alarm) |
protected void |
checkInterrupts() |
protected abstract long |
cpuClk() |
void |
disable() |
byte |
read(int addr) |
protected abstract byte |
readPra() |
protected abstract byte |
readPrb() |
void |
reset() |
protected abstract void |
setCa2(int state) |
protected abstract void |
setCb2(int state) |
protected abstract void |
setIRQ(boolean irq) |
void |
signal(int line,
int edge) |
protected abstract void |
storeAcr(byte value) |
protected abstract void |
storePra(int addr,
byte value) |
protected abstract void |
storePrb(byte value) |
protected abstract void |
storeSr(byte value) |
protected abstract void |
storeT2l(byte value) |
void |
write(int addr,
byte b) |
protected static final int VIA_PRB
protected static final int VIA_PRA
protected static final int VIA_DDRB
protected static final int VIA_DDRA
protected static final int VIA_T1CL
protected static final int VIA_T1CH
protected static final int VIA_T1LL
protected static final int VIA_T1LH
protected static final int VIA_T2CL
protected static final int VIA_T2LL
protected static final int VIA_T2CH
protected static final int VIA_SR
protected static final int VIA_ACR
protected static final int VIA_PCR
protected static final int VIA_IFR
protected static final int VIA_IER
protected static final int VIA_PRA_NHS
protected static final int VIA_IM_IRQ
protected static final int VIA_IM_T1
protected static final int VIA_IM_T2
protected static final int VIA_IM_CB1
protected static final int VIA_IM_CB2
protected static final int VIA_IM_SR
protected static final int VIA_IM_CA1
protected static final int VIA_IM_CA2
public static final int VIA_SIG_CA1
protected static final int VIA_SIG_CA2
public static final int VIA_SIG_CB1
protected static final int VIA_SIG_CB2
public static final int VIA_SIG_FALL
public static final int VIA_SIG_RISE
protected final byte[] via
protected int ifr
protected int ier
protected char tal
protected char tbl
protected long tau
protected long tbu
protected long tai
protected long tbi
protected int pb7
protected int pb7x
protected int pb7o
protected int pb7xx
protected int pb7sx
protected byte oldpa
protected byte oldpb
protected byte ila
protected byte ilb
protected int ca2State
protected int cb2State
protected boolean enabled
protected VIACore(String name)
protected void checkInterrupts()
public final void disable()
public void reset()
public final void signal(int line, int edge)
public final void write(int addr, byte b)
public final byte read(int addr)
protected abstract void alarmSet(Event alarm, long ti)
protected abstract void alarmUnset(Event alarm)
protected abstract long cpuClk()
protected abstract void setIRQ(boolean irq)
protected abstract void storePra(int addr, byte value)
protected abstract void storePrb(byte value)
protected abstract void storeAcr(byte value)
protected abstract void storeSr(byte value)
protected abstract void storeT2l(byte value)
protected abstract byte readPra()
protected abstract byte readPrb()
protected abstract void setCa2(int state)
protected abstract void setCb2(int state)
Copyright © 2018 Ken Händel. All rights reserved.