Page DC

CIA 1
AddressNameBit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0Description
DC00CIA1PRAKM7
PAD
KM6
PAD
KM5KM4
J2FB
LPEN
KM3
J2Dn
KM2
J2Up
KM1
J2Rt
KM0
J2Lt
Data Port A[1,2,3]
DC01CIA1PRBKM7
TIMB
KM6
TIMA
KM5KM4
J1FB
LPEN
KM3
J1Dn
KM2
J1Up
KM1
J1Rt
KM0
J1Lt
Data Port B[1,4]
DC02CIA1DDRADDA7DDA6DDA5DDA4DDA3DDA2DDA1DDA0Data Direction Port A
DC03CIA1DDRBDDB7DDB6DDB5DDB4DDB3DDB2DDB1DDB0Data Direction Port B
DC04CIA1TIMALTIMALTimer A Low byte
DC05CIA1TIMAHTIMAHTimer A High byte
DC06CIA1TIMBLTIMBLTimer B Low byte
DC07CIA1TIMBHTIMBHTimer B High byte
DC08CIA1RTCTRTCTReal time clock 1/10s
DC09CIA1RTCSRTCSReal time clock seconds
DC0ACIA1RTCMRTCMReal time clock minutes
DC0BCIA1RTCHRTCHReal time clock hours
DC0CCIA1SRSRShift register
DC0DCIA1ICSIRQ
Source
Always 0
Unused
IRQ Flag
IntRel
SDR
IntRel
Alarm
IntRel
UTB
IntRel
UTA
IntRel
Interrupt Control & Status
Read top, Write bottom
DC0ECIA1CTARTC[5]SRC[6]TSRC[7]Load[8]RES[9]OVFL[10]UNFL1[11]STARTControl Timer A
DC0FCIA1CTBTCOUNT[13]Load[8]RES[9]OVFL[10]UNFL2[12]STARTControl Timer B

Multiple address ranges

CIA1 is mapped to addresses 0xDCxx but only occupies 16 bytes. Referencing any address from 0xDC1x…0xDCFx will mirror those at 0xDC0x.

Notes:

  1. Keyboard matrix pins are R/W. PRA for columns, PRB for rows
  2. Joystick pins 0=activated. Port 1 in PRA and Port 2 on PRB
  3. Bits 6 & 7 of CIA1PRA selects paddle, %01=Paddle A, %10=Paddle B
  4. Bits 6 & 7 of CIA1PRB handler timer toggle/impule output.<br/>Bit 2 of register 14 or timer A & 15 for B
  5. RTC 0=60Hz 1=50Hz
  6. Shift register direction SP pin 0=read, 1=write
  7. TSRC 0=count system cycles, 1=positive slope at CNT pin
  8. 1 = Load latic into the timer once
  9. 0 = Timer restart after underflow (latch reloaded), 1 = timer stops after underflow
  10. 0 = Timer overflow, port B bit 6 high 1 cycle, 1 = underflow, port B bit 6 inverted
  11. 1 = Indicates timer underflow at port B bit 6
  12. 1 = Indicates timer underflow at port B bit 7
  13. Timer counts: %00 System cycle, %01 +ve slope CNT-pin, %10 Timer A underflow, %11 Timer A underflow if CNT-pin high