Close

Why Target Lower Specs?

A project log for VGA Graphics Over SPI and Serial - VGATonic

640x480 (and 848x480!) Color VGA Video Card for Microcontrollers and Single Board Computers

pkPK 06/20/2015 at 18:420 Comments

There was a bit of interest in some of the project's goals for this year, but it really boiled down to this question:


"If you're supporting 640x480x8bpp, why would you want to have anything worse?".

The reason, as always, is resource constraints.

I was able to demo a Raspberry Pi 2 playing Doom over SPI, but that part has excellent SPI speeds - I can reliably blast 62.5 MHz down SPI with only rare hiccups. This makes for good Doom-in-native-resolution demos, but isn't realistic for every platform.

Lots of platforms are more modestly spec'd: the Arduino Uno in your drawer probably can do 8 MHz SPI (and where are you going to store 307kB of VRam? You'd have something hacked up like my 640x480 Arduino demo project.) If you had to update the full screen every time (say, a flashing light) you'd get a slideshow at roughly 3.26 FPS. Maybe that's enough for many purposes, but many (most?) of you would certainly be itching for more speed. Similar math applies to other parts: take the speed of SPI in MHz and divide by 2.5 for the 'full frame update' FPS speed.

Okay, sure, you don't always update the full frame - that's why we'll (try to) add some basic hardware acceleration (the most rudimentary acceleration is already in the firmware - just stop writing the frame and you can reset to 0,0. If you're only updating the top left pixel you can get 1,000,000 updates out of the Arduino!).

Realistically, though, we should add more options. 320x240 requires 1/4 the writes - suddenly the Arduino is doing a respectable 13 FPS over SPI. 160x240 and 80x60 more still.

Bit depth works in a similar way. While 8 bit color requires the whole SPI byte, B&W, for example, can pack 8 pixels into the same byte!

I'll surely expand on this if I can actually fit this into our own resource constraint - my insistence on the 144 macrocell CPLD. (I enjoy the challenge, haha). But here's the math on one planned range:

Now you see the real trick - the lower settings are acceptable even over the serial port. Interesting, huh?

Also, for those interested in graphics, follow and skull HOMER, another graphics entry in this year's contest by monnoliv! I'll be following along with the progress intently, and you should too.

Discussions