Beagle Entertainment System Cartridge Console

A project log for Beagle Entertainment System

Turning the BeagleBone Black into a retro gaming appliance

Andrew Henderson 12/21/2016 at 21:280 Comments

For months, I have been so tied up with finishing my PhD that I haven't spent much time at all on my BeagleBone Black work. But, now that I've defended my thesis and submitted my final dissertation, I figured it was time to dust off the code and designs that I've had sitting around and do something interesting. What better way than to turn my Beagle Entertainment System (BES) work into a retrogaming console? A really tiny SNES cartridge console.

I started with a design using some Adafruit component boards I had sitting around: the ILI9340 320x240 TFT LCD, a four-channel BSS138 FET line-level converter, and a DS1307 RTC breakout board. I spent some time breadboarding the setup, using Fritzing for planning. The plan was to provide a status screen for the console using the LCD, native SNES gamepad interfacing with GPIOs running through the BSS138 board, and a battery-backed RTC for games that had one in their original carts.

I ended up dropping the RTC from the design, as the RTC wasn't really needed and it was really tight for space inside of the cartridge. Once everything was wired up, I planned out my pin muxing and got to work making the device tree for the kernel (a 3.14 TI BSP without device tree overlay support).

My prototyping went on for a few days as I continued to refine and test software, create wiring harnesses, and carve up on the SNES cart that would serve as the shell for the system. The victim cart was a Super Scope 6, which I purchased for $2.50 from a local used game store. I was able to cut through the cart using a drill and an X-ACTO knife. Once I got the cuts about where I wanted them, I smoothed out the edges of the cuts a little by carving them down with the knife. I wasn't pretty, but good enough for a rough prototype. I tried mounting the various pieces inside of the shell, keeping the BeagleBone Black outside of the shell during testing.

Once the software and wiring looked good, I did the final assembly. It turns out that the BBB and a micro-to-full HDMI converter fits almost perfectly across the width of the cartridge, making the final console have a (far more convenient) full HDMI port available. I did have to shave off the rubber coating on the outside of the converter, as it was too thick for the space inside of the cart. There was also zero clearance over the P8/P9 headers, so I had to run all wires directly into the P9 header. I did this my tinning each wire with solder and then inserting it into the appropriate header hole.

The logic-level converters were necessary because SNES controllers use 5 volt signals and the BBB uses 3.3 volts. The SNES controller protocol is well documented, and I used the BBB's PRUSS to bitbang the protocol using GPIOs. This has the added advantage of the controls not getting sluggish when the CPU load is high on the system. USB gamepads using the kernel joystick interface tend to get less responsive when CPU load gets really high, but the PRU keeps chugging along without any concern about CPU load. My PRU firmware placed the state of the two controllers into a 32-bit memory location shared between main system RAM and PRU RAM, so checking the controller states was as simple as doing a 32-bit memory read in my application.

The surprising thing is, after all of the engineering effort... it actually all works great!