Dolphin emulator running on RP4B 64bit
-
GREETZ!
Good news!
I did some exercise on Raspberry Pi OS 64 and Dolphin emulator. The result was that I could get to run at decent level only some of the games with 30FPS limit hack (Gecko code). Most of the games are still lagging . The games that player at decent level are Mario Kart - Double Dash, and some of the mario party games.
I'll write a tutorial for all the people that want to tweak with Dolphin on RPi4.
- Get the image of Raspberry pi OS 64bit and burn it to your SD card.
- Open a terminal and update the OS to the latest version.
sudo apt update sudo apt full-upgrade
- Update Mesa drivers. Create a script updateMesa.sh and make it executable. And then just run it
nano updateMesa.sh
put this text in the file and save it (ctrl+x)
sudo rm -r /home/pi/mesa_vulkan echo 1/8 Update sudo apt update echo 2/8 Upgrade sudo apt full-upgrade -y echo 3/8 Install pre-requisites sudo apt install -y libxcb-randr0-dev libxrandr-dev \ libxcb-xinerama0-dev libxinerama-dev libxcursor-dev \ libxcb-cursor-dev libxkbcommon-dev xutils-dev \ xutils-dev libpthread-stubs0-dev libpciaccess-dev \ libffi-dev x11proto-xext-dev libxcb1-dev libxcb-*dev \ bison flex libssl-dev libgnutls28-dev x11proto-dri2-dev \ x11proto-dri3-dev libx11-dev libxcb-glx0-dev \ libx11-xcb-dev libxext-dev libxdamage-dev libxfixes-dev \ libva-dev x11proto-randr-dev x11proto-present-dev \ libclc-dev libelf-dev git build-essential mesa-utils \ libvulkan-dev ninja-build libvulkan1 python-mako \ libdrm-dev libxshmfence-dev libxxf86vm-dev libunwind-dev \ valgrind libzstd-dev vulkan-tools echo 4/8 Install meson sudo apt purge meson -y sudo pip3 install meson echo 5/8 Install mako sudo pip3 install mako echo 6/8 Get v3dv cd ~ git clone https://gitlab.freedesktop.org/mesa/mesa.git mesa_vulkan echo 7/8 Build v3dv cd mesa_vulkan CFLAGS="-mcpu=cortex-a72" CXXFLAGS="-mcpu=cortex-a72" meson --prefix /usr -Dplatforms=x11 -Dvulkan-drivers=broadcom -Ddri-drivers= -Dgallium-drivers=kmsro,v3d,vc4 -Dbuildtype=release build ninja -C build -j4 sudo ninja -C build install echo 8/8 Updated Mesa Driver glxinfo -B
run it:
chmod +x updateMesa.sh ./updateMesa.sh
You shoud she the result:
OpenGL ES profile version string: OpenGL ES 3.1 Mesa 21.2.0-devel (git-4791738d1d) OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10
- Install Dolphin emu
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 libmbedtls-dev libsoil-dev libsoundtouch-dev libsfml-dev libusb-1.0-0-dev libbluetooth-dev libxrandr-dev qtbase5-private-dev git clone https://github.com/dolphin-emu/dolphin.git dolphin-emu cd dolphin-emu mkdir build && cd build sudo cmake .. sudo make install
Open the emulator and go to graphic settings and then click close. Go back to terminal and edit the file
nano ~./config/dolphin-emu/GFX.ini #Find this -> [Settings] #Under it type this PreferGLES = True #hit CTRL + X #hit Enter
Now the MAIN tweak to run this games properly is to enable cheats and add Gecko codes for 30FPS in Dolphin emulator.
Here are some Gecko codes I could find. If any one got any more Gecko codes for running in 30FPS please share them! This is the only way to decently play some Dolphin games on RP4B (for now)
$30 FPS Gecko Code Mario Party 5 04288660 40000000 04288664 00000002 0403EB30 38600001 C2005A20 00000009 3C808000 6084D490 7C8903A6 4E800421 3C808000 60845BDC 7C8903A6 4E800421 38800000 908D8604 908D8608 38600001 3C808000 6084D490 7C8903A6 4E800421 60000000 00000000 C2043DF0 00000002 7C9F2378 7CA50E70 60000000 00000000 $30 FPS Gecko Code Mario Party 7 042F2CF8 40000000 042F2CFC 00000002 04045E20 38600001 C2005AB0 00000009 3C808000 6084E8F4 7C8903A6 4E800421 3C808000 60845D90 7C8903A6 4E800421 38800000 908D8AC0 908D8AC4 38600001 3C808000 6084E8F4 7C8903A6 4E800421 60000000 00000000 C204A98C 00000002 7C9F2378 7CA50E70 60000000 00000000 $30 FPS Gecko Code Mario Party 6 042C0038 40000000 042C003C 00000002 040440F0 38600001 C2005AB0 00000009 3C808000 6084E37C 7C8903A6 4E800421 3C808000 60845D90 7C8903A6 4E800421 38800000 908D8900 908D8904 38600001 3C808000 6084E37C 7C8903A6 4E800421 60000000 00000000 C2049194 00000002 7C9F2378 7CA50E70 60000000 00000000 $30 FPS Gecko Code Mario Party 4 041D3B00 40000000 041D3B04 00000002 04035480 38600001 C200592C 00000009 3C808000 6084D01C 7C8903A6 4E800421 3C808000 60845B4C 7C8903A6 4E800421 38800000 908D8688 908D868C 38600001 3C808000 6084D01C 7C8903A6 4E800421 60000000 00000000 $Always30fps NTSC-U Mario Kart Double Dash [ActionReplay_Enabled] $Force 30FPS [ActionReplay] $Force 30FPS 0448C388 00000002 Force 30 FPS Mario card WIIu NTSC-U 004250D4 00000002 0029FD69 00000002 PAL 00429454 00000002 002A40E9 00000002 NTSC-J 00428DD4 00000002 002A3A69 00000002 NTSC-K 00417474 00000002 002920E9 00000002
-
Set your resolution of your Raspberry Pi OS to 640 x 480.
-
RUN AND PLAY! :)
Now you got it all running. And my final advice is to overclock your RP4B. I am running mine on 2100 CPU and 800 GPU.
Some extreas:
EXTRA 1.0 :)
After that you could also try Ishiiruka version :) This one got me running (without a blurry blue image) in Mario Kart Double Dash.git clone https://github.com/Tinob/Ishiiruka.git ishiiruka cd ishiiruka #"modify cmake list and enable EGL" nano CMakeLists.txt #change the option (USE_EGL "Enables EGL OpenGL Interface" OFF) to (USE_EGL "Enables EGL OpenGL Interface" ON) mkdir build && cd build sudo cmake .. sudo make install
Then do the same as by dolphin emulator (GFX.ini stuff.....)
EXTRA 2.0 :)
For Mario Kart WII to run at 25 fps do next:- In dolphin set your driver to OpenGL
- Enable Ingore Format Changes, Defer EFB Copies to RAM, Disable Fog
- Add following Gecko codes
#30FPS 004250d4 00000002 0029fd69 00000002 #Invisible THP video 049bd044 00000000
- Play the game in solo time mode...
thanks to to the guy who made a video about WII Mario Kart on Raspberry Pi 4
A BIG THANK YOU
Thanks to all the people who provided me/us all the code, videos , topics or any other kind of information that made this guide possible.
-
Made a video....apologies...forgot to make it louder when I was recording :/
-
Thank you for all the hints. I will give it a try.
It would be great to see Wii and GC games in good performance on Pi4. -
Double Dash is working in Ishiiruka and the track is visible!
However, I see a lot of graphics errors, like Mario's and Luigi's face being distorted and graphic glitches on the track. Did you experience that, too?
(Note: I have rolled back to default Mesa 19.3 driver's from raspberry pi OS.)Best,
gandalth -
@gandalth23 I think the cause might be the Mesa drivers. I am running it on Mesa 21.2.0-dev version...
-
I recompiled mesa drivers and I am now also running on 21.2-dev.
Strange, but the graphics errors persist on my side. It looks as if the opacity of displayed areas is not correct and underlying items are shimmering through.Let's see what results others obtain. I alerted @George-Spiggott from another thread who was also interested in Double Dash.
I will experiment with Mario Kart Wii meanwhile.Best,
gandalth -
I stand corrected.
The graphics errors on 21.2-dev are present with OpenGL. But using Vulkan, the graphics in Double Dash are perfect.
On my system, the frame rate is between 26 fps and 31 fps in race mode.Best,
gandalth -
@gandalth23
So, not much better than it used to be in opengl.
I really thought vulkan would make some of my favorite games playable.Have you tried Wind Waker? in my tests with opengl it run almost playable a year ago, around 20-25 fps in the initial village. At the time, vulkan was super glitchy but there was improvements already.
I really want to give it a try since the last time i did it was like 6 months ago but it would be super time consuming and i dont have the time right now to build everything from scratch.
Another thing: using vulkan you can tick an option in dolphin settings to do HW texture decoding. It should improve performance.Edit:
heres gecko code to try running double dash in 30fps mode too[ActionReplay_Enabled]
$Force 30FPS
[ActionReplay]
$Force 30FPS
0448C388 00000002 -
@pi4papiba said in Dolphin emulator running on RP4B 64bit:
@gandalth23
So, not much better than it used to be in opengl.
I really thought vulkan would make some of my favorite games playable.Have you tried Wind Waker? in my tests with opengl it run almost playable a year ago, around 20-25 fps in the initial village. At the time, vulkan was super glitchy but there was improvements already.
I really want to give it a try since the last time i did it was like 6 months ago but it would be super time consuming and i dont have the time right now to build everything from scratch.
Another thing: using vulkan you can tick an option in dolphin settings to do HW texture decoding. It should improve performance.Edit:
heres gecko code to try running double dash in 30fps mode too[ActionReplay_Enabled]
$Force 30FPS
[ActionReplay]
$Force 30FPS
0448C388 00000002I tried Wind Walker with the same settings...it gives me about 18 to 22 FPS in the village with OpenGL in Doplhin and Dolphin Ishiiruka . Selecting Vulkan goes only from 8 to 18 FPS.
Selecting Vulkan backend in Doplhin Ishiiruka helps only by playing Mario Kart - Double Dash to get glitches off .....the only disadvantage is that it is a bit slower.
All other games that I tried are slower selecting Vulkan backend.
I also found two games that play at decent level. This are Mirco Machines and Super Mario Strikers. And maybe Super Smash Bros. Melee....
P.S. did u mean GPU texture decoding by writing "HW texture decoding"? I tried and it didn't make any difference...
-
I tried this out but I'm not having much luck with the installation. I will have another attempt tonight.
I've had a few attempts since and I get the following error when I install the MESA - " Error: unable to open display".
apt show libglapi-mesa displays "Version: 19.3.2-1~bpo10+1~rpt3" after the install attempt.
-
try with command in terminal (not over ssh but in desktop):
glxinfo -B
when you run games over Dolphin it will show you the version of GPU drivers on top of the screen....
-
@wodak Thanks I will try that in a few days. I got my hands on the new 64 bit Lakka so I'm using my SD card and experimenting with that at the moment. I will of course report back here somewhere if there is any useful info for PS1/PSP/DC/N64 etc.
-
I've added some more games ...
Micro Machines (runs OK)
Super Smash Bros. Melee (lag)
Mario Party 7 (lag)
Super Mario Strikers (lag) -
@wodak Nice that you are doing some more tests.
To be honest i am kinda giving up hope on making dolphin being usable on the pi4. My last hope was vulkan mature enough to make it run but your tests seems to go the other way around.Another test you can make since you are not using vulkan is to not launch dolphin through a x11 session like you are doing and maybe try running via gbm, in my tests with ppsspp on opengl i had better performance just by not launching the desktop and since dolphin has command line launching options, maybe it improves enough to make it useable.
Another thing is to make dolphin create shader caches before launch. In your videos ive seen some stutters that maybe are because of that, but i cant remember if this is a vulkan feature only.Cool, brother, thanks for your tests.
-
Yup...was thinking the same as you. I came to conclusion that PI4 is just not powerful enough to run Dolphin on decent level. We'll have to wait for next generation of Pi5 to arrive :)
tnx for the tips but I think I'm done with testing....might be a bit better when Igalia finishes optimizing Vulkan driver....
The stutters and tearing is mostly appearing in games if you play them full screen. In windowed mode they work kind of better (less tearing)....
-
This post is deleted! -
@wodak Seems like when 64bit is out of beta GameCube will be for raspberry pi 4 what N64 is for raspberry pi3. Some games run fine and others don’t.
-
@wodak Hi!
your guide is a gem. It helped me run dolphin on my raspberry pi 4. There is one thing that I want toaccomplish and I couldn't find any relevant help on the internet.
I want to link the dolphin executable with the mesa vulkan driver but not system wide. In other words. I have compiled and installed Vulkan using a custom installation prefix under /opt directory in order to not break something in raspberry os which comes with official mesa installed. How can I direct dolphin to the custom Vulkan drivers under /opt directory in order to use these instead of the system's default during compiling ?
Thanks in advance for your help
Kind Regards
-
@wodak What does the “full-upgrade “ command do? I use “upgrade”. Is that better?
-
@unknown said in Dolphin emulator running on RP4B 64bit:
@wodak What does the “full-upgrade “ command do? I use “upgrade”. Is that better?
Full-upgrade is used in preference to a simple upgrade, as it also picks up any dependency changes that may have been made.
Check the documentatuon.
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.