The DIY Retro Game Console Revisited

retro-not-assembled-smBack in December I returned from 32C3 with a DIY retro game console kit created by Voja Antonic as it promised to be fun to assemble and to study the source code. To me it was “the” hardware discovery of the congress! Apart from the prospect of playing a retro-game and to feel transported back into the 1980’s I was intrigued by the fact that the VGA graphics is not generated by a dedicated graphics unit but is instead done in software on the PIC CPU with three digital outputs that are connected to the red/green/blue lines of the VGA connector and two additional digital outputs to drive the horizontal and vertical synchronization signals for the screen. In other words, a perfect platform to get a hands-on practical view of how bits in memory can be transformed to a colorful picture on the screen.

retro-pi-in-action-smIt has taken me a while to set aside the time to solder the kit together as I knew that once I started I would not want to be interrupted until I had it working and until I could study the source code. So a month later I finally got to it and you can see the original kit and the result of 2 hours of soldering in the pictures on the side. After playing the game for some time and enjoying it immensely, I turned to the software side.

Voja’s documentation on his website of how the graphics signal is generated gets one started pretty quickly but as with all such things, the devil is in the details. How is that external 4 MHz quartz used, how is the chip configured for an internal clock rate of 72 MHz, how is Timer 2 configured to generate an interrupt for every line, why does he use a second timer for horizontal synchronization and what do all those registers mean that have to be set for this timer to work the way he uses it? Contrary to my hopes I’ve had to learn that PICs are rather complicated little chips with seemingly infinite ways to configure just about anything about it’s inner operation.

For the moment I’m still in explore mode. Depending on how deep that rabbit hole really is I might be tempted to try some of my own ideas on the platform. Let’s see.