User avatar
bomblord
Posts: 287
Joined: Sun Jul 14, 2019 2:54 am

Building and running dolphin (GC/Wii emulator) on the 64bit Raspberry Pi OS

Sat Jun 06, 2020 5:41 pm

Hello all I finally managed to install Dolphin the GC/Wii emulator on the latest 64 bit Pi OS. After having so so so many issues getting it setup I wanted to document exactly what I did (partially for my sake). Here's a step by step guide of what I did to get it installed and working.

First of all DO NOT SUDO APT INSTALL dolphin-emu it is multiple years and multiple thousands of commits behind.

Alright now that that is out of the way we're going to want to build from source. Don't worry this is not nearly as difficult as it sounds.

1. Dependencies: There are a lot of dependencies however I've listed all the ones that in the end had to be installed to get it to build successfully. Run these before building! Open Terminal and run the following (first update then install upgrades then install dependencies)

Code: Select all

sudo apt update

sudo apt upgrade

sudo apt install git cmake pkg-config gcc libwxbase3.0-dev libwxgtk3.0-dev libgtk2.0-dev libxext-dev libreadline-dev libgl1-mesa-dev libevdev-dev libudev-dev libasound-dev libpulse-dev libao-dev libopenal-dev libavcodec-dev libavformat-dev libswscale-dev libenet-dev liblzo2-dev libminiupnpc-dev libpolarssl-dev libsoil-dev libsoundtouch-dev libsfml-dev libusb-1.0-0-dev libbluetooth-dev libxrandr-dev qtbase5-private-dev
2. Building: Once again just run these in order the make process should take around an hour on a non-overclocked pi. Open a new terminal session so you know for sure you'll be in the default directory.

Code: Select all

git clone https://github.com/dolphin-emu/dolphin.git dolphin-emu 

cd dolphin-emu

(if it's been a while run git pull origin in this directory to get the latest files)

mkdir build && cd build

sudo cmake ..

sudo make

sudo make install

sudo reboot
3. Configure Dolphin: Now we want to configure dolphin if you attempt to run it now you'll get OpenGL errors.

First you'll want to open dolphin once and click "Graphics" and set it to open GL you can do this either by typing dolphin-emu in terminal or open it from the "games" tab. After this close dolphin. This creates and populates the gfx.ini that we are going to be editing (it's a 1 line edit). After this open terminal again

DO NOT RUN THIS AS SUDO

Code: Select all

nano ~./config/dolphin-emu/GFX.ini 

Find this -> [Settings]

Under it type this
PreferGLES = True

hit CTRL + X
hit Enter
You have to put this under [Settings] (it will only work under that). You don't actually need to type settings I just put it there for reference.

The purpose of this is to tell Dolphin to fall back to OpenGLES which pi has a supported version of instead of OpenGL which is not up to date enough to run Dolphin.

Additionally if you know the game in question wasn't stressing original hardware you can go to the advanced settings and underclock the virtual CPU. I don't recommend this for many games though.

4. Overclock your Pi: This is optional technically but not really if you want a chance of even running light games at full speed

Code: Select all

sudo nano /boot/config.txt

at the very bottom put

over_voltage = 5
arm_freq = 2000
gpu_freq = 600

Ctrl+X
Enter

sudo reboot
Both the CPU/GPU can go higher however I consider these clocks stable for the majority (read every pi I've tested).

And that's it you're now running Dolphin. Here's a pic of Harvest Moon AWL running.
Image

Note: There are other topics on this subject but nothing specifically on the new Pi OS.

fonzy44
Posts: 1
Joined: Mon Jun 29, 2020 12:44 pm

Re: Building and running dolphin (GC/Wii emulator) on the 64bit Raspberry Pi OS

Mon Jun 29, 2020 12:50 pm

Hi Bomblord,

Very nice but which Raspberry pi do you use ? Pi 4 or Pi 3b+ ?

Thank you for your answer.
Fonzy44 (Alias SteF)

RazNoobian
Posts: 1
Joined: Tue Jul 28, 2020 11:56 am

Re: Building and running dolphin (GC/Wii emulator) on the 64bit Raspberry Pi OS

Tue Jul 28, 2020 12:27 pm

Bomblord,

I followed your post and got all the way to the part of opening dolphin - it wasn't listed in my games section. I have raspi 8gb with 64 bit OS but just couldn't open dolphin. Any pointers?

Thanks,

RazNoobian

bfuntastic
Posts: 1
Joined: Thu Aug 06, 2020 11:20 am

Re: Building and running dolphin (GC/Wii emulator) on the 64bit Raspberry Pi OS

Thu Aug 06, 2020 11:26 am

Hi, when I write "make" in terminal I get this:

Code: Select all

[ 30%] Built target cpp-optparse
[ 30%] Built target glslang
[ 30%] Built target imgui
[ 30%] Built target pugixml
[ 30%] Built target enet
[ 30%] Built target xxhash
[ 30%] Built target bzip2
[ 30%] Built target lzma
[ 30%] Built target zstd
[ 30%] Built target minizip
[ 30%] Built target FreeSurround
[ 30%] Built target SoundTouch
[ 30%] Built target discord-rpc
[ 30%] Built target speex
[ 30%] Built target cubeb
[ 30%] Built target audiocommon
[ 30%] Built target mbedcrypto
[ 30%] Built target mbedx509
[ 30%] Built target mbedtls
[ 30%] Built target fmt
[ 30%] Building CXX object Source/Core/Common/CMakeFiles/common.dir/Arm64Emitter.cpp.o
/tmp/cc8vSXKb.s: Assembler messages:
/tmp/cc8vSXKb.s:958: Error: selected processor does not support requested special purpose register -- `mrs r0,ctr_el0'
/tmp/cc8vSXKb.s:1028: Error: bad instruction `dc civac,r0'
/tmp/cc8vSXKb.s:1077: Error: bad instruction `ic ivau,r0'
make[2]: *** [Source/Core/Common/CMakeFiles/common.dir/build.make:713: Source/Core/Common/CMakeFiles/common.dir/Arm64Emitter.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1437: Source/Core/Common/CMakeFiles/common.dir/all] Error 2
make: *** [Makefile:152: all] Error 2
And I don't know how to fix it.
Thanks

clayronsulby
Posts: 3
Joined: Mon Oct 26, 2020 3:54 am

Re: Building and running dolphin (GC/Wii emulator) on the 64bit Raspberry Pi OS

Sun Jan 10, 2021 2:34 am

I've had to make a few adjustments to the initial dependency install on ubuntu 20.x but I was easily able to make and install. I'm having some issues getting GLES to work. I know for certain I have OpenGL 2.1 Mesa 20.2.6 and GLES 3.1 Mesa 20.2.6, and I have followed the GLX.ini instructions. I still am getting an error about OpenGL 3.0 support.

Kajko07
Posts: 1
Joined: Tue Mar 09, 2021 1:56 am

Re: Building and running dolphin (GC/Wii emulator) on the 64bit Raspberry Pi OS

Tue Mar 09, 2021 2:00 am

Hi,
Can anyone confirm that this method works for Raspberry pi 4?

PhrawzT
Posts: 1
Joined: Wed Mar 17, 2021 3:12 pm

Re: Building and running dolphin (GC/Wii emulator) on the 64bit Raspberry Pi OS

Wed Mar 17, 2021 3:21 pm

I keep getting an error when I get to sudo cmake ..
CMake Error: The source directory "/home/pi" does not appear to contain CMakeLists.txt.

I have tried moving the CMakeLists.txt to that folder and also trying sudo cmake . and both those options give me different errors.

Can anyone help? I am still relatively new to the Raspberry Pi.

omission229
Posts: 11
Joined: Fri Mar 19, 2021 2:19 pm

Re: Building and running dolphin (GC/Wii emulator) on the 64bit Raspberry Pi OS

Fri Mar 19, 2021 2:46 pm

Hi, are you sure this works? Also, how is performance on the pi 4?

jdonald
Posts: 449
Joined: Fri Nov 03, 2017 4:36 pm

Re: Building and running dolphin (GC/Wii emulator) on the 64bit Raspberry Pi OS

Fri Mar 19, 2021 3:13 pm

Kajko07 wrote:
Tue Mar 09, 2021 2:00 am
Can anyone confirm that this method works for Raspberry pi 4?
This requires a Pi 4 or newer, as VideoCore4 on the Pi 3B+ and earlier does not support OpenGL ES 3.x.
RazNoobian wrote:
Tue Jul 28, 2020 12:27 pm
got all the way to the part of opening dolphin - it wasn't listed in my games section.
To open, run:

Code: Select all

  dolphin-emu
PhrawzT wrote:
Wed Mar 17, 2021 3:21 pm
I keep getting an error when I get to sudo cmake ..
CMake Error: The source directory "/home/pi" does not appear to contain CMakeLists.txt.
If you are in the wrong directory, it indicates you never did cd dolphin-emu or mkdir build && cd build
bfuntastic wrote:
Thu Aug 06, 2020 11:26 am

Code: Select all

[ 30%] Building CXX object Source/Core/Common/CMakeFiles/common.dir/Arm64Emitter.cpp.o
/tmp/cc8vSXKb.s: Assembler messages:
/tmp/cc8vSXKb.s:958: Error: selected processor does not support requested special purpose register -- `mrs r0,ctr_el0'
/tmp/cc8vSXKb.s:1028: Error: bad instruction `dc civac,r0'
/tmp/cc8vSXKb.s:1077: Error: bad instruction `ic ivau,r0'
This seems like an error you'd get with a 32-bit compiler. Are you sure you are attempting this on the Raspberry Pi 64-bit OS, not the classic Raspberry Pi OS?

jamesalbert
Posts: 1
Joined: Thu Mar 25, 2021 3:21 am

Re: Building and running dolphin (GC/Wii emulator) on the 64bit Raspberry Pi OS

Thu Mar 25, 2021 3:43 am

I got an error at "sudo cmake .."

Code: Select all

$ sudo cmake ..
-- The C compiler identification is GNU 8.3.0
-- The CXX compiler identification is GNU 8.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Git: /usr/bin/git (found version "2.20.1") 
-- Detected architecture: armv7l
CMake Error at CMakeLists.txt:215 (message):
  You're building on an unsupported platform: 'armv7l' with 4-byte pointers.
  Enable generic build if you really want a JIT-less binary.


-- Configuring incomplete, errors occurred!
See also "/home/pi/Development/dolphin-emu/build/CMakeFiles/CMakeOutput.log".
Same error when setting arm_64bit=1 in /boot/config.txt

Code: Select all

You're building on an unsupported platform: 'aarch64' with 4-byte pointers.
I ran with -DENABLE_GENERIC=true which worked for cmake, but failed in make

I'm on Raspberry Pi 400

update: Ah, I forgot to schroot. Building inside that shell worked.
Last edited by jamesalbert on Thu Mar 25, 2021 5:31 am, edited 2 times in total.

kagi
Posts: 1
Joined: Sun Mar 28, 2021 2:33 pm

Re: Building and running dolphin (GC/Wii emulator) on the 64bit Raspberry Pi OS

Sun Mar 28, 2021 2:40 pm

Hello! :)
Thanks for the help everything worked perfectly fine but i cant find the gfx.ini file with nano.
It says there is no such file. Help would be highly appreciated. (Dolphin starts and i can run games with vulkan but the Problem with GLES really botheres me im new to this stuff too)
Have a great day!

JamesPi123
Posts: 122
Joined: Fri Sep 23, 2016 10:02 pm
Location: Inside my Pi
Contact: Website

Re: Building and running dolphin (GC/Wii emulator) on the 64bit Raspberry Pi OS

Fri Apr 16, 2021 6:47 am

Sorry to necro, but libpolarssl-dev is now libmbedtls-dev

Hatsoff
Posts: 1
Joined: Fri Apr 16, 2021 5:20 pm

Re: Building and running dolphin (GC/Wii emulator) on the 64bit Raspberry Pi OS

Fri Apr 16, 2021 5:25 pm

When I do "sudo cmake .." I get this:
-- Could NOT find OpenSLES (missing: OPENSLES_LIBRARY OPENSLES_INCLUDE_DIR)
-- Could NOT find ALSA (missing: ALSA_LIBRARY ALSA_INCLUDE_DIR)
-- ALSA NOT found, disabling ALSA sound backend
-- PulseAudio NOT found, disabling PulseAudio sound backend
-- Could NOT find BlueZ (missing: BlueZ_LIBRARIES BlueZ_INCLUDE_DIR)
-- BlueZ NOT found, disabling bluetooth support
CMake Error at Source/Core/DolphinQt/CMakeLists.txt:9 (find_package):
By not providing "FindQt5.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Qt5", but
CMake did not find one.

Could not find a package configuration file provided by "Qt5" (requested
version 5.9) with any of the following names:

Qt5Config.cmake
qt5-config.cmake

Add the installation prefix of "Qt5" to CMAKE_PREFIX_PATH or set "Qt5_DIR"
to a directory containing one of the above files. If "Qt5" provides a
separate development package or SDK, be sure it has been installed.


-- Configuring incomplete, errors occurred!
See also "/home/pi/dolphin-emu/build/CMakeFiles/CMakeOutput.log".
See also "/home/pi/dolphin-emu/build/CMakeFiles/CMakeError.log".

I've already corrected "libpolarssl-dev" with "libmbedtls-dev" (pretty sure this has nothing to do with the error)

Not sure what to do after this :|

jdonald
Posts: 449
Joined: Fri Nov 03, 2017 4:36 pm

Re: Building and running dolphin (GC/Wii emulator) on the 64bit Raspberry Pi OS

Sun May 02, 2021 6:25 pm

I think you need to install qtbase5-dev and qtbase5-private-dev. Or at least I had that in the now rather-dated build instructions for vanilla Raspberry Pi OS. Not sure why it isn't included above in the 64-bit OS case.

If you run into other missing dependencies after that, apt-file is handy for locating missing package names.

subodhverma21
Posts: 6
Joined: Fri Jun 10, 2016 10:20 am

Re: Building and running dolphin (GC/Wii emulator) on the 64bit Raspberry Pi OS

Mon Jun 14, 2021 2:22 pm

I am Noob for Pi. What worked for me as of June,15th 2021, is as below .

Get 64 Bit OS before proceeding from below:
https://downloads.raspberrypi.org/raspios_arm64/images/

Everything in OP worked except following:

1. Unable to locate package

Code: Select all

libpolarssl-dev
but it didn't stop the emulator to run.

2. Make sure you run the command

Code: Select all

sudo cmake ..
in the directory i.e /dolphin-emu/build/

3. The code line has error of "."

Code: Select all

nano ~./config/dolphin-emu/GFX.ini
use instead

Code: Select all

nano ~/.config/dolphin-emu/GFX.ini
Yes it is working. Dolphin version 5.014431.
Thanks to bomblord.

Return to “Gaming”