Hardware hack lets you play Snake on an LED-lit keyboard

Before there were birds, plants, or candies, there were snakes. The semi-addictive game debuted on Nokia's mobile phones and become *the* mobile game, until colored screens and higher end hardware pushed it into obscurity. But what if you had fond memories of the game, a penchant for modding any hardware you can get your hands on, and lots of time in those hands? Why not recreate the game in the most unimaginable computer possible, as shown in this mod by Jeroen Domburg, software developer by day, hardware modder by night, and creator of possibly the world's first Snake game on a keyboard.

How on earth do you put a Snake game on a keyboard? It just so happened that Jeroen was on a hunt for a new keyboard and came across the Coolermaster Quickfire Rapid-I, which had an LED for each and every key, mostly for gaming purposes. The keyboard happened to also have an ARM chip. Not your powerful smartphone processor, mind you, but a 72MHz ARM Cortex-M3 from Taiwanese company Holtek, paired with 32 KB (not a typo) of RAM and 127 KB (again, not a typo) of flash storage. Knowing his proclivity for tearing things up, his friends joked why he hasn't yet put Snake on his less than 24 hours old keyboard. Little did they know that he would take it to heart.

Of course, it's easier said than done. While the keyboard certainly had capable hardware, manufacturers usually don't like people digging in too much to modify what their product does. And so even the Coolermaster keyboard had safeguards that would prevent programmers from modifying the software's behavior. That didn't deter Jeroen, however, who looked to other sources for the needed information, including trying to analyzing the keyboard's firmware update and "sniffing" out what goes on during the update. Long story short, he was finally able to get a dump of the flash memory which isn't only useful for actually writing Snake, it could also be used to reset the keyboard in case something goes wrong.

Once that grueling task is done, actually implementing Snake was relatively easier. That is, if you know how to program in the arcane language known as Assembly. Given the memory limitations, the code and data for Snake would have to reside in around 28 KB of RAM and 64 KB of storage, a measly fraction of resources used even by the most minimal mobile app today. The result? Well, nothing less than a game of Snake playing out on a non-straight grid of keyboard keys lit up by LED lights.

So why go through all that? For fun, for learning, and well, because Snake!

SOURCE: Sprite Mods (multi-page)