Worklog Retro Lite CM4 - A StonedEdge and Dmcke5 collaboration

Dmcke5

.
Joined
Feb 16, 2020
Messages
169
Likes
726
Location
Queensland, Australia
Portables
2
Just started looking into pi portables myself and definitely will be watching this thread. I too am interested in your controller code and how you implement the controller altogether! I was just going to experiment using a GC+ with a gc to usb adapter for a pc and hope that works with the pi... Looking forward to seeing more!
The GC+ is a great bit of hardware, but using it through an adapter is definitely a bit of a backwards way to do it for something like this. I'm happy to share my code, you don't even need a custom PCB as you can buy an arduino board off the shelf that will do exactly what you need. Here's the board I recommend: https://store.arduino.cc/usa/arduino-micro
There are other cheaper options too, there seems to be plenty of "Pro micro" clones around for just a few dollars. The only downside to those is they have a few less pins, so you can't quite do a full controller with dual analog sticks, dpad and 8 buttons. If you are happy with that as a limitation you can go that way too.

If you decide to go down this path, let me know. I'll draw up a little diagram to show you where and how to connect your buttons to the board and I'll send over a copy of my code.
 

A_s6

.
Joined
Apr 15, 2020
Messages
114
Likes
90
Location
jack frost sanctuary
Portables
i don’t give a hee ho
The only downside to those is they have a few less pins, so you can't quite do a full controller with dual analog sticks, dpad and 8 buttons.
at that point you could use the pi’s gpio for buttons. it’s a bit crude but it should work
 

StonedEdge

Moderator
Staff member
.
.
.
Joined
Nov 16, 2018
Messages
212
Likes
894
Location
Japan, Tokyo
Portables
2
I've been working on the mainboard in the mean time whilst Dmcke5 finishes up the CAD model. The mainboard contains a lot of stuff, including:

- HDMI-DVI encoder
- USB-C, HDMI and SD ports, plus headphone jack port
- Two FFC connectors for connecting the left and right controller PCBs to the arduino
- LM49450, generating both BCLK and LRCLK as i2s master from MLCK (12.288mHz external oscillator) (CM4 configured as i2s slave)
- BQ24292i battery management for switch lite charger compatibility (15V/3A)
- 5v buck-boost regulator for powering the CM4 module and backlight boost converter, 3v3 buck regulator for driving DVI and panel logic
- Probably more stuff I forgot

Custom drivers will most likely be needed for the LM49450 to run properly. I am a little bit uncertain if we can get this working but hopeful to at least. Plan is to use a generic device tree overlay then setting ALSA to resample to the frequency to match the LM49450 clocks (96kHz 24-bit). RetroPie audio will have to resampled by ALSA to ensure garble free audio output. To be honest, I'm leaning towards using a different DAC as there is no linux driver for it available, and the lm49453 (which might not even work with the lm49450 codec) doesn't contain any devicetree bindings either to use. The next best thing is to use the generic spdif-transmitter codec with resampling unfortunately without writing a custom driver, which is something I am not really comfortable with for a beginner project and introduction to the Pi. I sort of wanted to play around with Python a little bit and learn something, rather than just executing a script in command line and just "have it work" like a lot of the Pi handhelds out there. Anyway, it is what it is lol

I will update back later as things progress with the main PCB. Main things undecided are as I mentioned, the audio DAC (LM49450 is nice for Wii but honestly not that great for Pi probably, too much of hassle given all the clock frequencies of the Pi) as well as a suitable boost converter and also USB hub for extra ports out of USB-C data lines. If anyone has any suggestions, feel free to post them!

1609867897647.png

1609868124939.png
 

Dmcke5

.
Joined
Feb 16, 2020
Messages
169
Likes
726
Location
Queensland, Australia
Portables
2
Made some progress on getting an OSD up and running last night. There's quite a few osd's out there already but I was having a huge amount of trouble getting most of them to work. All of the ones I really want to use rely on a free icon pack provided by Google, but they recently changed the structure of their GIT repository which seems to have broken the links in most of the OSD's. I managed to manually extract some icons and change the file references to get it working. Maybe I should fork the git and fix the links? Never used git before so it might be a bit of a learning experience haha.

Also did a couple of renders while I was sitting in front of the computer.
e1e6508d-93dd-450f-a69d-87a0005b5068.PNG

5in_Pi4_Handheld_Assy_16-01-21_2021-Jan-16_01-17-02PM-000_CustomizedView23720961451.png


Design is almost complete now. Just need to get the PCB finalised so I can work out how/where to mount the fan and heatsink and then we'll be go for producing a full prototype!
 

MRKane

.
Joined
Nov 5, 2017
Messages
322
Likes
305
You realise we're going to throw money at you until you start selling them to us right?
 
Top