BX portable game console | project collaboration


Hi all,

The dream FPGA project for me is to make a game console.
That is, having a soft CPU and sprite and tile engine, similar to the NES or Gameboy.

The hardware can be relatively simple and breadboard friendly to begin with:
The TinyFPGA-BX + an LCD screen + some buttons + maybe a headphone amp for the audio.

I stated to play with this LCD screen but I don’t have the time nor the knowledge to do everything.

My area of expertise would be the software drivers and library, maybe hardware design if we want to make a proper board at some point.

If you are interested, let’s talk here.


Funnily enough, @lukevalenty was just recently egging me on to create a tile-based ground system, something like the mode7 games on the SNES used to do…

You can find the source for that, and a few other TinyFPGA graphical things that myself and @juanmard have been working on at https://github.com/gundy/tinyfpga-bx-demos

We’ve just been using VGA output, which seems to work reasonably well (I borrowed the code for the VGA rasterizer from @juanmard).

From a sound perspective I’ve also been playing around with a simple synth - https://github.com/gundy/tiny-synth

Both of these use a minimal set of external components - a few resistors for the VGA output, and a simple low-pass filter for the audio.

I’m not sure how you’ll go fitting a CPU + graphics + sound + program code all into something the size of a BX, but it seems like a fun goal. :smile:


Ohh my glob, the hits just keep coming today! This is exactly what I was hoping to see…I love the Mario Kart style track. :star_struck:

I think it could also work really well with another small microcontroller like a Teensy-LC or 3.2. You could control the BX peripherals through a SPI bus.

So awesome!! :clap:


I thought I’d loop back on this because I’m keen to see this come to fruition…

I’ve been thinking a bit more about the space constraints and they may not be as tough as I initially thought. For one, there’s a ton of flash available for program code, so what won’t fit in the FPGA can possibly go into software, and also, I’ve spent today learning a bit more about some of the frivolously wasteful things I’ve been doing in verilog, and learning about strategies for time-multiplexing multipliers and other larger blocks to save on gates :slight_smile:

So, long story short, I’ve got some spare time, and I’m happy to use it to dig into something like picosoc and make some game-oriented peripherals to help get this off the ground…

So, what would people want to see in a TinyFPGA BX game SoC? :grin: What are must-have peripherals? Would would make it fun to program for? What would make it fun to play games on? :slight_smile:



Are you thinking of doing a portable one with a touch screen, or one that uses a large screen? The peripherals will depend a lot on that.

For a portable console, a touchscreen, speaker, buttons and directional pad seem like the essentials. You might manage with a non-touch LCD or Oled screen.

An SD card reader for loading games would be useful.

Support for two screens, one of which is a touchscreen like on a Nintendo DS would be good.

Microphone, bluetooth, wifi, camera and acceleration sensor would be good.

Extra RAM by some means, e.g. HyperRAM would be useful.

A UART is always useful for diagnostics, and of course it will need a few LEDs.

Are analog joysticks or thumb pads used much these days?

A GPU of some sort is probably needed for effective game development.

And an audio synthesizer for music and sound effects.

With an i2c master, you could attach Wii nunchuks.


What is the simplest way to connect HyperRAM to a TinyFPGA?

From what I can see, HyperRAM is sold in a BGA package, and I wouldn’t know what to do with a BGA without a custom PCB.

I was hoping to find an already-soldered HyperRAM breakout board that I could connect to the TinyFPGA with DuPont wires, but I haven’t been able to find anything like that so far.


I had seen this discussion before - https://github.com/icebreaker-fpga/icebreaker/issues/7 - and thought perhaps a HyperRAM Pmod existed. There is this - https://twitter.com/bml_khubbard/status/990249386872483840?lang=en. The board looks like it is available at OSH Park. I don’t know how hard it is to solder the chip to it. It would need a dual Pmod connector for the TinyFPGA.


Portable but without a touch screen.

What I have in mind is:

On the FPGA:

  • CPU: PicoRV32
  • GPU: Sprite and Tile, vectors, graph7
  • Simple 3 voice audio synth


  • TinyFPGA-BX
  • LCD screen
  • Gameboy/NES/SNES 6 to 10 buttons D-Pad, A, B. Start. Select. X. Y
  • headphone amplifier
  • Battery
  • On/Off switch

Pretty much like the 1bitsy 1UP of @esden -> https://hackaday.io/project/25632-1bitsy-1up


gulp :).

I think for me, personally, a goal of this would be to have a programmable computer where a mental model of “the whole thing” can fit in your head… like what’s been done with pico8 fantasy console, and similar to the early computer days.

One of the things that I’ve been lamenting lately is that perhaps my generation were the last generation to grow up with computers that were well enough documented, and simple enough to actually understand at quite a deep level. I feel like I benefited hugely from that. I know that the Raspberry Pi team have tried to make cheap programmable computers accessible to the masses, but things like the Pi are still largely black boxes. Simple FPGA’s like the BX seem to offer an opportunity to provide really valuable and inspiring learning tools and give people an opportunity to dig a little deeper :slight_smile:

So, I suppose I was thinking about something without too many bells and whistles, and maybe non-portable, but perhaps doing something more portable is actually a better, more accessible approach.

I’ve got an ILI9341 display laying around here somewhere - I think that’s the same as what the Fabien linked to above. It’s even got an SD card slot on-board. The nice thing about these is that they have display memory built in, have lots of colours, and even offer simple “GPU” type functions. The trouble is they’re nowhere near as straightforward to drive, or understand, as a simple pixel buffer or tile engine through a VGA interface. Maybe that’s an acceptable tradeoff though.

I think things like mic/bluetooth/wifi etc could probably be handled through PMODS, but trying to fit all of that in will see us running out of pins fairly quickly :frowning: and will also seriously increase the complexity and “fit it in your head” budget. Personally I think if we start heading down that path it would be easier to have an ESP32 (or similar) doing the bulk of the work, and maybe use an FPGA for some of the peripherals. But then we’re essentially building a gameduino.


On the FPGA:

CPU: PicoRV32
GPU: Sprite and Tile, vectors, graph7
Simple 3 voice audio synth


LCD screen
Gameboy/NES/SNES 6 to 10 buttons D-Pad, A, B. Start. Select. X. Y
headphone amplifier
On/Off switch

Yes, that sounds great! I’d love to help if I can!



I’m very impressed by your mode7 examples! I will try to have them run on my LCD screen.


If we are going to collaborate on this, if would be good to decide on a specific ILI9341 display. I had a lot of problems with one of the cheap Chinese ones I got from ebay. The link you supplied did not specify a particular model, interface, options etc. Also, it is not easy for me to buy that from the UK, nor probably @gundy from Australia. As you do not want to use a touch screen, presumably you got one without that option. Presumably it is the 3 or 4 pin SPI pin header version that we want?


Did you have a view on how to do the SoC? Were you thinking of starting with PicoSoc or building a SoC generator like icoSoC?

The simplest version of this project would just need GPIO, SPI Master and PWM DAC support.

Rotozoomer effect for TinyFPGA BX

I’ve started putting together a simple repo based on PicoSoC - here: https://github.com/gundy/tinyfpga-bx-game-soc

It’s a shell of a project at the moment, that hopefully can be filled in over the next few days… I just wanted to get an idea of roughly how many gates we might have to work with :slight_smile:

Another thing I decided I should probably add to the list above is a timer/counter connected to an IRQ input, to enable things like time-based logic. I’ve got a placeholder in the code for that too.

Agree re: the ILI9341s - there are lots of options there. The one I have has a resistive touch-screen, so I probably won’t be using that for input…


The simplest version of this project would just need GPIO, SPI Master and PWM DAC support.

That’s a good point actually - in theory most of the video stuff could be done in the CPU by just communicating with an ILI9341 over SPI. If we did that we could just map a bunch more BRAMs into the memory space for the CPU to use them as tile/video buffers/whatever.

The alternative is to make something a bit more off-board where we get the FPGA to handle rastering the data out from tile/texture memory. If we do that, we can achieve some things that would be a bit more CPU intensive (eg. zooming/rotating/scrolling the framebuffer on the fly).

Decisions, decisions :slight_smile:


How were you planning to do the buttons and Dpad with that structure. Would the buttons be external IRQs?


I hadn’t thought that far ahead, and I guess it depends on what we use there - if we go for simple IO’s for each button then maybe a change detect on all of the inputs and feed that into an IRQ line; if we go for nunchuck style i2c controls then something more along the lines of the UART would probably be called for.


I’m using this one from buydisplay.com: https://www.buydisplay.com/default/2-8-inch-tft-touch-shield-for-arduino-w-capacitive-touch-screen-module

with the following options:

  • Pin header parallel 8080 8bit
  • 3v3 power supply
  • No touch screen (I really don’t think we need a touch screen here)
  • No font chip

I have a draft driver for it, I can add it to the repo.


I would have thought that the SPI version would be simpler. I have various SPI Oled displays working with the icoSoc variant of PicoSoC.


In case we want to go for the Nunchuk idea, I have added support for it in BlackSoc and am working on a TinyFPGA demo and PicoSoc support.

A Nunchuk gives two buttons, a 3-axis acceleration sensor and a joystick. We could use two of them. But it would not be the compact Gameboy style device that @Fabien wants.