Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Unounited/108cff30d0d0752a30c7f9b6d3a764aa to your computer and use it in GitHub Desktop.
Save Unounited/108cff30d0d0752a30c7f9b6d3a764aa to your computer and use it in GitHub Desktop.

[Guide] Installing Mupen64plus and M64Py on your Pi4 (2022)

Important Note:

If your raspbian version is bullseye and you try to build and install mupen64plus, you may end up with errors so you will have to wait a while for the fix, for those that know how to fix or never had the issue, letting me know in the comments would be appreciated. For now you will have to use raspbian buster, get raspbian buster here: https://downloads.raspberrypi.org/raspios_oldstable_armhf/images/raspios_oldstable_armhf-2022-04-07/2022-04-04-raspios-buster-armhf.img.xz. The m64py installation still works on bullseye, but m64py requires mupen64plus so it is not recommended that you install this emulator on bullseye until the errors are fixed.

What's M64Py?

M64Py is a Qt5 front-end Gui for Mupen64plus written in python. It is a much better gui n64 emulator to use than mupen64plus on the command line, because it is confusing to use, so if anyone is tired of using mupen64plus on command line, then install this emulator. M64py has a lot of cool stuff included like, it's better to configure controls, Roms have snapshots, you can configure video plugins easier, use cheats easier, and more. M64Py has more info here: http://m64py.sourceforge.net/.

Building & Installing Mupen64plus

First you need these packages for the mupen64plus build to work:

sudo apt install libboost-dev libboost-filesystem-dev libsdl1.2-dev libsdl2-dev

Now build & install mupen64plus:

wget https://github.com/mupen64plus/mupen64plus-core/releases/download/2.5.9/mupen64plus-bundle-src-2.5.9.tar.gz
tar -zxf mupen64plus-bundle-src-2.5.9.tar.gz
cd mupen64plus-bundle-src-2.5.9/
sudo CFLAGS='-mfpu=neon -mtune=cortex-a72 -march=armv8-a' ./m64p_build.sh NEON=1 USE_GLES=1 VFP_HARD=1 NEW_DYNAREC=1
sudo CFLAGS='-mfpu=neon -mtune=cortex-a72 -march=armv8-a' ./m64p_install.sh NEON=1 USE_GLES=1 VFP_HARD=1 NEW_DYNAREC=1

Mupen64plus is officially installed. If you have any issues that you ran into, post them here: https://github.com/mupen64plus/mupen64plus-core/issues. Now we can install m64py.

Installing M64Py

M64Py needs these packages installed in order for the emulator to work:

sudo apt install python3-pyqt5 pyqt5-dev-tools python3-pyqt5.qtopengl qt5-default libpcap-dev libncurses5-dev libprocps-dev libxtst-dev libxcb-util0-dev qttools5-dev-tools libdtkwidget-dev libdtkwm-dev pkg-config
pip3 install pysdl2
pip install pysdl2

Next install M64Py:

cd ..
git clone https://github.com/mupen64plus/mupen64plus-ui-python
cd mupen64plus-ui-python
python3 setup.py build
sudo python3 setup.py install

M64Py is officially installed. Just an FYI the location for M64Py is (/usr/local/bin). Run m64py by going to terminal and type

m64py

Setting up M64Py

First go to Settings, Paths, and browse the location on where your roms are kept. You should have 2 video plugins, video-rice, and glide64mk2. I would do video-rice for the testing, and I know some might have the plugin flash a lot, and some roms that don't work, but the next step will show you what you need to do. Configure your controls by going to settings, plugins, configure mupen64plus-input-sdl, keyboard controls are set to default, if you want to use a wired or bluetooth gamepad, make sure the setting is fully manual so you can map the controls, choose your device you want to use, map the controls, and the settings should save automaticly, make sure your AnalogDeadzone x and y sensitivity is set to "4096", and the AnalogPeak x and y sensitivity is set to "32768", or your joystick will have problems. Refresh your roms by going to file, open rom, from list, and click refresh. Now you have the list of roms and snapshots. Open the rom you want, and then it should run. If you want the best emulation retropie used, move on to the next step. If you don't then your pretty much done.

GLideN64-Plugin

To get the GlideN64 plugin, you will have to download the retropie n64 pack and find the plugin inside the pack and then copy it to /usr/local/lib/mupen64plus by doing this:

wget https://files.retropie.org.uk/binaries/buster/rpi4/kms/emulators/mupen64plus.tar.gz
tar -zxf mupen64plus.tar.gz
sudo cp mupen64plus/lib/mupen64plus/mupen64plus-video-GLideN64.so /usr/local/lib/mupen64plus/

The last thing you need to do is to make the GLideN64 plugin use the same settings that retropie used or it will lag, first go to >>settings, >>plugins, then configure the GLideN64 plugin, copy the following settings:



That will make it so when you do full screen or increase the window size, the emulation will look pixely like the same emulation graphics retropie used. So now we shouldn't have to worry about the emulation lagging.

Hopefully this guide helped you install m64py on your pi4. Feel free to add a comment as long as it's on topic, If you find serious bugs that needs to be fixed then post them here: https://github.com/mupen64plus/mupen64plus-ui-python/issues. This Guide will be updated when the newest update of M64Py or Mupen64plus comes out, or if anything needs to be changed.

Happy Gaming!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment