PSA: Fix for sound issues on mGBA

mGBA has reports of sound issues and degraded performance since 0.7.0:

So I tried compiling the RetroArch core for 0.6.3 and surprise: it fixed the sound problems I had with Megaman Battle Network, so I’m quite happy with it.

This is how you can build the RetroArch core:

$ git clone https://github.com/mgba-emu/mgba.git mgba
$ git fetch
$ git checkout 0.6.3
$ mkdir build
$ cd build
$ cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -DBUILD_LIBRETRO=ON ..
$ make

Then move it to your RetroArch cores directory:

$ cp mgba_libretro.so  ~/.config/retroarch/cores/

As far as I can tell, the changes introduced in 0.7.0 were supposed to improve the accuracy on some Pokemon sounds so YMMV by downgrading to 0.6.3 depending on what games are you playing.

Edit: forgot to explain how to change tag

2 Likes

good job…

this did not work for me, when I run make, I do not get any resulting .so file, the only thing that is close is the correct named file but it has a weird longer extension and changing that to a .so and running it on the gameshell does not do anything

edit: I’m not aware of any other way to get the 0.6.3 version of the mgba .so - any help with this method is appreciated

To simply things, the following can be copied & pasted to your SSH connection:

cd
git clone https://github.com/mgba-emu/mgba.git mgba
cd mgba
git fetch
git checkout 0.6.3
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -DBUILD_LIBRETRO=ON ..
make

Now the final line is a bit dated… If you’ve updated to clockworkos_2.1 or later, enter the following to install the emulator:

cp mgba_libretro.so  ~/apps/emulators/

the problem when I try to run this on my gameshell is I get this when calling cmake:
“-bash: cmake: command not found”
And when I installed CMake on my pc and went through the commands, I didn’t get a resulting .so file.
Am I supposed to be able to use the cmake command on the gameshell by default?
I’m running the 0.21 version of the OS.

run >
sudo apt-get install cmake

1 Like

got it working, thank you!

I wasn’t able to build 0.6.3

[ 80%] Building CXX object qt/CMakeFiles/mgba-qt.dir/main.cpp.o
In file included from /home/cpi/mgba/src/platform/qt/main.cpp:12:0:
/home/cpi/mgba/src/platform/qt/Window.h: In member function ‘void QGBA::Window::updateMultiplayerStatus(bool)’:
/home/cpi/mgba/src/platform/qt/Window.h:52:67: error: invalid use of incomplete type ‘class QAction’
  void updateMultiplayerStatus(bool canOpenAnother) { m_multiWindow->setEnabled(canOpenAnother); }
                                                                   ^~
In file included from /home/cpi/mgba/src/platform/qt/main.cpp:10:0:
/home/cpi/mgba/src/platform/qt/ConfigController.h:22:7: note: forward declaration of ‘class QAction’
 class QAction;
       ^~~~~~~
qt/CMakeFiles/mgba-qt.dir/build.make:153: recipe for target 'qt/CMakeFiles/mgba-qt.dir/main.cpp.o' failed
make[2]: *** [qt/CMakeFiles/mgba-qt.dir/main.cpp.o] Error 1
CMakeFiles/Makefile2:253: recipe for target 'qt/CMakeFiles/mgba-qt.dir/all' failed
make[1]: *** [qt/CMakeFiles/mgba-qt.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2