Writing a test program to execute in the emulator instead of using an existing game may work a bit better since some games may not respond immediately.
Did somebody say test ROM?
This one reads the A button continuously, as in multiple times per frame.
Huh? In how far would such a program be more helpful than a regular game?
It's about measuring the time between button press and action on an emulator vs. on a real console and then looking at the difference.
Even if you say "Super Mario Bros." has a delay of one frame between input and action which the test ROM doesn't: Why is that important for a console vs. emulator comparison? Even if the delay was five seconds, it wouldn't matter since it's only about the relative difference:
If, for example, the NES produces input lag of five seconds while the emulator produces input lag of five seconds and two frames, you would know that the emulator is two frames slower than the NES.
You would get the same result if you measured a lagless test ROM on an NES vs. on an emulator: The difference between NES and emulator would still be two frames if it was two frames with the normal game, wouldn't it?