I came up with some 6502 assembly tricks:
- make N and Z flags reflect A (no side effects): AND #$FF (used in Excitebike; alternatives: ORA #0 or EOR #0)
- make N and Z flags reflect X (no side effects*): INX & DEX (or for Y: INY & DEY)
*If your interrupt routines don't access the value of X besides preserving it.
Hacker News