I actually own one: an ATARI LYNX (first version). Bought it at the time from my first wage when I started my first real job after school. Always loved it, but when I pick it it up every once in while I'm always a very disappointed with the screen. A color screen was a marvel at the time (1998) but it does not hold up to modern screens.
So let's try to build a modern version. With a better screen, built-in library with all games and a better battery life.
Unfortunately I could not get the ESP32 with RetroGo to work with a display of the right size. It just has to be a 3.5 inch display, or my Lynx won't look real. So I return to the Raspberry Pi 3A+ like in my previous project, and a MPI3508 3.5" HDMI Display. And yes, this just works. Insert the RetroPie SD card, apply power, and it starts. Not as fast as I would like it, but maybe I can shave off a few seconds later if I just focus on only Lynx Emulation.
The Pi + screen combination also makes for a compact building block that will be easy to mount in the housing.
This also means I can just wire it exactly the same as I did for the RetroPie Handheld. Making this project slightly less fun, but way easier to finish.
The retro-go project does not have specific instructions on how to wire things for each 'target'. As I have chosen the ESP32S3-DEVKIT-C, the 'config.h' contains all necessary details.
That's simple. Yet it does not work. When booting up, the screen flickers and stays white. Checked the wiring several times, until I suddenly noticed the bag in which the display came. It says 'ILI9488 Driver'. And the code refers to the 'ILI9341', which was also mentioned on the AliExpress page where I ordered the display. So that page is incorrect, and this display is actually based on the ILI9488. And yes, that requires a different setup, not least because it is 320x480 pixels instead of the 240x320 of the ILI9341.
There is an AdaFruit example library for both displays, so I copied the setup code from the IL9488 to the config.h file. Not knowing what any of these codes do, making it a long shot. And so that did not seem to work, as expected. But, just as I thought I should give up, I switched power off and on to the board, and then suddenly an image appeared on the screen. It is black and white, and the orientation and aspect is wrong, but it shows that the connections are OK, and the setup is at least partially right.
So now the question arises: will I try and fix the driver code to make it work with this specific display? It will require a deep dive into the details on memory, registers and pixel colors. Not sure If I really want to spend that much time on it.
As mentioned, I chose the ESP32-S3-DevKitC-1. Programming requires the ESP-IDF, for which the installation instructions can be found here.
Of course I rushed it, without reading the whole page and so I missed the note that it is best to install it from the VS Code extension. And when you installed it using the 'Windows Installer', adding it to VSCode simply fails. So I had to uninstall it, and then follow the VSCode way.
If all goes well ( and why shouldn't it..) you end up with the start screen for ESP-IDF:
Right. But what next ? First I tried some things like 'import project', or 'new project', but that does not get you anywhere.
First, make sure your 'retro-go' folder is somewhere in a 'root' folder, like C:\ESP32\retro-go. Then open the folder in VSCode. This will that ask if you want to open a workspace. Answer yes.
Next, open the ESP-IDF Terminal. Here we can now enter the commands as described in the 'BUILDING.md' file.
I used this command:
During the first build I ran into a few issues in the code, but these were easy to fix:
Issues:
In 'rg-storage.c' : rom/miniz.h not found. Right, because that is in a different folder:
#ifdef ESP_PLATFORM#include <libs/miniz/miniz.h>
in 'memmap.c' : incorrect modifier in print statement. Argument 5 is a long int. So you should change the '%dkB' to '%ldkB'
But that was all. And after a long compilation/ build, it finally started the upload to the connected board.
And it looks like the program is running, since the 'Tx' LED on the board is now blinking at a regular pace. To see what is going on, start the monitor:
After the startup messages of the ESP32 (which will show some errors, since I have not connected anything yet) it will start to print [DEBUG] messages. So it looks like it is working.
Since I already built a handheld in the past (https://hackaday.io/project/176661-retropie-handheld) that did Atari Lynx emulation, the Raspberry Pi is a logical choice. A drawback of using the Pi though is that it takes quite some time to boot into the emulator, which does not make you feel yo are using a 'real' Lynx. But while designing the housing it struck me that it might be a great fit for the 'CYD' or 'Cheap Yellow Display'. Unfortunately when placing this unit in the design it is obviously a little too small. Which is correct: this is a 2.8" screen, and the Atari has a 3.5 ". Using an ESP32 based solution would however ( probably) solve the boot problem, and most likely use less power.
There is an ESP32 based emulator: https://github.com/ducalex/retro-go. It seems that it is only readily available for the Odroid-Go and MRGC-G32, but it should be possible to run it on other devices as well. It supports screens that have a ILI9341 driver, which are available in different sizes at AliExpress. I ordered the 3.5"TFT version, which seems like a nice size for the Lynx.
And this ESP32-S3 board seems powerful enough to run this application:
It can be found in the Retro-Go Github as 'ESP32-S3-DevKitC', so there is some support available. Lets try to get it running...
There are a few 3D models of the LYNX available, but I decided to model it myself in DesignSpark Mechanical.
It's not a perfect 1:1 copy of the original, but it is close enough. I'll publish the design files later, since there will definitely be changes when I start to insert the electronics.
Nice project, and I don't want to detract from the DIY approach! But if you want a nicer screen for your original Lynx there are modern backlit replacements available, e.g https://dragonbox.de/en/upgrade-kits-do-it-yourself/lynx-i-lcd-mod-mcwill-rev-3
Nope. This is going to be a reproduction. The interior will probably be a RaspberryPi or ESP32 module. Haven't decided yet. I'm definitely not going to take apart my original...
Nice project, and I don't want to detract from the DIY approach! But if you want a nicer screen for your original Lynx there are modern backlit replacements available, e.g https://dragonbox.de/en/upgrade-kits-do-it-yourself/lynx-i-lcd-mod-mcwill-rev-3