Last updated: 01AUG2021 (see Changelog for details)
Great news – the method used to bring the awesome Super Mario 64 port for RG350 devices is now available for the RG351P. This port is unique in that it features a 60fps (frames per second) patch, making the game look and feel twice as smooth as it originally did. It’s worth checking out this port for this feature alone. Moreover, it’s available for both the 351ELEC and ArkOS firmwares, which is very handy!
This guide is relatively simple, but before we get started, a word about copyright: The game file for Super Mario 64 (or for any game, unless explicitly offered by the owner) is considered copyrighted media, just like a film or song is considered copyrighted media. While it’s never been tested in court, distributing game files over the internet is considered illegal. This guide will show you how to create your own RG351P port of SM64 using your own copy of the game, for your own personal use. Sharing the location of a copy of SM64 is not permitted on this site, nor is distributing a copy of the completed port we’re about to create. If you’re interested in reading more about the legality surrounding game emulation, check out my article here.
Table of Contents: Build the Super Mario 64 port Remap the controls Notes Changelog
To start, you will need your personal copy of the Super Mario 64 Nintendo 64 ROM. Make sure that you’re using a ROM with the file extension of .z64 to ensure widest compatibility. This process also supports the EU and JP versions of the ROM, but are untested at this time. If possible, use a US version of the ROM. The file needs to be renamed as follows:
baserom.us.z64for NTSC/US version of Super Mario 64
baserom.eu.z64for European version of Super Mario 64
baserom.jp.z64for Japan version of Super Mario 64
Build the Super Mario 64 port
I found this to be the most fun part of the whole process. The developer of this port created an online builder tool specifically for this port. All you have to do is visit a webpage, follow a few notes, and voilà, the builder will decompile and build a zip file from your SM64 game file.
- Head to this page to find the SM64 port builder.
- In the first “cell” (piece of code) on the page, you’ll find a “play” button on the top-left side of the code. This will download the toolchain and create the necessary file structure.
- On the left menu, you’ll see an icon of a folder (click the refresh button if you don’t see it). Click that folder icon, then the “sm64-351elec-port” folder. Take your renamed “baserom.us.z64” file and drag it into the sm64-351elec-port folder.
- In the next cell (code) you will see a bunch of lines that are annotated with a “#” comment symbol. It will look like this:
# VERY EXPERIMENTAL : Uncomment the following line to apply puppycam patch #!cd sm64-351elec-port && patch -p1 < ./enhancements/puppycam.patch # Uncomment the following line to apply 60fps patch #!cd sm64-351elec-port && git apply ./enhancements/60fps.patch --ignore-whitespace --reject # Uncomment the following line to build for 351ELEC #!cd sm64-351elec-port && ./build_351_elec.sh && ./build_package_elec.sh # Uncomment the following line to build for ArkOS #!cd sm64-351elec-port && ./build_351_ark.sh && ./build_package_ark.sh
- The first section is for a “puppycam” patch, which gives you a full 360 camera on the right stick (something not originally available on the game). This section is still experimental, so it’s up to you if you want to try it or stick with the original camera. To try the puppycam patch, simply delete the “#” before the “!cd” line, which will enable the patch. Fair warning, the patch is fairly buggy, and I prefer not to use it.
- Similarly, you want to delete the “#” from the first “!cd” line to apply the 60fps patch, and then delete the “#” from the “!cd” line that applies to whatever firmware you’re using — 351ELEC or ArkOS.
- After that, just click the “play” button for this cell, and it will create the .zip file port for you. If you get an error, there’s probably something wrong with your Super Mario 64 ROM. Use a different one.
- If all goes well, you will have a file named sm64-351ELEC.zip (or sm64-ArkOS.zip if you built the ArkOS version) in the main root directory on the left menu. Download this file, then unzip it to reveal a sm64.sh file and a folder named sm64. Note that in ArkOS, the name of the .sh file is what will appear on your menu, so if you’d like, rename it to something easier to identify, like “Super Mario 64.sh”. To change the name of the game in 351ELEC, use the gamelist.xml entry found in the Notes section below.
- Insert your RG351P microSD card into your computer using a USB SD card reader, then navigate to GAMES (or EASYROMS for ArkOS) / ports folder. Place the sm64.sh and sm64 folder into the ports folder. Note that it will take a while to move over, because there are lots of little files in the sm64 folder.
After that, just eject the SD card and re-insert it into your device. You should now find the Super Mario 64 game in your Ports section.
Remap the controls
By default, here are the controls:
A button: jump B button: punch/roll L1 button: Z button R1 button: R button Right analog stick: C buttons START: pause/in-game menu START + SELECT: close game
There are two methods to remap the controls. If you built your SM64 port before 30DEC2020, you will need to do Method #2. If you compiled your port on 30DEC2020 or later, you can do either method.
Method #1: sm64config.txt files
To start, you have to boot up the game at least once to create the necessary files. Eject the SD card and put it in your computer. In the ports/sm64/configuration folder on your SD card, you’ll find a file named “sm64config.txt”. In this file, you can set the parameters “button_a”, “button_b”, etc, with the buttons you want to use (be sure to use uppercase). It will look like this:
button_a A button_b B button_start START button_r R1 button_z L1
For me, I changed button_a to B and button_b to Y.
Method #2: gamecontrollerdb.txt file
You can also go into the ports/sm64/controller folder on your SD card, and open the gamecontrollerdb.txt file. Find the text string that starts with “03000000091200000031000011010000,OpenSimHardware OSH PB Controller”, and make the following changes to the face button configuration in that string:
This will map the jump button to the B button, and the punch/roll button to Y, which feels the most natural to me.
Note that there are no save states, you will have to use the in-game saves just like on the original console.
If you want to add boxart and videos to your menu, download and unzip this file.
In ArkOS, place the sm64-image.png file in the ports/images folder, and the sm64-video.mp4 file in the ports/videos folder. Note that if you change the name of your .sh file from sm64.sh to something else, you need to change the image and video file names as well, so that they match.
If you are using 351ELEC, you will need to alter the gamelist.xml file in your ports folder, using a text editor. Add the following entry (thanks to seajay for the code) to add box art and change the displayed name to “Super Mario 64”:
<game> <path>./sm64.sh</path> <name>Super Mario 64</name> <desc>A native port of Super Mario 64, built specifically for the RG351P.</desc> <image>./images/sm64-image.png</image> <video>./videos/sm64-video.mp4</video> <thumbnail>./images/sm64-image.png</thumbnail> <rating>1.0</rating> <releasedate>19960624T000000</releasedate> <genre>Platform</genre> <developer>Nintendo</developer> <publisher>Nintendo</publisher> </game>
Finally, place the sm64-image.png file in the ports/images folder, and the sm64-video.mp4 file in the ports/videos folder.
– fixed broken link
– added gamelist.xml instructions for 351ELEC
– added button remapping section
– published guide