43569 3AUG88-0545 Hardware Hacking
From: MARTYGOODMAN To: KENHALTER
While it is true, as Rick Adams wrote you, that the 7th bit of FF21
is connected with the CD status on the CoCo Bit Banger, this is
not the whole story! The CD line is sent to an auxiliarry input
of the PIA chip, and CANNOT be read directly. Instead, only
CHANGES in CD status can be detected! Set bit 0 of FF21 to 0.
THEN setting bit 1 of FF21 to 0 makes bit 7 of FF21 get SET to 1
on the FALLING edge of a transition of the CD line. Similarly,
setting Bit 1 of FF21 to 1 makes bit 7 get set on the RISING
edge of a CD transistion. You need to rest bit seven
after each detected transistion, and to constantly check
it for transitions.