OK, so I finally got Smash Melee to launch on my Pi4 (32-bit). It currently runs beyond horribly (1 fps) using the following command in in the shell (I have not tried to launch it from within Emulationstation yet):
sudo xinit dolphin-emu-nogui -e /home/pi/RetroPie/roms/gc/Super\ Smash\ Bros\ Melee.isoIf this is the best performance I can get then this whole endeavour was probably a waste of time, but I want to believe that the 15fps numbers I hear from people playing Dolphin on the Pi4 are attainable and I really believe that this would be a playable experience for some games (e.g. turn-based rpgs). I am definitely going to play around more and see if I can boost performance. I honestly don't know much about this stuff and it was a major undertaking for me just to get this 32 bit build to work at all.
OK, here is what I did to install dolphin 32-bit on my Pi 4 with the official RetroPie build:
git clone https://github.com/dolphin-emu/dolphin.git dolphin-emu cd ./dolphin-emu git submodule update --init --recursive git checkout tags/4.0.2First you download the repository. This last line configures CMake to build Dolphin 4.0.2, which was released in 2014 and was the very final release of Dolphin that supported 32-bit.
The next step is to run CMake but you will get a "No suitable display platform found" and "Requires wayland or x11 to run" error that is a pain to get around. I believe that there are two possible solutions: you can either install an old version of CMake (<3.2) or it sounds like you can also just add a line to the CMakeLlist.txt before compiling.
Use CMake 3.1
sudo apt-get install software-properties-common sudo add-apt-repository ppa:george-edison55/cmake-3.1 sudo apt-get updateAdd between lines 419 and 420 of CMakeList.txt: include(FindX11):
include(FindX11) if(USE_X11 AND X11_FOUND)I personally went with option 1 and didn't bother with the second. That said, in the thread I linked to below by boomonster it sounds like the second approach should accomplish the same thing and is probably simpler, so maybe you should try that first.
There are some other changes that you will need to make to the CMakeLists.txt file (most of them are covered in boomonster's thread). Note that I decided to build the no-gui version of dolphin by enabling the "DISABLE_WX" option as I have shown below. The gui uses WXWidgets which requires that I install libgtk2.0-dev which caused a lot of problems for my Retropie installation. gtk2.0 broke Redream as well as Moonlight-qt (that I use for streaming) along with significantly hurting performance in some of my emulators (lr-yabause). I made the decision early on not to go anywhere near the GUI build of dolphin for this reason. I also needed to disable the UPnP port mapping option because it resulted in compiling errors that I couldn't get around any other way (I won't be using netplay so it doesn't bother me much).
CMakeLists.txt General Setup Section:
option(ANDROID "Enables a build for Android" OFF) option(USE_EGL "Enables EGL OpenGL Interface" OFF) option(USE_X11 "Enables X11 Support" ON) option(USE_WAYLAND "Enables Wayland Support" OFF) option(USE_GLES "Enables GLES2 And EGL, disables OGL" OFF) option(USE_GLES3 "Enables GLES3 and EGL" OFF) option(USE_UPNP "Enables UPnP port mapping support" OFF) option(DISABLE_WX "Disable wxWidgets (use CLI interface)" ON) option(FASTLOG "Enable all logs" OFF) option(OPROFILING "Enable profiling" OFF) option(OPENMP "Enable OpenMP parallelization" ON) option(ENCODE_FRAMEDUMPS "Encode framedumps in AVI format" OFF)Note that I also had to force a number of packages to build external in CMakeLists.txt based on various errors that I encountered during compilation. Many packages installed on my system are more modern than what Dolphin 4.0.2 is expecting and things like number of function arguments, etc have changed causing compilation errors even though the packages are installed. It is fairly simple to force CMake to use its external libraries though and so I would just tweak the if-else conditions as needed on a trial-and-error basis in CMakeLists.txt when you are building.
OK, now we are ready to CMake. In my case, I did the following commands (having built CMake 3.1 on my system) starting back inside the dolphin-emu folder:
mkdir Build cd ./Build/ /home/pi/cmake3.1/cmake-3.1.0/bin/cmake .. -DCMAKE_C_COMPILER=gcc-8 -DCMAKE_CXX_COMPILER=g++-8 make -j1 sudo make installAgain, there was lots of trial and error in this step. If you need to repeat, I recommend deleting the Build directory completely, creating it again and running CMake from the beginning.
Finally, getting dolphin to run required that used the command at the top of the post (calling Xinit first). Launching dolphin directly resulted in a "No suitable display platform found" and "Dolphin emulator failed to initialize video backend" error. This caused me a lot of grief, and I almost gave up at this point, but calling Xinit mentioned in this thread was really helpful (https://retropie.org.uk/forum/topic/34627/raspberry-pi-5-official-announcement/182)
Anyways, I will update this thread if I can succeed in getting this 32-bit build to a playable state. It would be really nice if we could have a build available for 32-bit users on the Pi4 even if it only gets ~15 fps.
source links:
https://dolphin-emu.org/docs/guides/building-dolphin-linux/ (instructions to compile dolphin)
https://www.reddit.com/r/SSBPM/comments/33l4b9/building_dolphin_40648_on_arch_linux/ (troubleshooting tips for compiling)
https://askubuntu.com/questions/610291/how-to-install-cmake-3-2-on-ubuntu (instructions on how to make cmake - for version 3.1.0)