Today my NES was behaving very strangely, where some code would crash while reading the first controller. If I had it only read $4016 seven times after strobing, it didn't crash, but on the eighth it did. f I unplugged the first controller it would crash no matter what it was doing. Also, if strobe was kept set, pressing A on the controller would crash it. Very strange symptoms. The day before I had banged on a devcart out of frustration, and I thought maybe this had damaged something. No visible damage to the NES board though.
I looked at the logic levels on the first controller input connector to see what was changing when I unplugged the controller. As expected, it was D0, which the button status come in on. It should normally be high. When it went low, it crashed. Reading $4016 eight times caused the controller to output low, since the shift register had been exhausted. Same for pressing A when strobe was held high. But with the controller unplugged, it should stay high, since it has an internal pullup. Checking the other input pins D3 and D4, they ALSO went low when D0 went low. Why would D0 affect the others?!? Something must have come unconnected. I traced D0 back to a resistor pack, which measured 10K on the pins up to a point, then they were open circuit. The pack looked OK from the front, but then I saw a hairline crack down the center. That was the breaking the common connection that runs its length. The damaged pullups included the one for NMI. I'm guessing this is an open-collector output on the PPU, so a broken pullup would cause unexpected NMI(s).
For repair, I checked all my junk circuit boards for 10K resistor packs, but the closest I could find was 5K. I didn't want to have different values than before, because it would make my NES behave differently when testing hardware on it. The resistor packs are internally a strip of ceramic with carbon composition on the surface, with a metal strip along the top for the common connection. So I scraped the outer coating off along the top edge of the broken half until I exposed some of the metal, then soldered a very thin wire from it to common (used one strand from stranded wire). All resistances measure correct now, and I learned my lesson about being rough with my NES (the hours spent on this will make it hard to forget).
So, weird symptoms that go away when one (or possibly two) controllers are plugged in = possibly cracked resistor pack. The pack is long and cracks easily, so bending of the main PCB can easily crack it.
I looked at the logic levels on the first controller input connector to see what was changing when I unplugged the controller. As expected, it was D0, which the button status come in on. It should normally be high. When it went low, it crashed. Reading $4016 eight times caused the controller to output low, since the shift register had been exhausted. Same for pressing A when strobe was held high. But with the controller unplugged, it should stay high, since it has an internal pullup. Checking the other input pins D3 and D4, they ALSO went low when D0 went low. Why would D0 affect the others?!? Something must have come unconnected. I traced D0 back to a resistor pack, which measured 10K on the pins up to a point, then they were open circuit. The pack looked OK from the front, but then I saw a hairline crack down the center. That was the breaking the common connection that runs its length. The damaged pullups included the one for NMI. I'm guessing this is an open-collector output on the PPU, so a broken pullup would cause unexpected NMI(s).
For repair, I checked all my junk circuit boards for 10K resistor packs, but the closest I could find was 5K. I didn't want to have different values than before, because it would make my NES behave differently when testing hardware on it. The resistor packs are internally a strip of ceramic with carbon composition on the surface, with a metal strip along the top for the common connection. So I scraped the outer coating off along the top edge of the broken half until I exposed some of the metal, then soldered a very thin wire from it to common (used one strand from stranded wire). All resistances measure correct now, and I learned my lesson about being rough with my NES (the hours spent on this will make it hard to forget).
So, weird symptoms that go away when one (or possibly two) controllers are plugged in = possibly cracked resistor pack. The pack is long and cracks easily, so bending of the main PCB can easily crack it.