Package libsidplay.components.mos6526
Klasse MOS6526
java.lang.Object
libsidplay.components.pla.Bank
libsidplay.components.mos6526.MOS6526
This class is heavily based on the ciacore/ciatimer source code from VICE.
The CIA state machine is lifted as-is. Big thanks to VICE project!
- Autor:
- Antti Lankila
-
Verschachtelte Klassen - Übersicht
Verschachtelte KlassenModifizierer und TypKlasseBeschreibungprotected classprotected final classInterruptSource that acts like old CIAprotected final classInterruptSource that acts like new CIAprotected classThis class implements a Timer A or B of a MOS6526 chip.private final classThis is the timer A of this CIA.private final classThis is the timer B of this CIA. -
Feldübersicht
FelderModifizierer und TypFeldBeschreibungprotected final MOS6526.TimerTimers A and B.protected final MOS6526.TimerTimers A and B.protected final EventSchedulerEvent context.protected static final intprotected static final intprivate static final StringThese are the credits.protected static final intprotected static final intstatic final intprivate static final byteInterrupt flag: alarm clock.private static final byteInterrupt flag: external flag.private static final byteInterrupt flag: no interrupt.private static final byteInterrupt flag: serial port.private static final byteInterrupt flag: underflow Timer A.private static final byteInterrupt flag: underflow Timer B.protected final MOS6526.InterruptSourceCIA interrupt controller.protected byte[]protected byte[]protected longprotected final Eventprotected byte[]protected booleanprotected longprotected booleanstatic final intstatic final intprotected byte[]These are all CIA registers.private static final intprotected booleanprotected intprotected byteprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final int -
Konstruktorübersicht
KonstruktorenModifiziererKonstruktorBeschreibungprotectedMOS6526(EventScheduler ctx, CIAChipModel model) Create a new CIA. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungstatic final Stringcredits()Get the credits.abstract voidinterrupt(boolean state) Signal interrupt.abstract voidpulse()final byteread(int addr) Read CIA register.abstract bytereadPRA()abstract bytereadPRB()voidreset()Reset CIA.final voidsetDayOfTimeRate(double clock) Set day-of-time event occurrence of rate.voidsetFlag(boolean flag) External interrupt control.final voidwrite(int addr, byte data) Write CIA register.abstract voidwritePRA(byte data) abstract voidwritePRB(byte data)
-
Felddetails
-
CREDITS
These are the credits.- Siehe auch:
-
INTERRUPT_NONE
private static final byte INTERRUPT_NONEInterrupt flag: no interrupt.- Siehe auch:
-
INTERRUPT_UNDERFLOW_A
private static final byte INTERRUPT_UNDERFLOW_AInterrupt flag: underflow Timer A.- Siehe auch:
-
INTERRUPT_UNDERFLOW_B
private static final byte INTERRUPT_UNDERFLOW_BInterrupt flag: underflow Timer B.- Siehe auch:
-
INTERRUPT_ALARM
private static final byte INTERRUPT_ALARMInterrupt flag: alarm clock.- Siehe auch:
-
INTERRUPT_SP
private static final byte INTERRUPT_SPInterrupt flag: serial port.- Siehe auch:
-
INTERRUPT_FLAG
private static final byte INTERRUPT_FLAGInterrupt flag: external flag.- Siehe auch:
-
PRA
public static final int PRA- Siehe auch:
-
PRB
public static final int PRB- Siehe auch:
-
DDRA
protected static final int DDRA- Siehe auch:
-
DDRB
protected static final int DDRB- Siehe auch:
-
TAL
private static final int TAL- Siehe auch:
-
TAH
private static final int TAH- Siehe auch:
-
TBL
private static final int TBL- Siehe auch:
-
TBH
private static final int TBH- Siehe auch:
-
TOD_TEN
private static final int TOD_TEN- Siehe auch:
-
TOD_SEC
private static final int TOD_SEC- Siehe auch:
-
TOD_MIN
private static final int TOD_MIN- Siehe auch:
-
TOD_HR
private static final int TOD_HR- Siehe auch:
-
SDR
private static final int SDR- Siehe auch:
-
ICR
public static final int ICR- Siehe auch:
-
CRA
protected static final int CRA- Siehe auch:
-
CRB
protected static final int CRB- Siehe auch:
-
interruptSource
CIA interrupt controller. -
a
Timers A and B. -
b
Timers A and B. -
regs
protected byte[] regsThese are all CIA registers. -
sdr_out
protected byte sdr_out -
sdr_buffered
protected boolean sdr_buffered -
sdr_count
protected int sdr_count -
context
Event context. -
m_todlatched
protected boolean m_todlatched -
m_todstopped
protected boolean m_todstopped -
m_todclock
protected byte[] m_todclock -
m_todalarm
protected byte[] m_todalarm -
m_todlatch
protected byte[] m_todlatch -
m_todCycles
protected long m_todCycles -
m_todPeriod
protected long m_todPeriod -
m_todEvent
-
-
Konstruktordetails
-
MOS6526
Create a new CIA.- Parameter:
ctx- the event context
-
-
Methodendetails
-
interrupt
public abstract void interrupt(boolean state) Signal interrupt.- Parameter:
state- interrupt state
-
pulse
public abstract void pulse() -
readPRA
public abstract byte readPRA() -
readPRB
public abstract byte readPRB() -
writePRA
public abstract void writePRA(byte data) -
writePRB
public abstract void writePRB(byte data) -
setFlag
public void setFlag(boolean flag) External interrupt control.- Parameter:
flag- Interrupt flag
-
reset
public void reset()Reset CIA. -
read
public final byte read(int addr) Read CIA register. -
write
public final void write(int addr, byte data) Write CIA register. -
credits
Get the credits.- Gibt zurück:
- the credits
-
setDayOfTimeRate
public final void setDayOfTimeRate(double clock) Set day-of-time event occurrence of rate.- Parameter:
clock-
-