A retro PC enthusiast has modified the VBIOS of a vintage graphics card to embed a version of Snake – the game everyone used to play on their dumb phones. This tiny dose of serpentum fun is playable whenever the system is booted, and once exited, the PC will continue to boot as normal. Bits und Bolts completed this S3 ViRGE DX mod by hacking the VBIOS and injecting Snake 512, a free version of the game condensed into just 512 bytes and written in x86 assembly.
Hacking a VGA BIOS to Run Snake! - YouTube Watch On
Before the Snake 512 embed was wrangled, Bits und Bolts decided to mod the S3 ViRGE VBIOS by adding a dynamic (text) splash screen to show the actual GPU frequency. This effort is bolted on to prior work where the TechTuber injected a graphical splash screen, and the task takes up roughly the first half of the video.
From 10 minutes 43 seconds in, we get to see the vintage computing enthusiast inject Snake 512 into the video card BIOS. Snake 512 was designed to fit in the 512 bytes of a disk boot sector and run in x86 real mode. Bits und Bolts thought this OS-independent assembly code was thus a great fit for wedging into a VBIOS.
Latest Videos From
The intrepid vintage computer fan couldn’t just copy the GitHub code and paste it into the BIOS. So, Claude Code was consulted to prepare the commented GitHub code and turn it into hexadecimal code suitable for injecting into a VBIOS.
With this code ready to be pasted, Bits und Bolts opens up the S3 ViRGE VBIOS in Ghidra, a reverse engineering framework developed by the National Security Agency (NSA) of the United States. This tool is now free, open source, and available on GitHub.
Next, an empty section of the target file was found, just after the splash screen, and the new code was pasted. The code block needed referencing / patching, so it would be triggered after the splash screen rather than just be ignored at boot. Then the checksum needed fixing.
The way Snake 512 in a VBIOS was implemented was as follows:
Stay On the Cutting Edge: Get the Tom's Hardware Newsletter Get Tom's Hardware's best news and in-depth reviews, straight to your inbox. Contact me with news and offers from other Future brands Receive email from us on behalf of our trusted partners or sponsors
... continue reading