Giter Site home page Giter Site logo

sm64-port-android-base's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sm64-port-android-base's Issues

Some advice

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

Windows/Linux signed versions

How can I sign this for Windows/Linux versions? Method in Readme with gradelw.bat doesn't seem to comply the signature process

Cannot build Android app - gradle fails on all platforms

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:

  • build-tools;28.0.2
  • cmake;3.10.2.4988404
  • emulator
  • ndk-bundle
  • ndk;22.0.7026061
  • patcher;v4
  • platform-tools
  • platforms;android-26

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

Compilation error (Nightly + Render96 1.4.2)

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.

Black screen of death.

Hi, after compiling the port, I ran it and it was on black screen. I touched anything and nothing. Please help me. You can dm me too on Twitter.
Screenshot_20210208_151247_com vdavid003 sm64port

Xbox Series 2 controller not working

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)

Issue on screens with more than 60hz

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?

App crashes with Sigsegv on master branch

Environment:
OS: Ubuntu 20.04
Android SDK version: 26
Device: Pixel 2 & Amazon Fire Tablet 7
SM64 Rom version: US

Issue:
The apk builds correctly, however running the installed application causes a SIGSEGV fault:
image
The fault appears to be located in load.c while running PATCH_SOUND

NOWDRAWDISTANCE, BETTERCAMERA and TOUCH_CONTROLS flags dont seem to work

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?

The Builder is coming

I think is gotta be in 1 more day the updates u made is in 6 days but now is more days I guess

Compilation error in termux

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.

Termux compiles, but lvl 2 is broken!....

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

Build .apk don't work (linux and docker) on Ubuntu

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

No such file or directory

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?

Punch when screen tapped

When screen tapped u punch not pressing the B button its anoyinng that make me not Able to longjump

Building error

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.

Fails to compile (java.lang.NullPointerException (no error message)

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.

  • What went wrong:
    A problem occurred configuring project ':app'.

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).

Poor performance on Oneplus 8 Pro

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?

Fixed the termux build issues

Super Mario 64 Android Port

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

Super Mario 64 Port

  • This repo contains a full decompilation of Super Mario 64 (J), (U), and (E) with minor exceptions in the audio subsystem.
  • Naming and documentation of the source code and data structures are in progress.
  • Efforts to decompile the Shindou ROM steadily advance toward a matching build.
  • Beyond Nintendo 64, it can also target Linux and Windows natively.

This repo does not include all assets necessary for compiling the game.
A prior copy of the game is required to extract the assets.

Building native executables

Linux

  1. Install prerequisites (Ubuntu): sudo apt install -y git build-essential pkg-config libusb-1.0-0-dev libsdl2-dev.
  2. Clone the repo: git clone https://github.com/sm64-port/sm64-port.git, which will create a directory sm64-port and then enter it cd sm64-port.
  3. Place a Super Mario 64 ROM called baserom.<VERSION>.z64 into the repository's root directory for asset extraction, where VERSION can be us, jp, or eu.
  4. Run 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).
  5. The executable binary will be located at build/<VERSION>_pc/sm64.<VERSION>.f3dex2e.

Windows

  1. Install and update MSYS2, following all the directions listed on https://www.msys2.org/.
  2. From the start menu, launch MSYS2 MinGW and install required packages depending on your machine (do NOT launch "MSYS2 MSYS"):
  • 64-bit: Launch "MSYS2 MinGW 64-bit" and install: pacman -S git make python3 mingw-w64-x86_64-gcc
  • 32-bit (will also work on 64-bit machines): Launch "MSYS2 MinGW 32-bit" and install: pacman -S git make python3 mingw-w64-i686-gcc
  • Do NOT by mistake install the package called simply gcc.
  1. The MSYS2 terminal has a current working directory that initially is 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.
  2. Clone the repo: git clone https://github.com/sm64-port/sm64-port.git, which will create a directory sm64-port and then enter it cd sm64-port.
  3. Place a Super Mario 64 ROM called baserom.<VERSION>.z64 into the repository's root directory for asset extraction, where VERSION can be us, jp, or eu.
  4. Run 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).
  5. The executable binary will be located at build/<VERSION>_pc/sm64.<VERSION>.f3dex2e.exe inside the repository.

Troubleshooting

  1. If you get 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".
  2. If you get 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.
  3. If you get 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.
  4. If you get any error, be sure MSYS2 packages are up to date by executing pacman -Syu and pacman -Su. If the MSYS2 window closes immediately after opening it, restart your computer.
  5. When you execute 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.

Debugging

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.

ROM building

It is possible to build N64 ROMs as well with this repository. See https://github.com/n64decomp/sm64 for instructions.

Project Structure

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

Contributing

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

Be able to edit/resize the buttons

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

Can't build sm64ex

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?

Create a Dockerfile to ease build process

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.

Changed a few things

Super Mario 64 Android Port

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

Super Mario 64 Port

  • This repo contains a full decompilation of Super Mario 64 (J), (U), and (E) with minor exceptions in the audio subsystem.
  • Naming and documentation of the source code and data structures are in progress.
  • Efforts to decompile the Shindou ROM steadily advance toward a matching build.
  • Beyond Nintendo 64, it can also target Linux and Windows natively.

This repo does not include all assets necessary for compiling the game.
A prior copy of the game is required to extract the assets.

Building native executables

Linux

  1. Install prerequisites (Ubuntu): sudo apt install -y git build-essential pkg-config libusb-1.0-0-dev libsdl2-dev.
  2. Clone the repo: git clone https://github.com/sm64-port/sm64-port.git, which will create a directory sm64-port and then enter it cd sm64-port.
  3. Place a Super Mario 64 ROM called baserom.<VERSION>.z64 into the repository's root directory for asset extraction, where VERSION can be us, jp, or eu.
  4. Run 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).
  5. The executable binary will be located at build/<VERSION>_pc/sm64.<VERSION>.f3dex2e.

Windows

  1. Install and update MSYS2, following all the directions listed on https://www.msys2.org/.
  2. From the start menu, launch MSYS2 MinGW and install required packages depending on your machine (do NOT launch "MSYS2 MSYS"):
  • 64-bit: Launch "MSYS2 MinGW 64-bit" and install: pacman -S git make python3 mingw-w64-x86_64-gcc
  • 32-bit (will also work on 64-bit machines): Launch "MSYS2 MinGW 32-bit" and install: pacman -S git make python3 mingw-w64-i686-gcc
  • Do NOT by mistake install the package called simply gcc.
  1. The MSYS2 terminal has a current working directory that initially is 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.
  2. Clone the repo: git clone https://github.com/sm64-port/sm64-port.git, which will create a directory sm64-port and then enter it cd sm64-port.
  3. Place a Super Mario 64 ROM called baserom.<VERSION>.z64 into the repository's root directory for asset extraction, where VERSION can be us, jp, or eu.
  4. Run 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).
  5. The executable binary will be located at build/<VERSION>_pc/sm64.<VERSION>.f3dex2e.exe inside the repository.

Troubleshooting

  1. If you get 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".
  2. If you get 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.
  3. If you get 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.
  4. If you get any error, be sure MSYS2 packages are up to date by executing pacman -Syu and pacman -Su. If the MSYS2 window closes immediately after opening it, restart your computer.
  5. When you execute 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.

Debugging

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.

ROM building

It is possible to build N64 ROMs as well with this repository. See https://github.com/n64decomp/sm64 for instructions.

Project Structure

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

Contributing

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

App crash in the second world

Hello I compile this awesome port using sm64 android builder. Everything seemed ok but it crash when I tried to go to this point.
Branch: master
Patches: 60 fps patch
Device: Xiaomi mi a3 android 10 Snapdragon 665
Screenshot_20200905-191242

Can't apply 60fps patch

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?

c stick and b button working weird

hello, when i run the game, it seems normal, but when i press the c stick, before i move it the b button activates. the b button does nothing.
i have those options
Screenshot_20210816-073533
edit:i tried disabling 60fps patch like a post said, did not work

Autohiding overlay when controller is connected

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....

Apk not found

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"

GL/glx.h: No such file or directory (Linux) (plus other missing files)

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.

When I reconnect wireless controlling it doesn't work

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

Stuck on Gradle

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!

Compile with Russian baserom

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
Screenshot_20210315-203228_Super_Mario_64

Error when trying to start Gradle Build

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.

  • What went wrong:
    Execution failed for task ':app:externalNativeBuildDebug'.

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.