# The pad and the serial link ## Pad (KH "Controller"; CC65 agrees bit for bit) Read 4400: bit 0 up, 1 down, 2 left, 3 right, 4 A, 5 B, 6 start, 7 select; **0 = pressed**. An 8-way pad: diagonals are two bits. Whether opposite directions can both read pressed is a mechanical question (host side). ## Serial link (KH "UART") A software-clocked shift register, not a UART in the usual sense: - **TX:** writing 4400 loads the shift register and puts bit 7 on the data line. Any read or write of 4C00-4FFF pulses the clock line high for 468 ns; on its falling edge the register shifts left (next bit out). After the 8th clock the data line goes low and stays low. - **RX:** data is latched on the rising edge of the incoming clock; after 8 clocks an **NMI** is raised and the byte is at 4800. There is no way to resynchronise a receiver that has slipped. - The connector's pins 1, 2, 4, 5 go to ASIC pins 77, 81, 78, 80 (KH); which is clock in, clock out, data in, data out is not stated (U21). Unknowns: U21 the pin roles; U22 whether the NMI is an edge per byte and what clears it; U23 which games use the link (none named in KH or CC65). **Socket:** a `LinkDevice` with clock and data lines; two consoles in one process meet at every 4400 write and 4C00 access (a channel: domains.md).