Get all your news in one place.
100's of premium titles.
One app.
Start reading
Tom’s Hardware
Tom’s Hardware
Technology
Mark Tyson

Retro enthusiast injects Snake game into vintage S3 graphics card VBIOS — enjoy some serpentum fun while your old PC boots

Snake game.

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.

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.

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:

  • Power up the system
  • Embedded modded image splash screen displays
  • Prompt offers option to play Snake (press N) or skip (Esc)
  • The prompt also times out, so boot will continue if there is no user input.
  • N – play Snake game
  • Esc – system reads and shows actual GPU clock
  • Booting continues

Please note that USB keyboards don’t work with this implementation of Snake 512. Also, there is no sound. However, with everything running as intended, Bits und Bolts moves on to some further customization - editing the Snake 512 game colors (in Ghidra again). The vintage computing enthusiast had previously bookmarked sections of the code where colors for the border, background, snake head, snake body, and others were defined. Now these were edited to other values from the VGA color palette using hex values for appropriate rows/columns. At the end of the video, with everything working and colored as intended, the TechTuber quips, “Who says the ViRGE can’t play games?”

The last time we wrote about the escapades of Bits und Bolts was when they modded the S3 ViRGE DX VBIOS to disable the ‘pedestal bit,’ which caused S3 graphics blacks to be rendered as a dark grey. We’ve also previously reported on a Doom port that was released as a Coreboot BIOS payload (of course, it is too big to actually go in the BIOS).

Sign up to read this article
Read news from 100's of titles, curated specifically for you.
Already a member? Sign in here
Related Stories
Top stories on inkl right now
One subscription that gives you access to news from hundreds of sites
Already a member? Sign in here
Our Picks
Fourteen days free
Download the app
One app. One membership.
100+ trusted global sources.