Close

Prior Art (a.k.a. Open-Source Candy Shop)

A project log for HDMI FPGA FeatherWing

A Lattice ECP5 FPGA with DDR3 RAM and 1080p HDMI in a Feather form factor.

brian-gilbertBrian Gilbert 11/19/2019 at 03:300 Comments

A lot of PCBs out there have ESP32s and/or ECP5s that do graphics and game stuff. Since much of these projects are open-source, I hope to be able to leverage a lot of the information provided in them to speed up development.

First, let's take a look at the ESP32. I'm definitely not the first to use the ESP32 to run classic games. First off, the emulators. The NES has been emulated many, many times on the ESP32. I'm also thinking that this may be one good demo piece for this hardware. Who wouldn't love Super Mario 3, but with the best graphics filtering imaginable so that it doesn't look blocky on a 50" 1080p television set? Sure, that pixelated image has a certian asthetic, but 5mm-square pixels are a no-go in my book.

Emulators don't stop with the NES. The PocketSprite by [Sprite_tm] is an ESP32-based device that packs both a Game Boy emulator and a Sega Master System (Sega Genesis) emulator at the same time. Also, there has been at least one attempt at emulating the SNES, but the system didn't perform to expectations.

Emulators are only the beginning. While not the first to do so, [Gadget Workbench] on YouTube has ported DOOM to the ESP32. He ported a number of other games as well, and documents all of them with open source code on his GitHub. He starts with a breadboard version which has a SPI LCD screen and an SD card over SPI as well, but on different SPI busses. In later iterations, he moved from his original breadboard layout to the Odroid-Go, which has LCD and SD card on the same bus. He addresses this by using a semaphore and it all works fine. These games are especially interesting because the porting wasn't overly difficult. He only had to reimplement some of the underlying graphics procedures as the games were all versions that had been ported to work with the cross-platform SDL library. That means that if I can write functions for the core functionality of the SDL library, adding games should be straightforward after that.


At this point you might be wondering why I'm going on and on about the ESP32 when this project is about the ECP5. The reason is that I'm intending to use this HDMI FPGA FeatherWing in conjunction with the ESP32 on the Adafruit HUZZAH32 board. Turns out, I'm not the first one to think of this, although the application was a little bit different. The ULX3S is a new(-ish) open-source development board for the ECP5 which has an ESP32 on-board as a Wi-Fi/BLE bridge, and I'm excited to see where it goes. It already seems to have garnered a community of followers. Even though the ULX3S was designed for educational purposes, I will want to make sure I can make my board(s) relatively compatible with this design so that code written for the ULX3S could potentially work in my system.

A number of other recent designs have also popped up that use the ECP5. Premiering just this past weekend, the 2019 Hackaday Superconference badge is ECP5-based, and had an HDMI connector! [Sprite_tm] gave a great talk explaining some of the specifics, and of course the GitHub page will be a great reference for this project.

Another very recent design with an ECP5 is the Orange Crab by [Greg Davill]. It has a Feather form factor, and is also open-source.


Long story short, there is a lot of stuff already out there, and if I don't take that into account, I would have to be a fool. So much open-source stuff is available in this domain, which should speed up development of this board considerably. I'm not always good at this open-source thing, but I'm really going to try this time to post updates as things happen. This will be especially important because I'll be using open-source stuff in this project, and so I should pay it back by sharing what I learn and discover along the way!

Discussions