vdavid003 / sm64-port-android-base Goto Github PK
View Code? Open in Web Editor NEWA port of https://github.com/sm64-port/sm64-port for Android.
A port of https://github.com/sm64-port/sm64-port for Android.
I suggest you change ./getSDL.sh to bash getSDL.sh
some people won't understand what you put there and chmod 777 /data/data/com.termux -R
isn't a bad advice as you said it allows you to get access to the APK file with ES File Explorer Pro or whatever file manager that can go to that directory this is for unrooted devices I also suggest this
#Example
cp /storage/emulated/0/baserom.us.z64 ./baserom.us.z64
this is if you don't have a sdcard this will locate the ROM in your internal storage
You're dealing with kids that need really easy instructions I basically helped someone with this
I tried alot and finally found out, that this patch makes every tap on the screen trigger the button B and move the camera (puppycamera).
Moving, jumping, in the menu - always.
I'm building on termux on the ex/nightly branch.
Hi,
After follow building on docker, it gives me errors due to non-existence of "game" folder.
I'm using US baserom and Render96 v1.4.2.
Thank you very much for developing this project!
Log:
log.txt
How can I sign this for Windows/Linux versions? Method in Readme with gradelw.bat doesn't seem to comply the signature process
I consistently get errors when trying to run gradlew on Windows and Linux. Native builds work fine on both platforms. This has happened on Windows 10, Ubuntu 18.04, Ubuntu 20.04 and Manjaro.
Here's the error message I receive:
> Configure project :app
NDK is missing a "platforms" directory.
If you are using NDK, verify the ndk.dir is set to a valid NDK directory. It is currently set to /home/adam/Android/ndk-bundle.
If you are not using NDK, unset the NDK variable from ANDROID_NDK_HOME or local.properties to remove this warning.
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':app'.
> java.lang.NullPointerException (no error message)
I've followed the guide and installed all the necessary dependencies and I have the following SDK components installed:
I don't get any errors relating to missing tools or licenses as I have done previously, so this shouldn't be an issue. However, I've included this list in case it gives you any clues as to what's happening.
EDIT: I also receive the same error when building using the docker file on Ubuntu 18.04 so I don't think it's anything to do with my configuration. Output of the attempt using docker with "./gradlew assembleDebug --stacktrace" is below
SM64 Android port gradle build failure on docker with stacktrace.txt
GPD XD is not able to run any of the Builds. I start it, it goes to a Blank Screen, then goes to the Error saying it has Stopped.
I'm getting this error compiling Render96 + 60FPS patch.
Traceback (most recent call last):
File "tools/mkzip.py", line 20, in
with zipfile.ZipFile(sys.argv[2], 'w', allowZip64=False) as zipf:
File "/usr/lib/python3.6/zipfile.py", line 1113, in init
self.fp = io.open(file, filemode)
IsADirectoryError: [Errno 21] Is a directory: 'build/us_pc/res/'
Makefile:705: recipe for target 'build/us_pc/res/' failed
make: *** [build/us_pc/res/] Error 1
I have no problems compiling the EX_Nightly alone (or patched for 60FPS) or the Render96 PC build. But I have troubles to build the Android Render96 Patched.
there's a builder is sm64 nx only works on PC is there any chances u can port it? or not?
I've tried multiple patches+factory resetting the phone, however the Xbox Series 2 controller doesn't seem to work on any patch (I'm on a OnePlus 7 Pro device)
A friend of mine tried to install the APK on this phone which has a screen with a 120hz refresh rate, Is it possible it will cause lagg since the game only runs on 60 fps?
I have tried disabling them in the Make and using the flags and I can't make them work. Camera is still the Nintendo 64 camera, draw distance is the same and virtual controls are still there.
TOUCH_CONTROLS ?= 0
BETTERCAMERA ?= 1
NODRAWINGDISTANCE ?= 1
or make NODRAWDISTANCE=1 BETTERCAMERA=1 TOUCH_CONTROLS=0 TEXTSAVES=1 EXTERNAL_DATA=1 LEGACY_RES=1 -j4
Am I doing something wrong?
I think is gotta be in 1 more day the updates u made is in 6 days but now is more days I guess
I tried to compile it with better camera, touch controls, no draw distance, text saves, texture fix, and extended options enabled. I had to install sdl2 manually in termux to fix a different error, but now I get this error:
cc -L build/us_pc -o build/us_pc/sm64.us.f3dex2e build/us_pc/src/engine/behavior_script.o build/us_pc/src/engine/geo_layout.o build/us_pc/src/engine/graph_node.o build/us_pc/src/engine/graph_node_manager.o build/us_pc/src/engine/level_script.o build/us_pc/src/engine/math_util.o build/us_pc/src/engine/surface_collision.o build/us_pc/src/engine/surface_load.o build/us_pc/src/game/area.o build/us_pc/src/game/behavior_actions.o build/us_pc/src/game/camera.o build/us_pc/src/game/debug.o build/us_pc/src/game/debug_course.o build/us_pc/src/game/envfx_bubbles.o build/us_pc/src/game/envfx_snow.o build/us_pc/src/game/game_init.o build/us_pc/src/game/geo_misc.o build/us_pc/src/game/hud.o build/us_pc/src/game/ingame_menu.o build/us_pc/src/game/interaction.o build/us_pc/src/game/level_geo.o build/us_pc/src/game/level_update.o build/us_pc/src/game/macro_special_objects.o build/us_pc/src/game/mario.o build/us_pc/src/game/mario_actions_airborne.o build/us_pc/src/game/mario_actions_automatic.o build/us_pc/src/game/mario_actions_cutscene.o build/us_pc/src/game/mario_actions_moving.o build/us_pc/src/game/mario_actions_object.o build/us_pc/src/game/mario_actions_stationary.o build/us_pc/src/game/mario_actions_submerged.o build/us_pc/src/game/mario_misc.o build/us_pc/src/game/mario_step.o build/us_pc/src/game/memory.o build/us_pc/src/game/moving_texture.o build/us_pc/src/game/obj_behaviors.o build/us_pc/src/game/obj_behaviors_2.o build/us_pc/src/game/object_collision.o build/us_pc/src/game/object_helpers.o build/us_pc/src/game/object_list_processor.o build/us_pc/src/game/options_menu.o build/us_pc/src/game/paintings.o build/us_pc/src/game/platform_displacement.o build/us_pc/src/game/print.o build/us_pc/src/game/profiler.o build/us_pc/src/game/rendering_graph_node.o build/us_pc/src/game/save_file.o build/us_pc/src/game/screen_transition.o build/us_pc/src/game/shadow.o build/us_pc/src/game/skybox.o build/us_pc/src/game/sound_init.o build/us_pc/src/game/spawn_object.o build/us_pc/src/game/spawn_sound.o build/us_pc/src/game/thread6.o build/us_pc/src/audio/data.o build/us_pc/src/audio/effects.o build/us_pc/src/audio/external.o build/us_pc/src/audio/globals_start.o build/us_pc/src/audio/heap.o build/us_pc/src/audio/load.o build/us_pc/src/audio/playback.o build/us_pc/src/audio/port_eu.o build/us_pc/src/audio/seqplayer.o build/us_pc/src/audio/synthesis.o build/us_pc/src/menu/file_select.o build/us_pc/src/menu/intro_geo.o build/us_pc/src/menu/level_select_menu.o build/us_pc/src/menu/star_select.o build/us_pc/src/buffers/buffers.o build/us_pc/src/buffers/framebuffers.o build/us_pc/src/buffers/gfx_output_buffer.o build/us_pc/src/buffers/zbuffer.o build/us_pc/actors/common0.o build/us_pc/actors/common0_geo.o build/us_pc/actors/common1.o build/us_pc/actors/common1_geo.o build/us_pc/actors/group0.o build/us_pc/actors/group0_geo.o build/us_pc/actors/group1.o build/us_pc/actors/group10.o build/us_pc/actors/group10_geo.o build/us_pc/actors/group11.o build/us_pc/actors/group11_geo.o build/us_pc/actors/group12.o build/us_pc/actors/group12_geo.o build/us_pc/actors/group13.o build/us_pc/actors/group13_geo.o build/us_pc/actors/group14.o build/us_pc/actors/group14_geo.o build/us_pc/actors/group15.o build/us_pc/actors/group15_geo.o build/us_pc/actors/group16.o build/us_pc/actors/group16_geo.o build/us_pc/actors/group17.o build/us_pc/actors/group17_geo.o build/us_pc/actors/group1_geo.o build/us_pc/actors/group2.o build/us_pc/actors/group2_geo.o build/us_pc/actors/group3.o build/us_pc/actors/group3_geo.o build/us_pc/actors/group4.o build/us_pc/actors/group4_geo.o build/us_pc/actors/group5.o build/us_pc/actors/group5_geo.o build/us_pc/actors/group6.o build/us_pc/actors/group6_geo.o build/us_pc/actors/group7.o build/us_pc/actors/group7_geo.o build/us_pc/actors/group8.o build/us_pc/actors/group8_geo.o build/us_pc/actors/group9.o build/us_pc/actors/group9_geo.o build/us_pc/levels/entry.o build/us_pc/levels/scripts.o build/us_pc/bin/cave.o build/us_pc/bin/debug_level_select.o build/us_pc/bin/effect.o build/us_pc/bin/fire.o build/us_pc/bin/generic.o build/us_pc/bin/grass.o build/us_pc/bin/inside.o build/us_pc/bin/machine.o build/us_pc/bin/mountain.o build/us_pc/bin/outside.o build/us_pc/bin/segment2.o build/us_pc/bin/sky.o build/us_pc/bin/snow.o build/us_pc/bin/spooky.o build/us_pc/bin/title_screen_bg.o build/us_pc/bin/water.o build/us_pc/data/behavior_data.o build/us_pc/src/pc/cheats.o build/us_pc/src/pc/cliopts.o build/us_pc/src/pc/configfile.o build/us_pc/src/pc/ini.o build/us_pc/src/pc/mixer.o build/us_pc/src/pc/pc_main.o build/us_pc/src/pc/platform.o build/us_pc/src/pc/ultra_reimplementation.o build/us_pc/src/pc/gfx/gfx_cc.o build/us_pc/src/pc/gfx/gfx_opengl.o build/us_pc/src/pc/gfx/gfx_opengl_legacy.o build/us_pc/src/pc/gfx/gfx_pc.o build/us_pc/src/pc/gfx/gfx_sdl2.o build/us_pc/src/pc/audio/audio_null.o build/us_pc/src/pc/audio/audio_sdl.o build/us_pc/src/pc/controller/controller_emscripten_keyboard.o build/us_pc/src/pc/controller/controller_entry_point.o build/us_pc/src/pc/controller/controller_keyboard.o build/us_pc/src/pc/controller/controller_recorded_tas.o build/us_pc/src/pc/controller/controller_sdl.o build/us_pc/src/pc/controller/controller_touchscreen.o build/us_pc/src/pc/fs/dirtree.o build/us_pc/src/pc/fs/fs.o build/us_pc/src/pc/fs/fs_packtype_dir.o build/us_pc/src/pc/fs/fs_packtype_zip.o build/us_pc/levels/bbh/leveldata.o build/us_pc/levels/bitdw/leveldata.o build/us_pc/levels/bitfs/leveldata.o build/us_pc/levels/bits/leveldata.o build/us_pc/levels/bob/leveldata.o build/us_pc/levels/bowser_1/leveldata.o build/us_pc/levels/bowser_2/leveldata.o build/us_pc/levels/bowser_3/leveldata.o build/us_pc/levels/castle_courtyard/leveldata.o build/us_pc/levels/castle_grounds/leveldata.o build/us_pc/levels/castle_inside/leveldata.o build/us_pc/levels/ccm/leveldata.o build/us_pc/levels/cotmc/leveldata.o build/us_pc/levels/ddd/leveldata.o build/us_pc/levels/ending/leveldata.o build/us_pc/levels/hmc/leveldata.o build/us_pc/levels/intro/leveldata.o build/us_pc/levels/jrb/leveldata.o build/us_pc/levels/lll/leveldata.o build/us_pc/levels/menu/leveldata.o build/us_pc/levels/pss/leveldata.o build/us_pc/levels/rr/leveldata.o build/us_pc/levels/sa/leveldata.o build/us_pc/levels/sl/leveldata.o build/us_pc/levels/ssl/leveldata.o build/us_pc/levels/thi/leveldata.o build/us_pc/levels/totwc/leveldata.o build/us_pc/levels/ttc/leveldata.o build/us_pc/levels/ttm/leveldata.o build/us_pc/levels/vcutm/leveldata.o build/us_pc/levels/wdw/leveldata.o build/us_pc/levels/wf/leveldata.o build/us_pc/levels/wmotr/leveldata.o build/us_pc/levels/bbh/script.o build/us_pc/levels/bitdw/script.o build/us_pc/levels/bitfs/script.o build/us_pc/levels/bits/script.o build/us_pc/levels/bob/script.o build/us_pc/levels/bowser_1/script.o build/us_pc/levels/bowser_2/script.o build/us_pc/levels/bowser_3/script.o build/us_pc/levels/castle_courtyard/script.o build/us_pc/levels/castle_grounds/script.o build/us_pc/levels/castle_inside/script.o build/us_pc/levels/ccm/script.o build/us_pc/levels/cotmc/script.o build/us_pc/levels/ddd/script.o build/us_pc/levels/ending/script.o build/us_pc/levels/hmc/script.o build/us_pc/levels/intro/script.o build/us_pc/levels/jrb/script.o build/us_pc/levels/lll/script.o build/us_pc/levels/menu/script.o build/us_pc/levels/pss/script.o build/us_pc/levels/rr/script.o build/us_pc/levels/sa/script.o build/us_pc/levels/sl/script.o build/us_pc/levels/ssl/script.o build/us_pc/levels/thi/script.o build/us_pc/levels/totwc/script.o build/us_pc/levels/ttc/script.o build/us_pc/levels/ttm/script.o build/us_pc/levels/vcutm/script.o build/us_pc/levels/wdw/script.o build/us_pc/levels/wf/script.o build/us_pc/levels/wmotr/script.o build/us_pc/levels/bbh/geo.o build/us_pc/levels/bitdw/geo.o build/us_pc/levels/bitfs/geo.o build/us_pc/levels/bits/geo.o build/us_pc/levels/bob/geo.o build/us_pc/levels/bowser_1/geo.o build/us_pc/levels/bowser_2/geo.o build/us_pc/levels/bowser_3/geo.o build/us_pc/levels/castle_courtyard/geo.o build/us_pc/levels/castle_grounds/geo.o build/us_pc/levels/castle_inside/geo.o build/us_pc/levels/ccm/geo.o build/us_pc/levels/cotmc/geo.o build/us_pc/levels/ddd/geo.o build/us_pc/levels/ending/geo.o build/us_pc/levels/hmc/geo.o build/us_pc/levels/intro/geo.o build/us_pc/levels/jrb/geo.o build/us_pc/levels/lll/geo.o build/us_pc/levels/menu/geo.o build/us_pc/levels/pss/geo.o build/us_pc/levels/rr/geo.o build/us_pc/levels/sa/geo.o build/us_pc/levels/sl/geo.o build/us_pc/levels/ssl/geo.o build/us_pc/levels/thi/geo.o build/us_pc/levels/totwc/geo.o build/us_pc/levels/ttc/geo.o build/us_pc/levels/ttm/geo.o build/us_pc/levels/vcutm/geo.o build/us_pc/levels/wdw/geo.o build/us_pc/levels/wf/geo.o build/us_pc/levels/wmotr/geo.o build/us_pc/src/pc/gfx/gfx_direct3d11.o build/us_pc/src/pc/gfx/gfx_direct3d12.o build/us_pc/src/pc/gfx/gfx_direct3d_common.o build/us_pc/src/pc/gfx/gfx_dxgi.o build/us_pc/assets/mario_anim_data.o build/us_pc/assets/demo_data.o build/us_pc/bin/bbh_skybox.o build/us_pc/bin/bidw_skybox.o build/us_pc/bin/bitfs_skybox.o build/us_pc/bin/bits_skybox.o build/us_pc/bin/ccm_skybox.o build/us_pc/bin/cloud_floor_skybox.o build/us_pc/bin/clouds_skybox.o build/us_pc/bin/ssl_skybox.o build/us_pc/bin/water_skybox.o build/us_pc/bin/wdw_skybox.o build/us_pc/sound/sound_data.o build/us_pc/lib/src/alBnkfNew.o build/us_pc/lib/src/guLookAtRef.o build/us_pc/lib/src/guMtxF2L.o build/us_pc/lib/src/guNormalize.o build/us_pc/lib/src/guOrthoF.o build/us_pc/lib/src/guPerspectiveF.o build/us_pc/lib/src/guRotateF.o build/us_pc/lib/src/guScaleF.o build/us_pc/lib/src/guTranslateF.o build/us_pc/lib/src/ldiv.o build/us_pc/src/goddard/debug_utils.o build/us_pc/src/goddard/draw_objects.o build/us_pc/src/goddard/dynlist_proc.o build/us_pc/src/goddard/gd_main.o build/us_pc/src/goddard/gd_math.o build/us_pc/src/goddard/gd_memory.o build/us_pc/src/goddard/joints.o build/us_pc/src/goddard/objects.o build/us_pc/src/goddard/old_menu.o build/us_pc/src/goddard/particles.o build/us_pc/src/goddard/renderer.o build/us_pc/src/goddard/sfx.o build/us_pc/src/goddard/shape_helper.o build/us_pc/src/goddard/skin.o build/us_pc/src/goddard/skin_movement.o build/us_pc/src/goddard/dynlists/anim_group_1.o build/us_pc/src/goddard/dynlists/anim_group_2.o build/us_pc/src/goddard/dynlists/anim_mario_eyebrows_1.o build/us_pc/src/goddard/dynlists/anim_mario_lips_1.o build/us_pc/src/goddard/dynlists/anim_mario_lips_2.o build/us_pc/src/goddard/dynlists/anim_mario_mustache_left.o build/us_pc/src/goddard/dynlists/anim_mario_mustache_right.o build/us_pc/src/goddard/dynlists/dynlist_mario_face.o build/us_pc/src/goddard/dynlists/dynlist_mario_master.o build/us_pc/src/goddard/dynlists/dynlist_test_cube.o build/us_pc/src/goddard/dynlists/dynlist_unused.o build/us_pc/src/goddard/dynlists/dynlists_mario_eyebrows_mustache.o build/us_pc/src/goddard/dynlists/dynlists_mario_eyes.o -march=native -lm -lGL
sdl2-config --libs -no-pie -lpthread /data/data/com.termux/files/usr/bin/aarch64-linux-android-ld: cannot find -lGL clang-10: error: linker command failed with exit code 1 (use -v to see invocation)
Even if I disable the other options except touch controls, the error still happens.
i tryed make it but ended up nothing
also u should make a build app to compile sm64 android port
My device is an LG G4 stylus with android 6
It is arm7a.
No extra flags were used during the building process.
Easy fix follow the Linux compile instructions!
I did use docker.
Point is phone compile is broken. Second lvl when the plants go to sleep you get an fc. Haven't had the same using my Linux computer to compile
Hi
I have build with 2 solutions don't see any problem but the apk don't work, the screen stay black, (tested with some people on Tablet and phone)
Does the Android Studio need something more like Android version ?
Does the build master the same like the sm64ex_nightly cause i don't have test to build this one
Thanks
Hello, I just have a problem with MSYS2. I'm following the instructions, but I got stuck in "Copy in your baserom", the program thinks that the file or directory "/home/User/sm64-port-android-base/app/jni/src/baserom.us.z64" doesn't exist, what can I do?
When screen tapped u punch not pressing the B button its anoyinng that make me not Able to longjump
Nothing else
When i type "make --jobs 4", it starts the thing, but then it shows:
"make: *** duping jobs pipe: Bad file descriptor. Stop."
I dont know what to do.
I'm using termux.
I used to be able to compile this, but recent changes in the Android SDK and NDK are now preventing me from compiling this frustrating port.
When I tried to compile it, I got the following output:
`> Configure project :app
NDK is missing a "platforms" directory.
If you are using NDK, verify the ndk.dir is set to a valid NDK directory. It is currently set to /home/eunha/android-sdk/ndk-bundle.
If you are not using NDK, unset the NDK variable from ANDROID_NDK_HOME or local.properties to remove this warning.
FAILURE: Build failed with an exception.
java.lang.NullPointerException (no error message)
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 0s`
I initially thought my Arch Linux install was broken, so I formatted it.
For reference, I am using Android NDK version 21, as well as the Android SDK version installed by the smlinux script by enigma9o7. My OS is Pop!_OS 20.04 (a fork of Ubuntu 20.04).
Can you make a singed all plz I tried it didn't work is lonng
For some weird reason when building and running the game on my Oneplys 8 Pro (Snapdragon 865), the game runs very slowly. Could it be because of the resolution of the phone? Is there anything I could try doing?
If you want to compile Super Mario 64 for Android on PC you'll probably want to clone this repo instead!
If you want to compile on Android using Termux, follow these instructions in Termux:
Install dependencies:
pkg install git wget make python getconf zip apksigner clang
Clone the repository:
git clone https://github.com/VDavid003/sm64-port-android --branch termux_build
cd sm64-port-android
Copy in your baserom:
Do this using your default file manager (on AOSP, you can slide on the left and there will be a "Termux" option there), or using Termux
termux-setup-storage
cp /storage/emulated/0/baserom.us.z64 ./baserom.us.z64
Get SDL includes:
./getSDL.sh
Build:
# if you have more cores available, you can increase the --jobs parameter
make --jobs 4
Wait a bit
Enjoy your apk:
ls -al build/us_pc/sm64.us.f3dex2e.apk
This repo does not include all assets necessary for compiling the game.
A prior copy of the game is required to extract the assets.
sudo apt install -y git build-essential pkg-config libusb-1.0-0-dev libsdl2-dev
.git clone https://github.com/sm64-port/sm64-port.git
, which will create a directory sm64-port
and then enter it cd sm64-port
.baserom.<VERSION>.z64
into the repository's root directory for asset extraction, where VERSION
can be us
, jp
, or eu
.make
to build. Qualify the version through make VERSION=<VERSION>
. Add -j4
to improve build speed (hardware dependent based on the amount of CPU cores available).build/<VERSION>_pc/sm64.<VERSION>.f3dex2e
.pacman -S git make python3 mingw-w64-x86_64-gcc
pacman -S git make python3 mingw-w64-i686-gcc
gcc
.C:\msys64\home\<username>
(home directory). At the prompt, you will see the current working directory in yellow. ~
is an alias for the home directory. You can change the current working directory to My Documents
by entering cd /c/Users/<username>/Documents
.git clone https://github.com/sm64-port/sm64-port.git
, which will create a directory sm64-port
and then enter it cd sm64-port
.baserom.<VERSION>.z64
into the repository's root directory for asset extraction, where VERSION
can be us
, jp
, or eu
.make
to build. Qualify the version through make VERSION=<VERSION>
. Add -j4
to improve build speed (hardware dependent based on the amount of CPU cores available).build/<VERSION>_pc/sm64.<VERSION>.f3dex2e.exe
inside the repository.make: gcc: command not found
or make: gcc: No such file or directory
although the packages did successfully install, you probably launched the wrong MSYS2. Read the instructions again. The terminal prompt should contain "MINGW32" or "MINGW64" in purple text, and NOT "MSYS".Failed to open baserom.us.z64!
you failed to place the baserom in the repository. You can write ls
to list the files in the current working directory. If you are in the sm64-port
directory, make sure you see it here.make: *** No targets specified and no makefile found. Stop.
, you are not in the correct directory. Make sure the yellow text in the terminal ends with sm64-port
. Use cd <dir>
to enter the correct directory. If you write ls
you should see all the project files, including Makefile
if everything is correct.pacman -Syu
and pacman -Su
. If the MSYS2 window closes immediately after opening it, restart your computer.gcc -v
, be sure you see Target: i686-w64-mingw32
or Target: x86_64-w64-mingw32
. If you see Target: x86_64-pc-msys
, you either opened the wrong MSYS start menu entry or installed the incorrect gcc package.The code can be debugged using gdb
. On Linux install the gdb
package and execute gdb <executable>
. On MSYS2 install by executing pacman -S winpty gdb
and execute winpty gdb <executable>
. The winpty
program makes sure the keyboard works correctly in the terminal. Also consider changing the -mwindows
compile flag to -mconsole
to be able to see stdout/stderr as well as be able to press Ctrl+C to interrupt the program. In the Makefile, make sure you compile the sources using -g
rather than -O2
to include debugging symbols. See any online tutorial for how to use gdb.
It is possible to build N64 ROMs as well with this repository. See https://github.com/n64decomp/sm64 for instructions.
sm64
├── actors: object behaviors, geo layout, and display lists
├── asm: handwritten assembly code, rom header
│ └── non_matchings: asm for non-matching sections
├── assets: animation and demo data
│ ├── anims: animation data
│ └── demos: demo data
├── bin: C files for ordering display lists and textures
├── build: output directory
├── data: behavior scripts, misc. data
├── doxygen: documentation infrastructure
├── enhancements: example source modifications
├── include: header files
├── levels: level scripts, geo layout, and display lists
├── lib: SDK library code
├── rsp: audio and Fast3D RSP assembly code
├── sound: sequences, sound samples, and sound banks
├── src: C source code for game
│ ├── audio: audio code
│ ├── buffers: stacks, heaps, and task buffers
│ ├── engine: script processing engines and utils
│ ├── game: behaviors and rest of game source
│ ├── goddard: Mario intro screen
│ ├── menu: title screen and file, act, and debug level selection menus
│ └── pc: port code, audio and video renderer
├── text: dialog, level names, act names
├── textures: skybox and generic texture data
└── tools: build tools
Pull requests are welcome. For major changes, please open an issue first to
discuss what you would like to change.
Run clang-format
on your code to ensure it meets the project's coding standards.
Official Discord: https://discord.gg/7bcNTPK
I changed around some things and fixed it
I tried building it with puppycam.patch and after installing the apk it won't open
they're a little too small on my phone. playable, but I end up pressing the wrong buttons at time becuase of how tiny they are. And some are in uncomfortable places
Hi, same guy from the most recent post, another issue here. I tried to build sm64ex branch following all instructions but I get this after doing make --jobs 4. Trying to make the apk afterwards won't work. How can I fix this?
Docker allows for images to be created an ran on host machines in a similar manner to a VM, but without most of the associated performance hits.
The SM64 repository has a Docker image that wraps up all the build tools into an image, so performing the build is a single step, and the host machine is not polluted by any of the dependencies required for the build.
Reducing barriers to building helps reducing barriers for collaboration. I think a Dockerfile would be a nice addition to this repo.
Nintendo CANT ban it then make it a download apk! im waiting
If you want to compile Super Mario 64 for Android on PC you'll probably want to clone this repo instead!
If you want to compile on Android using Termux, follow these instructions in Termux:
Install dependencies:
pkg install git wget make python getconf zip apksigner clang
Clone the repository:
git clone https://github.com/VDavid003/sm64-port-android --branch termux_build
cd sm64-port-android
Copy in your baserom:
Do this using your default file manager (on AOSP, you can slide on the left and there will be a "Termux" option there), or using Termux
termux-setup-storage
#example
cp /storage/emulated/0/baserom.us.z64 ./baserom.us.z64
Get SDL includes:
bash getSDL.sh
Build:
# if you have more cores available, you can increase the --jobs parameter
make --jobs 4
#Will take awhile to extract
#Get files without root
Go to Termux and do
cd --
pwd
chmod 777 /data/data/com.termux -R
Recommend ES File Explorer Pro to go to the APK
Enjoy your apk:
ls -al build/us_pc/sm64.us.f3dex2e.apk
This repo does not include all assets necessary for compiling the game.
A prior copy of the game is required to extract the assets.
sudo apt install -y git build-essential pkg-config libusb-1.0-0-dev libsdl2-dev
.git clone https://github.com/sm64-port/sm64-port.git
, which will create a directory sm64-port
and then enter it cd sm64-port
.baserom.<VERSION>.z64
into the repository's root directory for asset extraction, where VERSION
can be us
, jp
, or eu
.make
to build. Qualify the version through make VERSION=<VERSION>
. Add -j4
to improve build speed (hardware dependent based on the amount of CPU cores available).build/<VERSION>_pc/sm64.<VERSION>.f3dex2e
.pacman -S git make python3 mingw-w64-x86_64-gcc
pacman -S git make python3 mingw-w64-i686-gcc
gcc
.C:\msys64\home\<username>
(home directory). At the prompt, you will see the current working directory in yellow. ~
is an alias for the home directory. You can change the current working directory to My Documents
by entering cd /c/Users/<username>/Documents
.git clone https://github.com/sm64-port/sm64-port.git
, which will create a directory sm64-port
and then enter it cd sm64-port
.baserom.<VERSION>.z64
into the repository's root directory for asset extraction, where VERSION
can be us
, jp
, or eu
.make
to build. Qualify the version through make VERSION=<VERSION>
. Add -j4
to improve build speed (hardware dependent based on the amount of CPU cores available).build/<VERSION>_pc/sm64.<VERSION>.f3dex2e.exe
inside the repository.make: gcc: command not found
or make: gcc: No such file or directory
although the packages did successfully install, you probably launched the wrong MSYS2. Read the instructions again. The terminal prompt should contain "MINGW32" or "MINGW64" in purple text, and NOT "MSYS".Failed to open baserom.us.z64!
you failed to place the baserom in the repository. You can write ls
to list the files in the current working directory. If you are in the sm64-port
directory, make sure you see it here.make: *** No targets specified and no makefile found. Stop.
, you are not in the correct directory. Make sure the yellow text in the terminal ends with sm64-port
. Use cd <dir>
to enter the correct directory. If you write ls
you should see all the project files, including Makefile
if everything is correct.pacman -Syu
and pacman -Su
. If the MSYS2 window closes immediately after opening it, restart your computer.gcc -v
, be sure you see Target: i686-w64-mingw32
or Target: x86_64-w64-mingw32
. If you see Target: x86_64-pc-msys
, you either opened the wrong MSYS start menu entry or installed the incorrect gcc package.The code can be debugged using gdb
. On Linux install the gdb
package and execute gdb <executable>
. On MSYS2 install by executing pacman -S winpty gdb
and execute winpty gdb <executable>
. The winpty
program makes sure the keyboard works correctly in the terminal. Also consider changing the -mwindows
compile flag to -mconsole
to be able to see stdout/stderr as well as be able to press Ctrl+C to interrupt the program. In the Makefile, make sure you compile the sources using -g
rather than -O2
to include debugging symbols. See any online tutorial for how to use gdb.
It is possible to build N64 ROMs as well with this repository. See https://github.com/n64decomp/sm64 for instructions.
sm64
├── actors: object behaviors, geo layout, and display lists
├── asm: handwritten assembly code, rom header
│ └── non_matchings: asm for non-matching sections
├── assets: animation and demo data
│ ├── anims: animation data
│ └── demos: demo data
├── bin: C files for ordering display lists and textures
├── build: output directory
├── data: behavior scripts, misc. data
├── doxygen: documentation infrastructure
├── enhancements: example source modifications
├── include: header files
├── levels: level scripts, geo layout, and display lists
├── lib: SDK library code
├── rsp: audio and Fast3D RSP assembly code
├── sound: sequences, sound samples, and sound banks
├── src: C source code for game
│ ├── audio: audio code
│ ├── buffers: stacks, heaps, and task buffers
│ ├── engine: script processing engines and utils
│ ├── game: behaviors and rest of game source
│ ├── goddard: Mario intro screen
│ ├── menu: title screen and file, act, and debug level selection menus
│ └── pc: port code, audio and video renderer
├── text: dialog, level names, act names
├── textures: skybox and generic texture data
└── tools: build tools
Pull requests are welcome. For major changes, please open an issue first to
discuss what you would like to change.
Run clang-format
on your code to ensure it meets the project's coding standards.
Official Discord: https://discord.gg/7bcNTPK
I changed around some things and fixed it
do what i did on render96; i'm using a galaxy s10. I think the plant "falling back asleep" is the trigger for the crash...
Hi I'm new to github and all this building stuff. I followed the instructions and managed to build the apk. Now I'm trying to get the 60fps patch but it won't do it.
I thought I was supposed to run 'tools/apply_patch.sh 60fps' on MSY2S inside app/jni/src after making the windows version. I get asked if I wish to apply the patch, I type 'y' and I get 'tools/apply_patch.sh: line 16: 60fps: No such file or directory'
What am I doing wrong?
only keyboard works
Would it be possible to autohide the touch control overlay when a controller is connected, similarly to most Android games and emulators ?
I would have tried my hand at it but it seems that the overlay is not built into the Android wrapper, but in the native build itself....
In Android Studio you can directly open a project from GitHub (=git clone). Downloading and compiling SDL and the native part should be regular gradle tasks, so that the whole process runs smoothly.
uh im using termux did all the steps
i have baserom termux folder etc
and when everything is done i press install apk
then gives me an error that says "Apk not found"
When src/pc/gfx/gfx_glx.c tries to call GL/glx.h, the build fails because glx.h does not exist. All the steps (Linux build) went fine until the Compile Natively step. Also, the compile for android thing does not extract resources from the ROM, i don't know if that is intentional or not... Is there a way to fix this? Nobody else seems to have this issue. I am running Pop!_OS 20.04. Am I doing something wrong?
I ran make again and now it is complaining about more missing files.
A bunch of things need SDL2/SDL.h
src/pc/audio/audio_pulse.c needs pulse/pulseaudio.h
src/[c/audio/audio_alsa.c needs alsa/asoundlib.h
I am in app/jni/src when running make.
I did run getSDL.sh in the root of the project, and also the one in app/jni/src.
I think there is something weird, at least when I test it.
It seems different codes work for certain buttons in the gamepad
If I turn the wireless gamepad off and I turn it on again, then only three buttons are recognize when I try to remap then by pressing the button, but it gets a different code.
Is something that only happens to me or it's in general, it would be great that if the gamepad runs out of batter or you turn it off because you pause the game, you can turn it on again and keep playing instead of rebooting
Im using sm64-port-android-base git in attemping to compile android apk using WINDOWS
Q#1:
"Install dependencies:
You'll need everything you need to make Windows builds, and to be able to build Android apps using gradlew.bat. This includes Java JDK (with the JDK being JAVA_HOME) and Android SDK/NDK. Every commmand is executed in MSYS2 unless otherwise noted."
*How do i start installing these dependencies?
Q#2:
"Copy in your baserom: Use the file explorer, or whatever you want, just put it in app/jni/src, and name it like you'd do on the PC port."
cp /path/to/your/baserom.z64 ./app/jni/src/baserom.us.z64
*I placed the rom at C:\msys64\home\Bigao\sm64-port-android-base\app\jni\src
*What exactly should I fill in the example path above? its giving me error that it cant put the path on the Ming64...
*I tried this and gives me an error:
cp: cannot stat '/C/msys64/home/Bigao/sm64-port-android-base/app/src/baserom.us.z64': No such file or directory
Q#3: This is what my Ming64 looks like as I put in the code:
Bigao@InExQuisiTe MINGW64 /C/msys64/home/Bigao/sm64-port-android-base
$ ./gradlew assembleDebug
ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation.
*thats after i put on the code ./getSDL.sh (it went smooth but it just wont build the apk)
Please help!
On the Internet, you can find an image translated into Russian. It works fine in the emulator, however, if you try to build this port with a Russian image, the font (or encoding?) breaks.
Naturally, it is impossible to collect by default, because the hashes are different, but this is easily fixed in the python script. Maybe this is the problem in further compilation? Although there are no errors indicating any problems. I would still like to understand what the problem is and solve it :))
The build is done on Debian.
The image and the finished Apk: https://disk.yandex.ru/d/SfErqbSjZpbKqQ
Platform Windows. When I try to start gradle build with gradlew.bat assembleDebug it give this error.
Task :app:externalNativeBuildDebug FAILED
FAILURE: Build failed with an exception.
Build command failed.
Error while executing process C:\Users\fp782\AppData\Local\Android\Sdk\ndk\21.3.6528147\ndk-build.cmd with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=C:\Users\fp782\Desktop\SM64\android\sm64-port-android-base\app\jni\Android.mk NDK_APPLICATION_MK=C:\Users\fp782\Desktop\SM64\android\sm64-port-android-base\app\jni\Application.mk APP_ABI=x86_64 NDK_ALL_ABIS=x86_64 NDK_DEBUG=1 APP_PLATFORM=android-16 NDK_OUT=C:/Users/fp782/Desktop/SM64/android/sm64-port-android-base/app/build/intermediates/ndkBuild/debug/obj NDK_LIBS_OUT=C:\Users\fp782\Desktop\SM64\android\sm64-port-android-base\app\build\intermediates\ndkBuild\debug\lib -j4 APP_PLATFORM=android-16 C:/Users/fp782/Desktop/SM64/android/sm64-port-android-base/app/build/intermediates/ndkBuild/debug/obj/local/x86_64/libmain.so}
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 1m 39s
17 actionable tasks: 1 executed, 16 up-to-date
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.