BC1 = WR and !A2 and I/O request
BC2 = I/O request and !A3 and !A4
A8 = BC2
A9 low if A0, A1, A6, A7 high, A5 low
110xxx11 = base 195
During I/O request.
BC1 high if write and A2 low
BC2 high if A3 and A4 low, low if either A3 or A4 high
BC1 high addresses 195/203/211/219
BC2 high addresses 195/199
Port 195 = BC1 high, BC2 high
Port 199 = BC1 low, BC2 high
Port 203 = BC1 high, BC2 low
Port 211 = BC1 high, BC2 low
Port 219 = BC1 high, BC2 low
Knowing this, the only useful port numbers, given that BC2 has to be high otherwise the AY-3-8910 is high impedance, are ports 195 and 199.
The truth table for the AY is:
Code: Select all
BDIR 0 0 1 1
BC1 0 1 0 1
BC2 1 1 1 1
Inactive Read Write Latch register address
Port IN 195 IN 199 OUT 195 OUT 199