Introducing Glitch

Hey, look! I made a little graphics demo!

I also wrote the graphics libraries it uses (m4vgalib), because that seemed like fun.

…and the music.

…and the music synthesizer that’s playing the music.

…and the music authoring tools for writing the music.

…and the C++ runtime library (ETL).

…and the build system (Cobble).

…oh, I built the computer it’s running on, too, based around an STM32F407.

My idea of “fun” is pretty odd, I realize. This is probably why I don’t get invited to a lot of cocktail parties.

The mess of wires that runs Glitch. I imagine the video quality would be better if it didn't look like an exercise in wire inductance.

Glitch is a demo in the sense of the demoscene, and a work in progress. The video above shows an abbreviated version — a sort of trailer. I’ve been tinkering on Glitch since December, but it’s based on my open-source m4vgalib, which has been published for a couple of years now. (You might see some resemblance in this teaser video from 2012.)

Now, I recognize that some of my readers aren’t microcontroller video geeks, and for those readers, I feel like I ought to offer some perspective on why I’m so excited about this. So:

The processor I’m using has no video hardware at all. I’m tricking a monitor into showing real-time color graphics through carefully timed software that abuses some other, unrelated, hardware to push pixels. And, to my knowledge, those pixels I’m pushing are the most that have ever been pushed by a chip in this class1: 60 frames per second of 800x600 color video.

1

By which I mean an STM32F4 without the video option. I saw someone get to 56fps recently, by overclocking. Their approach is similar to mine but has some interesting advantages — and drawbacks. I’ll compare the two approaches in a later post.

No tricks, no overclocking, just very careful programming and a lot of work.

Graphics demos like this are traditionally released at demo competitions like Breakpoint, and for a while I planned on doing just that. But when it comes right down to it, I’m just not a competitive person2. So I’m publishing Glitch here instead. And rather than bragging about my 1337 5K1LLZ, I want to show you how the magic trick works, and inspire you to make magic of your own — perhaps even building on my code.

2

Besides, I would lose. ;-) There’s some impressive stuff out there.

I’m working on a series of posts to walk through the internals of Glitch and m4vgalib, highlighting some of the problems I encountered and the solutions that I chose (and didn’t).

I hope you’ll see why I find this sort of thing really interesting. :-)