HexPlay

Created by [hephaestushex] • Started on June 24, 2024

A handheld gaming console powered by the pi 4

Total Time Spent: 16 Hours

June 24th: Initial Planning

I initially wanted to make a retro gaming handheld with the pi zero 2w. I didn't like the idea of only being able to play retro games, so I decided to modify it to play any game. Since the pi zero 2w is underpowered, it would have to be replaced with a more powerful sbc. A pi 5 would be ideal, but since it would eat at my budget, I'm going to use a pi 4 4gb that I already own. This console should be able to play retro games, plus a few more, like minecraft. In this case, it is essential that the pi 4 is overclocked, but in order to not damage the pi, it would have to be cooled. Additionally, it would make sense for the display to be touchscreen, as a gaming controller wouldn't be an effective method of navigation.

With that initial brainstorm, a list of capabilities and things to do can be made.

Capabilities

  • Play retro games
  • Play modern games
  • Touchscreen
  • Easy to use controls
  • Effective cooling

From there it would make sense to research components to use.

I liked this display used in a console designed by Leandro Linares over here.

This display is only $38 USD, plus it handles audio/video plus touchscreen in one package.

As for controls, I want this to have a DPAD, A/B/X/Y buttons, L1/L2/R1/R2 Shoulder Buttons, 2x Analog Joysticks, start/select, and a hotkey button. More buttons may be added, but these were my bare minimums. Since the Pi does not have an ADC, I would need to use an external chip. In my use case, an external chip would be better.

For power management, I would like to have used the pisugar. Unfortunately, this would be too expensive, so I would have to use a lipo with a charging board.

I then took some time to create a few sketches to see what it would look like.

sketch

sketch_0001

With this out of the way, it was time to check out cooling. From my search, it seems like over clocking then cooling the pi is simply not worth it, so certain games will not be able to run, which is given, since this is a pi 4. I will simply stick to the heatsinks that came with my Pi.

Thats all the planning I did today

Total time spent: 30mins

July 4th: tentative planning

11:23

I noticed that the repo didn't have hexplay on it, so I renamed it.

I don't think there is much to do, so I just decided to jump in by creating a schematic.

But firstly, I wanted to create a list of all the electronic components, grouped by function

Electronic Components:

Computer

  • Raspberry Pi 4B x1

Display

  • ELECROW 5" Mini Touchscreen Display x1

Controls

  • 12mm Tactile Switch Buttons x11
  • 12mm Tactile Switch Buttons Right Angle x4
  • Analog Joystick x2
  • MCP3008 - 8-Channel 10-Bit ADC With SPI Interface x1

Audio

  • Stereo 3.7W Class D Audio Amplifier MAX98306 x1
  • Mono Enclosed Speaker with Plain Wires - 3W 4 Ohm x2

Battery/Charging

  • 18650 Li-ion Batteries x2
  • Adafruit Powerboost 1000 Charger

Total time spent: 1.5 hours

July 29th: Start actual design

I procrastinated alot, so I actually started today after a while. I didn't actually like the setup above, so I want to change it a little. After a good 1 and a half hours to talking to ChatGPT and some research on GP2040-CE, here's my setup. What influenced this is the fact that Jumpstart exists, and building a similar level of emulation is pointless. I want this to be better. Here's the final setup, all using HDMI cables and USB Cables. Also, this setup will be able to switch computers easily, as in, I'll use my pi 4 to run it, and after getting a pi 5, use that instead. The setup will also be powered by a powerbank, as the 18650 cells I have do not deliver enough power 5V/5A - 25W. My two batteries combined have 14.8 Wh. That's even less than one hour runtime on the Pi 4 (15W). I could get a lipo, but that still causes the issue of charging and discharging. Most of the solutions nowadays aren't great. So, heres the final setup.

Display and Audio

I upgraded to the 7 inch version of the display for two reasons. A: the display is bigger, making 3d games a lot more playable B: Built in speakers make this project a whole lot more simpler.

link to display

After looking around, this display seems pretty good.

Computer

I plan on using my pi 4, and upgrading to the pi 5 which I plan to get from Summer of Making. As for cooling, the active cooler is pretty cheap at $7 CAD, which I can pay out of pocket later.

Controls

As for the controls, the seeed xiao rp2040 has 4 analog pins. I can put the buttons in a matrix for the other buttons.

The xiao has 11 usable GPIOs, with 4 being taken for analog input. That leaves us with a 7 remaining pins. that leaves us with 12 buttons. I need 17.

That won't work. I have an adc, plus a orpheus pico. I could connect the adc for analog input use the other pins for switches. Phew. that will work.

As for the joysticks, I'll buy some joysticks you'd find in an arduino kit.

Power

This is simple. Buy a power bank and use that to power the pi.

Case

This will be 3d printed

Mounting

As I'm very close to the deadline, a pcb is unfeasible. This is ok anyway, as a PCB is hard, since that would constrain elements to a set height, plus the joysticks that are the most simple wouldn't mount to a pcb anyway.

What i'll most likely do is design holes on the case for some simply tactile pushbuttons to mount to, and I'll hot glue in the buttons, and solder wires from the legs to the pico. This setup is simple, and is way cheaper than making a pcb.

That's all i did today.

Total time spent: 3h

July 30th: Schematic Speedrun

Time for a speedrun!

With the specs set above, this is what I got in terms of controls

image

Looks like after looking at what Highway wants, i need to create a diagram for all the wiring. After messing around in other editors, I just created some custom symbols in KiCAD and ended up with this as my image.

image

After this, its just CAD and some code for the pi.

It's pretty late for me so thats it for today

Total time spent: 1h

July 31st: Everything Speedrun

After procrastinating some more, I started filling out the BOM.

image

All was fine until the powerbank. I spent so long on this for two simple reasons. The Pi 5 needs 5V/5A to run accessories. most powerbanks only have 5v/3a. I spent so long looking for a solution, with lipos, liions, tp4056 modules, buck/boost converters. In the end i found a power bank that offered 5V/3A over two ports to power the display if needed. A bonus of this powerbank is that it already has a usb-c cable built in, making the amount of cables one less.

Also while doing this, I realized that the ADC I have has pins soldered to it, plus I wanted to find a jank free setup. The Waveshare RP2040 zero solves this, but the only problem is that I would have to order this off of ali, which might delay the build process. As of writing this, I realized I can remove the headers. But, the adc is 8 bit (0-255) compared to the pico's 12 bit (1-4095). Anyway, I'll buy three things off of ali, the rp2040 zero, the joysticks, and some squishy buttons. The only issue with using the rp4040 zero is that I have to connect one button to a pad on the back, but thats better than using another chip with less accuracy. From here, I just have to make a table version of the bom, and cad up a design. In the last entry i mentioned making a custom firmware, but I found out about gp2040-ce, which makes controller firmware not only easy, but buttery smooth with a less than 1 ms latency.

With all that done, i hopped on fusion to design a case.

First step was to get the dimensions and get modelling. One interesting thing I did was use snipping tool to take a picture of the display to find the dimensions of the display, based off of a hdmi connector. As for mounting the display and joystick, i just inseted four corners and made a hole. After all of that, this is what I got

image

its 5 mins to the deadline, so let me submit.

ok so after submitting i polished up the design, added a hole for the pi's power and audio, and a holder for the power bank

image

image

image

I also designed a button to put on top of the squishy buttons. So I think thats it, lemme look at the requirements.

From there I just finished the few things I didnt have and filled out the re-review form

Total time spent: 10h

August 5th: Case Polishing

Here is the initial case I submitted:

Screenshot 2025-08-01 001706

I felt like this wouldn't meet the level of polishing wanted by the reviewers, so I hopped on fusion and started designing.

The first thing I made is this DPAD

image

image

Here I developed a method for all my buttons. I made the outline of the button, aligned to the tactile button cutouts. Then, I used the offset tool to make 2 offset perimeters. One, 0.2mm away from the original button, for tolerances, and another 1 mm away from the second offset, for the button housing. With this method I was able to create the other buttons,

Home Button

image

image

Start and Select

image

image

For this button, I did something similar to the d pad and made a large button, able to move up and down and two spots.

Face Buttons

image

I embossed the letters on the face. I chose nintendo style layout, since I plan on playing nintendo games.

Here I merged the walls, so it would fit.

Shoulder Buttons

image

I expanded the button length for easier pressing, and curved the edge to fit with the design.

Joystick

image

Previously I just stuck it to the top of the case and called it, but that didnt feel right. I did a previous project a few years ago with the same joystick, so I took the dimensions used and made better joystick. On the previous project, the dimension of the top plate was 3mm thick, but this case plate is 5mm thick. To fix that, I just filleted the edges.

Finally, I added some material to make the port sides look cleaner.

image

Total time spent: 3h