This is strange question to ask especially since you haven't seen my code. But I'm hoping that perhaps someone experienced it before in the past and might point where I should look for a problem.
I finished my emulator (no sound support yet) to a point that can play Super Mario Bros (the first one) as far as I know it emulates correctly up to level 8-2 (where I died

I added debugging output and it shows that the event handler handles the keys. Also when I reset the game the game starts accepting the keys.
Any idea where the problem might be? It's possible that I missed something and am not emulating it.
This is perhaps topic for another thread. I'm planning to add sound support, since I never did any programming with sound before I'm not sure where to start, any advice? I feel also that sound is not as well documented as other parts of emulation (or maybe it's just my lack of experience in that area)