News for hackers. Stuff that matters.
Re:NES Emulator on the UEFI Shell Running Super Mario Bros [... by jan-kleks on Wednesday July 04, 2018 @10:05AM (#17457324)
The dev said in one of the comments to the video:

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/

Re:NES Emulator on the UEFI Shell Running Super Mario Bros [... by lsh on Wednesday July 04, 2018 @10:09AM (#17457347)
the above is quoted from the reddit thread: https://old.reddit.com/r/programming/comments/8vvzjr/nes_emu...
Re:NES Emulator on the UEFI Shell Running Super Mario Bros [... by jan-kleks on Wednesday July 04, 2018 @10:16AM (#17457372)
Yup, I'm the OP there. :)
Re:NES Emulator on the UEFI Shell Running Super Mario Bros [... by grawprog on Wednesday July 04, 2018 @10:23AM (#17457408)
>Can we make it so that you pick an OS to boot based on which pipe Mario goes down?

This would be awesome.

Re:NES Emulator on the UEFI Shell Running Super Mario Bros [... by dis-sys on Wednesday July 04, 2018 @01:29PM (#17458421)
I thought the tradition is to port DOOM first.
Re:NES Emulator on the UEFI Shell Running Super Mario Bros [... by drproteus on Wednesday July 04, 2018 @06:35PM (#17459791)
So, does this mean I could potentially have a refind like bootloader where I select boot disks through some sort of "warp zone"?
Re:NES Emulator on the UEFI Shell Running Super Mario Bros [... by rspeer on Wednesday July 04, 2018 @07:54PM (#17460051)
The Warp Zone, of course, boots OS/2.
Re:NES Emulator on the UEFI Shell Running Super Mario Bros [... by lostgame on Wednesday July 04, 2018 @09:28PM (#17460346)
Clever girl. Or guy.
Re:NES Emulator on the UEFI Shell Running Super Mario Bros [... by androsyang on Wednesday July 04, 2018 @06:54PM (#17459859)
Beat the game to turn on your PC
Re:NES Emulator on the UEFI Shell Running Super Mario Bros [... by rangibaby on Thursday July 05, 2018 @12:12AM (#17460804)
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
Re:NES Emulator on the UEFI Shell Running Super Mario Bros [... by Aardwolf on Wednesday July 04, 2018 @06:25PM (#17459746)
The vertical video chops off half of the screen and uses only 1/3th of youtube's space when it could have easily been horizontal

Other than that, neat, and good news that UEFI is programmable like that!

Re:NES Emulator on the UEFI Shell Running Super Mario Bros [... by digi_owl on Wednesday July 04, 2018 @01:53PM (#17458566)
While it is an impressive feat, it should give pause to thought about how complicated the modern "BIOS" has become...
Re:NES Emulator on the UEFI Shell Running Super Mario Bros [... by slededit on Wednesday July 04, 2018 @06:55PM (#17459866)
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.
Re:NES Emulator on the UEFI Shell Running Super Mario Bros [... by 0x0 on Wednesday July 04, 2018 @02:17PM (#17458682)
I don't know about that, I think targeting a legacy non-UEFI BIOS for this application wouldn't be a lot more work?
Re:NES Emulator on the UEFI Shell Running Super Mario Bros [... by gcb0 on Wednesday July 04, 2018 @02:21PM (#17458706)
that's the point.
Re:NES Emulator on the UEFI Shell Running Super Mario Bros [... by 0x0 on Wednesday July 04, 2018 @02:25PM (#17458726)
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. :)
Re:NES Emulator on the UEFI Shell Running Super Mario Bros [... by therein on Wednesday July 04, 2018 @03:14PM (#17458961)
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.

Re:NES Emulator on the UEFI Shell Running Super Mario Bros [... by gcb0 on Friday July 06, 2018 @09:11PM (#17476276)
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.

[dead]
Re:NES Emulator on the UEFI Shell Running Super Mario Bros [... by anonymfus on Wednesday July 04, 2018 @05:50PM (#17459611)
AFAIK there is no UEFI API for sound card access.
Re:NES Emulator on the UEFI Shell Running Super Mario Bros [... by zeroisnowfour on Wednesday July 04, 2018 @03:37PM (#17459061)
Why was this down modded? Emulators that can't emulate 8 bit audio are acceptable? I guess I am in some fantasyland.
Re:NES Emulator on the UEFI Shell Running Super Mario Bros [... by rcfox on Wednesday July 04, 2018 @06:11PM (#17459691)
Do you see the irony here? You're bothered that people are dismissing your 10-second comment in which you dismiss someone else's hard work.
Re:NES Emulator on the UEFI Shell Running Super Mario Bros [... by Gongbisama on Wednesday July 04, 2018 @05:11PM (#17459460)
https://imgur.com/gallery/bLRM9VA

I played it on the VMWARE too

Re:NES Emulator on the UEFI Shell Running Super Mario Bros [... by Zardoz84 on Thursday July 05, 2018 @02:10AM (#17461178)
oh.. this remember me when I had a Mario game on a 5" floppy that bottedup directly from the bios.