Ok so I have some very interesting results. Went to a friend who has a dynamic PET and spent a few hours taking loads of logic analyzer samples from the PIA with PETTESTER
First tested all my PIA's and they all work 100%
Next probed all the data pins individually for address E810 and E811.
On initialization I can see b00001111 written to E810, then b00000100 to E811
Looking at the source code this corresponds to:
lda #$0F ; DDRA pins. 0=IN, 1=OUT. IIIIOOOO.
sta pia1 + 0 ; Initialise DDRA.
lda #$04 ; Change to data register - but no CA1/CA2 interrupts!
sta pia1 + 1 ; Output to CRA.
After the write to E810 with 0xF the PA0 pin drops low.
So all good there - as expected.
Back to the faulty PET. The control pins (RS0, RS1, CS0, CS1, /CS2) all match the working PET, however the data pins D0-D7 is different.
I'm seeing b00000000 written to E810, then b00010000 written to E811.
This explains why the PIA is not working. Why the data is wrong is a mystery.
Comparing D0 with working/faulty - all the pattens match except D0
Working:
Faulty:
