Custom compression compresses classic computer choirs into a small controller
Geeks of a certain vintage will have fond memories of games that were simplistic by today’s standards, but still drew one. Their low-fidelity graphics were often complemented by equally low-fidelity music forced by the afterthought of a speaker that inhabited most computers. Despite the technical constraints of the time, these games did not only offer gameplay. They were storytelling and they were immersive in a way some might think might not be accessible to a younger generation.
It didn’t stop [Thanassis Tsiodras] to share the classic “The Secret of Monkey Island” with his niece and nephew when they were young. Happy to see his family again after a year of separation due to COVID-19, [Thanassis] wanted to give them a handmade gift: music from “The Secret of Monkey Island” on a personalized player. What an uncle!
[Thanassis] Could have just recorded the music and played it back using any number of specially designed chips, but being a longtime software engineer, he decided to take the scenic route to his destination. First of all, DOSBox was hacked to dump the speaker output to a file. Python, C and 30 years of experience have been put to good use to squeeze it all into the 8KB storage of an ATtiny85. This was no small feat, as he had to create a custom implementation of Huffman compression so that the data was small enough to fit on the chip. And when it worked, but didn’t work, even more optimization was needed.
The end result was well worth it though, with the music for “The Secret of Monkey Island” played in its original form from a loudspeaker driven by the very humble but useful 2n2222. [Thanassis]’The site is full of details that are too complex to publish here, but too neat to miss. Watch the video under the break for a demonstration.
Granted, the ATtiny85 is a tiny, but manageable little creature. You might enjoy seeing it put into use as a gaming console or even as a spectrum analyzer. Do you have your own ATtiny85 hack that you would like to share? Be sure to let us know via the Tip Line!