David Lee has apparently ported a NES emulator — without sound — to UEFI, but source code is not apparently available:
I used EDK II framework.
About the keyboard input, Program reads the value from 0x60 port directly because of multi-key input processing.
I measure the timer count twice(for 1sec) by using the rdtsc instruction to make game delay more accurate.
I didn’t implement the audio output.