Note that Termux only makes a build based off the device it's made with. So a 32 bit device will only make a build compatible with 32 bit. The same with a 64 bit device. It will only make a 64 bit compatible build
- Install Termux and run the commands:
pkg update
&pkg upgrade
You will get the following message multiple times:
Press the capital I followed by enter each time it asks you.
-
Add the following repo:
pkg install x11-repo
-
Give Termux storage access:
termux-setup-storage
Click allow if a popup comes up.
-
Install the following:
pkg install mesa-dev binutils git wget make python getconf zip apksigner clang
Also do this as it fixes some things:
pkg remove libglvnd
pkg install git wget make python getconf zip \ apksigner clang binutils libglvnd-dev aapt which
-
Clone this repo:
git clone https://github.com/izzy2fancy/sm64-izzys-port-android
-
Change to the new folder:
cd sm64-izzys-port-android
-
Now we need to put your Super Mario US rom in the root of the "sm64-izzys-port-android" folder. Which is inside Termux. The rom needs to be named "baserom.us.z64" We could use command prompt, but in this example we are going to use the Material Files app to get access to the Termux files.
Get the Material Files app below:
Allow the permissions and press the menu button on top left.
Click Add storage.
Click on External storage.
Scoll down the left side & press on Termux.
Press USE THIS FOLDER at the bottom.
Click ALLOW.
There is now a home button where the Termux files are.
Find your baserom.us.z64 and copy it.
Press the home button you created earlier. Find the "sm64-izzys-port-android" folder and click on it.
Press the button in the lower right to copy the rom into the folder. Make sure on the top that you are in the right folder.
-
Download SDL requirements:
./getSDL.sh
-
Make the audio file:
make -j $(nproc) -C tools/audiofile
-
Now we can add the 60fps patch:
tools/apply_patch.sh enhancements/60fps_ex.patch
-
I'm going to add the DynOS patch. This & the 60fps patch above are optional. On lower end devices they may cause some performance issues. This DynOs patch is required to add model packs to the game. It also adds some options like warping to levels. You can access this menu by pressing start to pause the game. Press the Z button which is normally L2 on your controller.
tools/apply_patch.sh enhancements/DynOS.1.0.patch
You will be unable to add mods unless you have access to the Android/data/com.vdavid003.sm64port/files folder. I will show you ways to access the data files, even on the newer android versions.
-
Pick your build options. These options may cause performance issues, especially if you plan to add a texture pack. If your phone isn't powerful enough it might run poorly or not at all. The options are below:
TOUCH_CONTROLS EXT_OPTIONS_MENU BETTERCAMERA TEXTURE_FIX NODRAWINGDISTANCE EXTERNAL_DATA
Do not enable EXTERNAL_DATA if you don't have access to the data folder
To enable an option put =1 or disable put =0
Here's an example build:
make -j $(nproc) TOUCH_CONTROLS=1 BETTERCAMERA=1 NODRAWINGDISTANCE=1 TEXTURE_FIX=1 EXT_OPTIONS_MENU=1 EXTERNAL_DATA=1
If you are on a 32 bit phone or underpowered phone, try just make before all the options. Like below:
make TOUCH_CONTROLS=1 BETTERCAMERA=1 NODRAWINGDISTANCE=1 TEXTURE_FIX=1 EXT_OPTIONS_MENU=1 EXTERNAL_DATA=1
*Remember to disable any you don't want by changing it to 0*
-
Now start the build with the commands you made above.
If you get an error during the build enter
make clean
followed by justmake
If you have built with external data you have to put the base.zip in the /sdcard/Android/data/com.vdavid003.sm64port/files/res/ folder. You can find the base.zip with the Material Files app in home/sm64-izzys-port-android/build/us_pc/res/
-
You can find the finshed apk in the home/sm64-izzys-port-android/build/us_pc folder. It is called sm64.us.f3dex2e.apk
-
You can use the Material Files app again and install it. You'll have to grant permission to let the app install unknown applications.
-
To access the data folder for external data, DynOs models and texture packs. You can use a combination of different file explorer apps. Some suggestions are the app simply called Files, FV File Explorer or CX File Explorer.
If it runs real slow, you probably have to enable full screen and turn off v sync
Getting Errors that stop the build? Most are from not having all the dependencies or the correct ones. You can try to redo the dependencies part. Also as mentioned before, sometimes make clean
followed by just make
will fix problems.
Another problem that happens sometimes is the touchscreen will press the b button. No matter where you touch it. You can fix this by going to the .config file in the data user folder. You can set the b button to ffff ffff ffff. The touch screen b button will still work after this. It just stops the unwanted b button pushing.