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.
if you lose the game all your files get erased cf. Kojima's original plan for "Metal Gear Solid", where if you died the game would stop working permanently
The BIOS was originally supposed to be a nice hardware abstraction layer to be used everywhere - akin to system calls now. If the BIOS was rudimentary it was only because of the limits of the machine - not the intent of the designer.
I thought it was the opposite of the point, that modern BIOSes had evolved to make this possible, but I think a non-modern legacy BIOS would work just as well. :)
The question isn't whether it is possible or not. For instance, this emulator, had it really wanted, could have used the UEFI API to do networking given the NIC is recognized at UEFI shell.
Doing this in BIOS would require you to implement a lot more from bottom up.
if you are on the bios level you can do anything. But the bare bones nature of old BIOS plus the space limitation of them would make this very difficult.
Now that EFI on the cheapest Staples' laptop is 10x more capable then the most expensive personal computer of 1999, this is not only possible but easy and helped by ton of EFI libraries.
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.
One can read in the video that it's a port of MoarNES: https://moarnes.sourceforge.io/ (0.13.8.21 alpha).
You might also be interested in:
-- CHIP-8 Emulator for UEFI: https://github.com/Openwide-Ingenierie/CHIP-8-UEFI
-- Implementing UEFI Boot to Zork: https://mjg59.dreamwidth.org/27881.html
-- Flappy Bird UEFI (there's also a video of a Street Fighter 2-like game demo there): https://github.com/hymen81/UEFI-Game-FlappyBirdy
-- Firmware Security blog UEFI games posts: https://firmwaresecurity.com/tag/game/