KingMike: thanks for the info on controller input, though I'm still not sure how it works. It confused me that the $4016 register could get info about all eight buttons from one bit. I'll have to do a bit of messing around with the debugger to figure it all out.
Means that after doing the "strobe" command, the first time you read $4016 will return A in the lowest bit, the second time it is read it will return B, I think the third is Select, etc.
(the second-lowest bit on each read is used on Famicom games to check the corresponding button on the expansion port at the same time)
At least that is with normal controllers. Odd ones like the gun or Arkanoid paddle will be different.
Explains why when my NES acted up, most of the buttons stopped responding except that pushing A acted as everything pushed at once.
(the extra filtering it does after reading all eight buttons, using with like XORs and such, is so that it can detect when a button is "pushed" and only count it as one press. As even when you mean to push the button only one time, the game will probably still read the input many times in the time it takes you to press and remove your finger, so it has to account for that.
A bad example of that would be Winter Games. Of the other problems AVGN had about the game, he didn't bring up that even the PAUSE function is broken. It only allows a certain delay for you to remove your finger from Start and if you hadn't moved it by then, the game will count it as another tap and unpause the game.
Compare that to a good game like Mario, which will wait until the button is released (at least once cycle where it is NOT pressed) before it will allow the game to be paused again. Meaning you can press and hold Start for a ridiculous length like 10 seconds and it will still properly recognize it as a single press.