Package libsidplay.components.c1541
Klasse VIACore
java.lang.Object
libsidplay.components.c1541.VIACore
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.
-
Feldübersicht
FelderModifizierer und TypFeldBeschreibungprotected intprotected intprotected booleanprotected intprotected intprotected byteprotected byteprivate booleanprotected byteprotected byteprotected intprotected intprotected intprotected intprotected intprivate final Eventprivate final Eventprotected longprotected charprotected longprivate static final inttimer values do not depend on a certain value here, but PB7 does...protected longprotected charprotected longprotected final byte[]Registersprotected static final intAuxiliary control register.protected static final intData direction register for port A.protected static final intData direction register for port B.protected static final intInterrupt control register.protected static final intInterrupt flag register.protected static final intHandshake.protected static final intHandshake.protected static final intHandshake.protected static final intHandshake.protected static final intControl Bit.protected static final intShift Register completion.protected static final intTimer 1 underflow.protected static final intTimer 2 underflow.protected static final intPeripheral control register.protected static final intPort A.protected static final intPort A with no handshake.protected static final intPort B.static final intprotected static final intstatic final intprotected static final intstatic final intstatic final intprotected static final intSerial port shift register.protected static final intTimer 1 count high.protected static final intTimer 1 count low.protected static final intTimer 1 latch high.protected static final intTimer 1 latch low.protected static final intTimer 2 latch/count high.protected static final intTimer 2 count low - read only.protected static final intTimer 2 latch low - write only. -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungprotected abstract voidprotected abstract voidalarmUnset(Event alarm) protected voidprotected abstract longcpuClk()final voiddisable()private booleanprivate booleanprivate booleanprivate booleanprivate booleanprivate booleanprivate booleanprivate longmyviata()private longmyviatb()final byteread(int addr) protected abstract bytereadPra()protected abstract bytereadPrb()voidreset()protected abstract voidsetCa2(int state) protected abstract voidsetCb2(int state) protected abstract voidsetIRQ(boolean irq) final voidsignal(int line, int edge) protected abstract voidstoreAcr(byte value) protected abstract voidstorePra(int addr, byte value) protected abstract voidstorePrb(byte value) protected abstract voidstoreSr(byte value) protected abstract voidstoreT2l(byte value) private voidupdateMyviatal(long rclk) Update timer A latch value.private voidfinal voidwrite(int addr, byte b)
-
Felddetails
-
VIA_PRB
protected static final int VIA_PRBPort B.- Siehe auch:
-
VIA_PRA
protected static final int VIA_PRAPort A.- Siehe auch:
-
VIA_DDRB
protected static final int VIA_DDRBData direction register for port B.- Siehe auch:
-
VIA_DDRA
protected static final int VIA_DDRAData direction register for port A.- Siehe auch:
-
VIA_T1CL
protected static final int VIA_T1CLTimer 1 count low.- Siehe auch:
-
VIA_T1CH
protected static final int VIA_T1CHTimer 1 count high.- Siehe auch:
-
VIA_T1LL
protected static final int VIA_T1LLTimer 1 latch low.- Siehe auch:
-
VIA_T1LH
protected static final int VIA_T1LHTimer 1 latch high.- Siehe auch:
-
VIA_T2CL
protected static final int VIA_T2CLTimer 2 count low - read only.- Siehe auch:
-
VIA_T2LL
protected static final int VIA_T2LLTimer 2 latch low - write only.- Siehe auch:
-
VIA_T2CH
protected static final int VIA_T2CHTimer 2 latch/count high.- Siehe auch:
-
VIA_SR
protected static final int VIA_SRSerial port shift register.- Siehe auch:
-
VIA_ACR
protected static final int VIA_ACRAuxiliary control register.- Siehe auch:
-
VIA_PCR
protected static final int VIA_PCRPeripheral control register.- Siehe auch:
-
VIA_IFR
protected static final int VIA_IFRInterrupt flag register.- Siehe auch:
-
VIA_IER
protected static final int VIA_IERInterrupt control register.- Siehe auch:
-
VIA_PRA_NHS
protected static final int VIA_PRA_NHSPort A with no handshake.- Siehe auch:
-
VIA_IM_IRQ
protected static final int VIA_IM_IRQControl Bit.- Siehe auch:
-
VIA_IM_T1
protected static final int VIA_IM_T1Timer 1 underflow.- Siehe auch:
-
VIA_IM_T2
protected static final int VIA_IM_T2Timer 2 underflow.- Siehe auch:
-
VIA_IM_CB1
protected static final int VIA_IM_CB1Handshake.- Siehe auch:
-
VIA_IM_CB2
protected static final int VIA_IM_CB2Handshake.- Siehe auch:
-
VIA_IM_SR
protected static final int VIA_IM_SRShift Register completion.- Siehe auch:
-
VIA_IM_CA1
protected static final int VIA_IM_CA1Handshake.- Siehe auch:
-
VIA_IM_CA2
protected static final int VIA_IM_CA2Handshake.- Siehe auch:
-
VIA_SIG_CA1
public static final int VIA_SIG_CA1- Siehe auch:
-
VIA_SIG_CA2
protected static final int VIA_SIG_CA2- Siehe auch:
-
VIA_SIG_CB1
public static final int VIA_SIG_CB1- Siehe auch:
-
VIA_SIG_CB2
protected static final int VIA_SIG_CB2- Siehe auch:
-
VIA_SIG_FALL
public static final int VIA_SIG_FALL- Siehe auch:
-
VIA_SIG_RISE
public static final int VIA_SIG_RISE- Siehe auch:
-
via
protected final byte[] viaRegisters -
ifr
protected int ifr -
ier
protected int ier -
tal
protected char tal -
tbl
protected char tbl -
tau
protected long tau -
tbu
protected long tbu -
tai
protected long tai -
tbi
protected long tbi -
pb7
protected int pb7 -
pb7x
protected int pb7x -
pb7o
protected int pb7o -
pb7xx
protected int pb7xx -
pb7sx
protected int pb7sx -
oldpa
protected byte oldpa -
oldpb
protected byte oldpb -
ila
protected byte ila -
ilb
protected byte ilb -
ca2State
protected int ca2State -
cb2State
protected int cb2State -
enabled
protected boolean enabled -
t1Alarm
-
t2Alarm
-
lastState
private boolean lastState -
TAUOFFSET
private static final int TAUOFFSETtimer values do not depend on a certain value here, but PB7 does...- Siehe auch:
-
-
Konstruktordetails
-
VIACore
-
-
Methodendetails
-
isCa2Indinput
private boolean isCa2Indinput() -
isCa2Handshake
private boolean isCa2Handshake() -
isCa2PulseMode
private boolean isCa2PulseMode() -
isCa2ToggleMode
private boolean isCa2ToggleMode() -
isCb2Handshake
private boolean isCb2Handshake() -
isCb2PulseMode
private boolean isCb2PulseMode() -
isCb2ToggleMode
private boolean isCb2ToggleMode() -
checkInterrupts
protected void checkInterrupts() -
myviata
private long myviata() -
myviatb
private long myviatb() -
updateMyviatal
private void updateMyviatal(long rclk) Update timer A latch value. -
updateMyviatbl
private void updateMyviatbl() -
disable
public final void disable() -
reset
public void reset() -
signal
public final void signal(int line, int edge) -
write
public final void write(int addr, byte b) -
read
public final byte read(int addr) -
alarmSet
-
alarmUnset
-
cpuClk
protected abstract long cpuClk() -
setIRQ
protected abstract void setIRQ(boolean irq) -
storePra
protected abstract void storePra(int addr, byte value) -
storePrb
protected abstract void storePrb(byte value) -
storeAcr
protected abstract void storeAcr(byte value) -
storeSr
protected abstract void storeSr(byte value) -
storeT2l
protected abstract void storeT2l(byte value) -
readPra
protected abstract byte readPra() -
readPrb
protected abstract byte readPrb() -
setCa2
protected abstract void setCa2(int state) -
setCb2
protected abstract void setCb2(int state)
-