Next: , Previous: , Up: Module formats   [Contents][Index]


9.2.2.5 CIA module

The CIA 6526 is an I/O port chip with 2 8-bit I/O ports, a shift register, two timers, a Time of Day clock and interrupts.

Version numbers: Major 1, Minor 1.

TypeNameDescription
BYTEORAOutput register A
BYTEORBOutput register B
BYTEDDRAData direction register A
BYTEDDRBData direction register B
WORDTACTimer A counter value
WORDTBCTimer B counter value
BYTETOD_TENTime of Day - current tenth of second
BYTETOD_SECTime of Day - current seconds
BYTETOD_MINTime of Day - current minutes
BYTETOD_HRTime of Day - current hours
BYTESDRcontents of shift register
BYTEIERmask of enabled interrupt masks
BYTECRAControl register A
BYTECRBControl register B
WORDTALTimer A latch value
WORDTBLTimer B latch value
BYTEIFRmask of currently active interrupts
BYTEPBSTATEBit 6/7 reflect the PB6/7 toggle bit state. Bit 2/3 reflect the corresponding port bit state.
BYTESRHBITSnumber of half-bits to still shift in/out SDR
BYTEALARM_TENTime of Day - alarm tenth of second
BYTEALARM_SECTime of Day - alarm seconds
BYTEALARM_MINTime of Day - alarm minutes
BYTEALARM_HRTime of Day - alarm hours
BYTEREADICRcurrent clock minus the clock when ICR was read last plus 128.
BYTETODLATCHEDBit 0: 1= latched for reading, Bit 1: 2=stopped for writing
BYTETODL_TENTime of Day - latched tenth of second
BYTETODL_SECTime of Day - latched seconds
BYTETODL_MINTime of Day - latched minutes
BYTETODL_HRTime of Day - latched hours
DWORDTOD_TICKSclk ticks till next tenth of second
The next items have been added in V1.1
WORDTASTATEThe state bits of the CIA timer A, according to ciatimer.h
WORDTBSTATEThe state bits of the CIA timer B, according to ciatimer.h

The last two items have been added in CIA snapshot version 1.1 due to the improved CIA emulation in the newer VICE versions. Some state bits correspond to the CIA state as described in the "A Software Model of the CIA 6526" document by Wolfgang Lorenz, some are delayed versions. For more read the source file ciatimer.h.


Next: VIA module, Previous: CPU 6809 module, Up: Module formats   [Contents][Index]