Some time ago I was reverse engineering ATA's 'vertical' patch for the game Super Mario Bros. The patched game works on VNES, but it doesn't work on FCEUX or Nestopia. I used the FCEUX's debugging function, and I found that the game got stuck in the IRQ routine.
So here's the code:
And the result: the IRQ routine gets executed immediately after the RTI, creating an infinite loop. Seemingly the IRQ isn't acknowledged at all--although this part of code ALWAYS gets executed.
So... Is there any problem with the code? Or, in what cases can this glitch occur?