Last week I got some more parts from Ultimarc.com which were added to the cardboard controller box without too much hassle. The first was a weighted arcade spinner control for games like Tempest, Arkanoid, Warlords and anything else that had a paddle controller. (In essence, it’s a one-axis mouse.) It feels great in the hand but you have to adjust each game’s sensitivity to fairly closely match the original hardware or it may not behave right, doing things like moving “backward” if you spin the knob too fast. I found a great page to help with this here, which tells you the exact conversion factor for the 1200-pulses-per-rotation Ultimarc controller to most of the older games which typically had much lower resolution encoders.
I also got a full-size trackball (3″ diameter”), because let’s face it, playing Centipede, Crystal Castles, or Missile Command with a joystick is just wrong.
But that’s not what I’m here to talk about today. What I really wanted to talk about was HDMI video on the Raspberry Pi. If you’ve read this blog long enough (which is effectively nobody but me), you know that a few years ago I did a whole bunch of HDMI-related test system development at work. So I know far more about the ins and outs of HDMI that anybody really should have to, but it didn’t really help today…
In figuring out what sort of display to put into this arcade build, the obvious solution is take advantage of the Pi’s built-in HDMI output, which provides an all-digital link directly to an LCD monitor and digital audio as well. This is a good thing because the Pi’s analog headphone jack is well known for having a lot of noise, for arcane reasons that aren’t worth getting into here. Adafruit, as a major US purveyor of RPi accessories, has several very nice little LCD displays perfectly suited to embedding into a project at various sizes and resolutions. They’ve sourced the displays from various Chinese manufacturers and seem to have paired most of them with one from a family of little driver boards that they’re getting from another Chinese manufacturer that does the work of converting the HDMI input to the LVDS standard that the panels natively require. In particular, the one I chose is 10.1″ diagonal and has a native resolution of 1280×800, which does not quite match the “HDTV” mid-range standard size of 1280×720. This mismatch seems to be typical for small LCDs for some reason. This matters.
The driver board interrogates the connected LCD panel and determines its native resolution, and then in turn communicates the capabilities of the display back to the computer via the HDMI cable using a standard format called EDID that describes the pixel size of the display and various timing parameters so that the computer can generate video that the display will know how to deal with. There are several “standard” modes defined by the HDMI spec at typical TV frame sizes, and there are also many other standard modes defined for computer monitors using the same method. The difference is that the standard for computer monitors does not include audio, while HDMI does, so when a HDMI sender thinks it’s attached to a computer monitor, it stops sending audio.
So we hook this thing up to the Raspberry Pi, and it claims to be a computer monitor, so not surprisingly, no audio comes out. Well, the Raspberry Pi people were pretty smart and figured this out a long time ago, and added a boot-time setting that is supposed to force the Pi to produce HDMI audio even if the monitor doesn’t claim to support it. Trouble is, it doesn’t work. At least not with this particular monitor. Now, you can force the Pi to produce an “HDMI standard” resolution of video, and then the audio starts working the way it’s supposed to, except then the driver board produces a resized picture at something other than the panel’s native resolution, which while not awful, is not as sharp as it could be. I just want sharp video AND actual audio output. Not too much to ask for, is it?
After Adafruit’s recommended settings failed to produce the desired results after several hours of putzing around with this, trying in vain to use the settings recommended on their site, and a large quantity of unsuccessful reboots and experiments with other settings, I had to give up and settle for a little bit of scaling. Even Adafruit, the seller of the panel, hasn’t figured this part out, but neither do they warn anybody – their forum has a thread full of people wanting to return the monitor, who all think (like I almost did) that it’s defective because they can’t get any sound out of it (with the recommended settings).
I just wanna play some games now!