# The CIAs: two 8520s Two MOS/CSG 8520A-1 Complex Interface Adapters. Facts from HRM3 appendix F (pdf354- 368), the TRM's 8520 chapter (pdf213-), and the 8520 data sheet (no text layer: read by eye), all tier 2. ## Wiring (HRM3 pdf354-355) | | CIA-A (odd bytes, BFE001 + n x 100) | CIA-B (even bytes, BFD000 + n x 100) | | --- | --- | --- | | interrupt | INT2 (Paula PORTS, level 2) | INT6 (Paula EXTER, level 6) | | port A | /FIR1 /FIR0 /RDY /TK0 /WPRO /CHNG /LED OVL: fire buttons, four drive-status inputs, the power LED / audio filter, the ROM overlay; DDRA "set to 0x03" | serial port control lines /DTR /RTS /CD /CTS /DSR, parallel SEL POUT BUSY | | port B | the parallel port data | drive control: /MTR /SEL3-0 /SIDE DIR /STEP | | TOD input | "50/60 Hz event counter" (vertical sync or the power line tick) | "horizontal sync event counter" | | serial (SP/CNT) | the keyboard | unused | | FLAG | — (on the A500: not used for disk) | the drive's /INDEX pulse (floppy.md) | The register select comes from address bits A8-A11; CIA-A is selected by A12 low and answers on D0-D7 (odd bytes), CIA-B by A13 low on D8-D15 (even bytes) (HRM3 pdf329 and appendix F). An access that selects both (A12 and A13 low) writes or reads both: documented behaviour some software relies on (U23: what a read returns). ## Clocking The CIAs run on the 68000's E clock, 7M / 10 (715,909 Hz NTSC, 709,379 Hz PAL; HRM3 pdf367-368). CPU accesses to them are **6800-style synchronous cycles**: the 68000 waits for VPA/E alignment, so a CIA access costs a variable number of clocks set by the E-clock phase (the 68000 user's manual's VMA/VPA timing; the A500's Gary asserts VPA for the CIA range: TRM). This is the board's job, not the core's: cpu-m68000.md. ## The chip - Two 16-bit interval timers (A, B), one-shot or continuous, counting E-clock pulses (timer A) or E pulses, CNT pulses or timer A underflows (timer B) (HRM3 pdf358). - A 24-bit TOD counter, an alarm, the latch-on-read of the high byte and the stop-on-write rule ("TOD is automatically stopped whenever a write to the register occurs ... will not start again until after a write to the LSB", pdf359). **The 8520's TOD is a binary event counter**, unlike the 6526's BCD clock: the reason a 6526 model cannot be reused unchanged. - An 8-bit serial shift register (input from the keyboard on CIA-A, clocked by CNT; output mode clocked by timer A, pdf360). - ICR: a mask register and a data register cleared by reading; the interrupt output. - The 8520's ICR, timer-reload and one-cycle delays (a timer read one E cycle after a load, the interrupt raised one cycle after an underflow) are the corners every C64 and Amiga emulator has had to learn: **U24**. The data sheet's timing diagrams are the tier-2 start; vAmigaTS CIA and TOD and Amiga Test Kit's CIA tests are the tier-3 judges. ## Revisions The 8520 and the 8520A-1 are the Amiga's parts across OCS, ECS and AGA. Whether the Amiga's 8520s have the "old" or "new" 6526-style ICR timing differences, and whether any A500 shipped a different revision, is part of U24. ## Chip rule No family core models a 6526 or 8520 today (the family's repositories searched 2026-11-26: none). No other family board needs an 8520 (the C64, which would want a 6526, is not a family board). So the CIA **stays in the board**, behind a pin-shaped class `Cia8520` (ports, timers, TOD, serial, interrupt line), ready to extract if a C64 or 1541 board ever arrives.