Trying to revive old Macintosh SE.
Initially, it had one vertical line, solved by resoldering connector points on analog PCB.
Then vertical bars appeared, as you can see vertical bars cross the floppy icon and cursor.
Cleaned and recapped analog board, replaced ue8, and tested the continuity of suspicious traces.
After replacing ue8 with 74hc166 (the old one I think should be 74ls166), still has vertical bars and some flicker on the background.
The interesting thing is floppy icon and cursor are not affected by flicker, at least look different.
Then, by testing traces, accidentally found that when heating PAL IC`s UG7 or UG8, I get a clean picture, and it starts flickering after cooling down.
Tested again with old ue8 74ls166 – heating UG7 or UG8 does not affect the picture at all, stable vertical bars, no flicker.
In both cases, it has a startup sound.
I think UG7 or UG8 cannot be bad, as heating them with old ue8 does not affect the picture at all.
So now I am thinking, can it be 74hc166 is not suitable, and I should find 74ls166 because somehow the signal for UG7 or UG8 is incorrect with it, and after heating UG7 or UG8 somewhere, resistance increases, and it solves the problem temporarily.
Tried to ask help in https://68kmla.org/bb/index.php?threads/macintosh-se-video-issue.45429/ and while waiting and thinking and a bit googling found out that I have to use 74HCT and not 74HC (https://electronicsclub.info/74series.htm):
The 74LS (Low-power Schottky) family (like the original) uses TTL (Transistor-Transistor Logic) circuitry which is fast but requires more power than later families.
The 74HC family has High-speed CMOS circuitry, combining the speed of TTL with the very low power consumption of the 4000 series. They are CMOS ICs with the same pin arrangements as the older 74LS family. Note that 74HC inputs cannot be reliably driven by 74LS outputs because the voltage ranges used for logic 0 are not quite compatible, use 74HCT instead.
The 74HCT family is a special version of 74HC with 74LS TTL-compatible inputs so 74HCT can be safely mixed with 74LS in the same system. In fact 74HCT can be used as low-power direct replacements for the older 74LS ICs in most circuits.
So, bought 74HCT166D and picture became clear perfect with no artefacts!
So, the proper replacement for 74ls166 is 74HCT166 and not 74HC166!