acme/ACME_Lib/cbm/c64/cia2.a
2019-07-28 22:16:51 +00:00

33 lines
1.2 KiB
Plaintext

;ACME 0.96.4
!ifdef lib_cbm_c64_cia2_a !eof
lib_cbm_c64_cia2_a = 1
!source <cbm/cia.a> ; chip stuff (same for both cias)
; stuff for cia 2 only:
!addr cia2_base = $dd00
cia2_pra = cia2_base + cia_port_a
; %7....... DATA in (0 means GND)
; %.6...... CLK in (0 means GND)
; %..5..... DATA out (inverted, 1 means GND)
; %...4.... CLK out (inverted, 1 means GND)
; %....3... ATN out (inverted, 1 means GND)
; %.....2.. PA2 (pin M at user port, 0 means GND)
; %......10 VIC bank (inverted, so value %11 means address $0000)
cia2_prb = cia2_base + cia_port_b
cia2_ddra = cia2_base + cia_data_direction_a
cia2_ddrb = cia2_base + cia_data_direction_b
cia2_ta_lo = cia2_base + cia_timer_a_low
cia2_ta_hi = cia2_base + cia_timer_a_high
cia2_tb_lo = cia2_base + cia_timer_b_low
cia2_tb_hi = cia2_base + cia_timer_b_high
cia2_tod10ths = cia2_base + cia_timeofday_10ths
cia2_todsec = cia2_base + cia_timeofday_seconds
cia2_todmin = cia2_base + cia_timeofday_minutes
cia2_todhr = cia2_base + cia_timeofday_hours
cia2_sdr = cia2_base + cia_serial_data
cia2_icr = cia2_base + cia_interrupt_control
cia2_cra = cia2_base + cia_control_a
cia2_crb = cia2_base + cia_control_b
; the interrupt output is connected to CPU's /NMI input