Coder Social home page Coder Social logo

sm64ex's Introduction

sm64ex

Fork of sm64-port/sm64-port with additional features.

Feel free to report bugs and contribute, but remember, there must be no upload of any copyrighted asset. Run ./extract_assets.py --clean && make clean or make distclean to remove ROM-originated content.

Please contribute first to the nightly branch. New functionality will be merged to master once they're considered to be well-tested.

Read this in other languages: Español, Português, 简体中文 or Bahasa Melayu.

New features

  • Options menu with various settings, including button remapping.
  • Optional external data loading (so far only textures and assembled soundbanks), providing support for custom texture packs.
  • Optional analog camera and mouse look (using Puppycam).
  • Optional OpenGL1.3-based renderer for older machines, as well as the original GL2.1, D3D11 and D3D12 renderers from Emill's n64-fast3d-engine.
  • Option to disable drawing distances.
  • Optional model and texture fixes (e.g. the smoke texture).
  • Skip introductory Peach & Lakitu cutscenes with the --skip-intro CLI option
  • Cheats menu in Options (activate with --cheats or by pressing L thrice in the pause menu).
  • Support for both little-endian and big-endian save files (meaning you can use save files from both sm64-port and most emulators), as well as an optional text-based save format.

Recent changes in Nightly have moved the save and configuration file path to %HOMEPATH%\AppData\Roaming\sm64ex on Windows and $HOME/.local/share/sm64ex on Linux. This behaviour can be changed with the --savepath CLI option. For example --savepath . will read saves from the current directory (which not always matches the exe directory, but most of the time it does); --savepath '!' will read saves from the executable directory.

Building

For building instructions, please refer to the wiki.

Make sure you have MXE first before attempting to compile for Windows on Linux and WSL. Follow the guide on the wiki.

sm64ex's People

Contributors

ahouts avatar aloxado320 avatar aswgit avatar bkacjios avatar chaosex avatar danielah05 avatar dantheman827 avatar fgsfdsfgs avatar heavenvolkoff avatar hengifettlich avatar hunterzero99 avatar ineedhelpbad avatar ivandsm avatar jan200101 avatar jmcerrejon avatar kiritodv avatar matt-kempster avatar mmuman avatar mode8fx avatar radiden avatar rawr51919 avatar reonu avatar s4ys369 avatar uncletrunks avatar vanfanel avatar vrmiguel avatar wabberz avatar y0shin avatar yksoft1 avatar zrckr avatar

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

sm64ex's Issues

Windows 10 MYSYS2 Building error

After following the instructions for windows, the last step (running make in the root) fails, with this error:

collect2.exe: error: ld returned 1 exit status
make: *** [Makefile:749: build/us_pc/sm64.us.f3dex2e.exe] Error 1
rm build/us_pc/bin/bidw_skybox.c build/us_pc/bin/ccm_skybox.c build/us_pc/bin/bbh_skybox.c build/us_pc/bin/ clouds_skybox.c build/us_pc/bin/wdw_skybox.c build/us_pc/bin/water_skybox.c build/us_pc/bin/bits_skybox.c b uild/us_pc/bin/bitfs_skybox.c build/us_pc/bin/ssl_skybox.c build/us_pc/bin/cloud_floor_skybox.c build/us_pc /sound/sequences/00_sound_player.o

EDIT: I have tried using PATH=/mingw32/bin:/mingw64/bin:$PATH make -j6 instead of just make and it still fails.

Feature Request: Load meshes and textures from external files at runtime

User story
As a user who does not know how to compile the project, and a modder who would like to replace the meshes (models) and textures used in the game:
I would like to be able to place a file with a certain name, in a certain folder location, such that it will be loaded by the game instead of the original asset.

This will greatly help modding efforts, as seen in other games such as Skyrim.

Description of feature
When loading an asset (in particular any Mesh or Texture), first check for a corresponding file in an external location. If file is present, load that. If file is NOT present, load the compiled (ROM) data.

For a vanilla user, this would have no effect - no external files are present and therefore only the compiled assets are used.
But users can then choose to override a specific model or texture (for example - Mario's head model) with a higher-poly model, or another model entirely.

Expected behavior
Out of the box, user-facing behavior does not change.
When a user places a file of the correct format in the correct location, it will then be loaded in place of the corresponding model at runtime.

Example
Folder structure, file name, and file format are just placeholders:

Root folder

mario.exe
Data folder

MarioModel folder

MarioHead.obj

Notes
There would need to be a convention for folder structures and/or filenames. Hopefully the original ROM has assets organized by human readable names, in which case those filenames could be re-used for loading external assets. If the ROM does not have any such human-readable organization for assets, either a new convention could be created, or the non-human-readable memory addresses could be used as filenames if necessary. In the latter case, the community would need to create a list of these addresses and their contents.

Stars displayed on fresh save

Describe the bug
In the pause menu on a fresh start, there should be no stars (see screenshot), but instead a bunch of levels with stars are displayed

To Reproduce

  1. Start new game
  2. Press pause menu

Expected behavior
No stars displayed

Screenshots
Wrong behaviour:
wrong behaviour
Correct behaviour:
correct behaviour

Desktop (please complete the following information):

  • Windows 10 LTSC
  • Compiled on latest commit

"Vertex shader compilation failed" when running on Raspberry Pi 3

Describe the bug
The game seemed to compile without issue on my Raspberry Pi 3 (original model, not the improved + version), but when running the binary, I get the following output:

./build/us_pc/sm64.us.f3dex2e.arm 
Loading configuration from 'sm64config.txt'
Config file 'sm64config.txt' not found. Creating it.
Saving configuration to 'sm64config.txt'
Vertex shader compilation failed

Aborted

After the first run, I get the following:

./build/us_pc/sm64.us.f3dex2e.arm 
Loading configuration from 'sm64config.txt'
option: 'fullscreen', value: 'false'
option: 'key_a', value: '38'
option: 'key_b', value: '51'
option: 'key_start', value: '57'
option: 'key_l', value: '52'
option: 'key_r', value: '54'
option: 'key_z', value: '37'
option: 'key_cup', value: '328'
option: 'key_cdown', value: '336'
option: 'key_cleft', value: '331'
option: 'key_cright', value: '333'
option: 'key_stickup', value: '17'
option: 'key_stickdown', value: '31'
option: 'key_stickleft', value: '30'
option: 'key_stickright', value: '32'
Vertex shader compilation failed

Aborted

To Reproduce
Steps to reproduce the behavior:

  1. Compile with TARGET_RPI (I simply built the US version)
  2. Attempt to launch the resulting binary (from terminal)
  3. See output.

Expected behavior
I don't know about "expected" since I'm not sure if Pi building is considered ready, I really just wanted to see if it would work, but the ideal behavior would probably be that the game would work. :)

Desktop (please complete the following information):

  • OS: Raspbian
  • Version: 9 (Stretch)

Additional context
I tried compiling with and without TARGET_BITS=64.

Feature Request: option to build n64 rom

Yes I know this is sm64pc, but I feel this would be a whole lot more useful if this could still build an n64 rom as being able to develop a romhack for multiple targets would be useful to many. If this is feasible please consider (and if by any chance this feature is there and I am just too stupid to realize give me a virtual slap.)

Bug: Title Screen has no Mario Hand Cursor

Describe the bug
The title screen does not have the Mario hand cursor that appears in the original. It still works, but there is no graphic that displays where it is.

To Reproduce
Press A on the title screen.

Expected behavior
There should be a Mario hand cursor on the title screen.

Desktop (please complete the following information):

  • OS: Windows (x86 build)

Screenshots
image
image

move readme to wiki

the readme is getting really cramped, we should work on moving it to the wiki.

Invert axis options have the opposite effect on gamepad vs mouse

Describe the bug
If you "invert" the axis on a gamepad, then the game will play with normal (non-inverted) camera controls. This is weird but whatever.

The thing is, when playing with a mouse it does work as it should: Enabling axis inversion means having inverted camera, and disabling it means having regular camera controls. This means that if you "invert" the axis in order to play with a gamepad with non-inverted camera controls, then mouse look will have inverted camera controls.

Either the game should have separate settigns for gamepad and mouse, or this setting should act the same for both gamepad and mouse.

To Reproduce
Enable inverted on both X and Y axis
Use a gamepad. It has non-inverted camera controls.
Then use mouse look. It has inverted camera controls.

Expected behavior
Either both are inverted or both are not inverted.

Screenshots
Not applicable

Desktop (please complete the following information):

  • Windows 10

Smartphone (please complete the following information):
Additional context
Add any other context about the problem here.

/usr/bin/ld: cannot find -lasound

Describe the bug
Compiling on Ubuntu targetting Windows x64 results in:

......
/dynlists_mario_eyebrows_mustache.o build/us_pc/src/goddard/dynlists/anim_group_1.o -march=native -Llib -lpthread -lglew32 sdl2-config --static-libs -lm -lglu32 -lsetupapi -ldinput8 -luser32 -lgdi32 -limm32 -lole32 -loleaut32 -lshell32 -lwinmm -lversion -luuid -lopengl32 -no-pie -static
/usr/bin/ld: cannot find -lglew32
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libSDL2.a(SDL_dynapi.o): in function `SDL_InitDynamicAPI':
(.text+0x2552): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: cannot find -lasound
collect2: error: ld returned 1 exit status
make: *** [Makefile:735: build/us_pc/sm64.us.f3dex2e.exe] Error 1

To Reproduce
Steps to reproduce the behavior:
make VERSION=us WINDOWS_BUILD=1

Expected behavior
Compile successfully

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • Ubuntu
  • Version 20.04 LTS

Additional context
Says it cannot find lasound but I think it's already installed with prerequisites?

Border flickering on menu transitions flickering with non 4:3 aspect ratio

Hi, when the fade to / from white transitions to / from menu occur, there's a small flicker to black on the borders over 4:3 image, I've been testing the script.c and geo.c logic for the level select menu but can't identify the cause yet,
testing on opengl pc / switch, haven't tried directx btw :/

Build for Windows on WSL

I have followed these instructions using WSL. Once it finished building, there were no executable files in the build folder. What file types should I expect to be there if not exe, and how do I then run the game?
image

EDIT: In addition, can I build on windows 10 without setting up MYSYS2, for example, using Git for Windows?

Failing to WINDOWS_BUILD=1

havving issues with deps
sage: /usr/bin/sdl2-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--cflags] [--libs]
/usr/bin/ld: cannot find -lglew32
/usr/bin/ld: cannot find -lglu32
/usr/bin/ld: cannot find -lsetupapi
/usr/bin/ld: cannot find -ldinput8
/usr/bin/ld: cannot find -luser32
/usr/bin/ld: cannot find -lgdi32
/usr/bin/ld: cannot find -limm32
/usr/bin/ld: cannot find -lole32
/usr/bin/ld: cannot find -loleaut32
/usr/bin/ld: cannot find -lshell32
/usr/bin/ld: cannot find -lwinmm
/usr/bin/ld: cannot find -lversion
/usr/bin/ld: cannot find -luuid
/usr/bin/ld: cannot find -lopengl32
collect2: error: ld returned 1 exit status
make: *** [Makefile:735: build/us_pc/sm64.us.f3dex2e.exe] Error 1
[lavender@ar4 sm64pc]$ sudo make WINDOWS_BUILD=1 -j8

i also have all these deps

seems to be the same issue as this case
https://unix.stackexchange.com/questions/423821/gcc-usr-bin-ld-cannot-find-lglut32-lopengl32-lglu32-lfreegut-but-these
but ive givin it a shot and cant seem to figure it out

Expected behavior
for it to build normally

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Manjaro
  • kernel56

Additional context
im on a linux machine trying to build the windows exe
fail.txt

heres my discord if someone is up to vc and help MissLavender#5032

Error while compiling for web.

I get an error while compiling for web, i have installed emsdk from AUR, but i get the following error:

make: emcc: No such file or directory.
make: *** [Makefile:735: build/us_web/src/engine/behavior_script.o] Error 127

  • OS: Arch Linux 64-bit

Feature request: rom extraction afer compilation

It would be nice if rom data extraction could be handled separately from compilation, since this would allow us to build official packages without any rom data. It would also open the possibility for Linux distro agnostic packages such as AppImage and others.

Building for WEB

Describe the bug
After a successful Windows build, I installed emsdk and attempted to build for web. This was the result:

$ make TARGET_WEB=1
make: Nothing to be done for 'default'.

To Reproduce
Steps to reproduce the behavior:

  1. Follow the building guide for windows, build it, and verify that it runs
  2. Install emsdk
  3. type make TARGET_WEB=1
  4. See error

Expected behavior
It should build for web, or at least throw an error.

Desktop (please complete the following information):

  • OS: Msys2 running mingw64 under Windows 10
  • Browser
    N/A

Raspberry Pi Zero W (GPi Case): Black screen on start

After some trial and error on other platforms I have managed to compile it straight on my Raspberry Pi Zero running Retropie/Raspbian (which took a good while), however it does not show any graphics. Input and audio seem to work fine, but no video. The console also doesn't note any errors:

pi@retropie:~ $ ./RetroPie/roms/ports/sm64/sm64
Loading configuration from 'sm64config.txt'
option: 'fullscreen', value: 'true'
option: 'key_a', value: '38'
option: 'key_b', value: '51'
option: 'key_start', value: '57'
option: 'key_r', value: '54'
option: 'key_z', value: '37'
option: 'key_cup', value: '328'
option: 'key_cdown', value: '336'
option: 'key_cleft', value: '331'
option: 'key_cright', value: '333'
option: 'key_stickup', value: '17'
option: 'key_stickdown', value: '31'
option: 'key_stickleft', value: '30'
option: 'key_stickright', value: '32'
^CSaving configuration to 'sm64config.txt'
pi@retropie:~ $

One thing I had to change to get it to compile was to modify the Makefile, because gcc complained that it couldn't find/handle the march "armv6zk+fp", so I modified it to replace the offending line

            OPT_FLAGS := -march=armv6zk+fp -mfpu=vfp -Ofast

with

            OPT_FLAGS := -march=armv6zk -mfpu=vfp -Ofast

Also (because I copied it over from Windows via WinSCP, I guess) I had to recursively make the entire project folder executable and take ownership of it

Otherwise I obeyed the compilation guide to the letter; installed the dependencies and ran "make TARGET_RPI=1"

build sm64 for macOS 10.15.4

Could be possible to build the game natively for macOS platform using only Free Software tools (no Xcode)?
EDITED: testing on macOS 10.15.4 Catalina Supplemental Update

Disable BETTERCAMERA by default?

After testing a few minutes, it doesn't feel comfortable to use.

Most of the time, the camera is stuck in a wall when you enter a new room.
It also breaks the auto camera movement (force you to move the camera permanently yourself)

It's only my opinion but I feel like it should be disabled in the Makefile.
I don't know if other people are ok with the Better camera feature?

Testing Branch

So I compiled the testing branch and ran the exe but I do not see the new camera features, mouse support or new menu. Did I do something wrong?

Build fail, missing msvcrt

I'm trying to build the testing branch with mingw64, but it error's out with

/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lmsvcrt

To Reproduce
make -j8 TARGET_N64=0

  • OS: Windows 10

Working fine with Master branch (though Master branch has a couple of bugs atm).

lglew32 and lasound Missing

I'm compiling on Ubuntu 18.04 on WSL and using mingw to make a windows build. During the main g++ compile part, it exits with these errors:

/usr/bin/ld: cannot find -lglew32
/usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/libSDL2.a(SDL_dynapi.o): In function `SDL_InitDynamicAPI':
(.text+0x2282): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: cannot find -lasound
collect2: error: ld returned 1 exit status
Makefile:892: recipe for target 'build/us_pc/sm64.us.f3dex2e.exe' failed
make: *** [build/us_pc/sm64.us.f3dex2e.exe] Error 1

Not sure if it is a WSL problem or the repository itself. Both libraries are installed.

Unable to compile testing branch on Ubuntu

Getting the following errors when attempting to compile:
/usr/bin/ld: skipping incompatible //usr/lib/x86_64-linux-gnu/libGL.so when searching for -lGL
/usr/bin/ld: cannot find -lGL
/usr/bin/ld: skipping incompatible //usr/lib/x86_64-linux-gnu/libSDL2.so when searching for -lSDL2
/usr/bin/ld: skipping incompatible //usr/lib/x86_64-linux-gnu/libSDL2.a when searching for -lSDL2

Both of these libs are installed, and I also tried ln -s to not avail

Running Ubuntu 18.04 x86_64 Linux 4.15.0-99-generic

Problem in tabledesign_CFLAGS, command not found

when I run tabledesign_CFLAGS := -Wno-uninitialized -laudiofile -lstdc++ I get this:

$ tabledesign_CFLAGS := -Wno-uninitialized -laudiofile -lstdc++

bash: tabledesign_CFLAGS: command not found

Any idea on how to solve this "command not found" problem?

Problem with autoreconf

When running autoreconf for libaudiofile on MSYS2, I get this:

$ autoreconf -i
main::scan_file() called too early to check prototype at /usr/bin/aclocal-1.11 line 644.
previous directory /n/sm64x86/sm64pc/tools/audiofile-0.3.6 changed before entering /tmp/ar9xgYG4/am4t6ctrlf, expected dev=3768524088 ino=2251799814104932, actual dev=114811888 ino=7854401721473527134, aborting. at /usr/share/autoconf/Autom4te/General.pm line 196.
END failed--call queue aborted.
aclocal-1.11: /usr/bin/autom4te failed with exit status: 255
autoreconf: aclocal failed with exit status: 255
previous directory /n/sm64x86/sm64pc/tools/audiofile-0.3.6 changed before entering /tmp/ar9xgYG4, expected dev=3768524088 ino=2814749767526242, actual dev=114811888 ino=7854401721473527134, aborting. at /usr/share/autoconf/Autom4te/General.pm line 196.
END failed--call queue aborted.

Any ideas on what this is?

Fullscreen bug

On Win10 in fullscreen, some pixels are not aligned properly.

screen

😭Dont store config and data in $HOME😭

I made a new ArchLinux package, and that saves the binary in /us/bin/ . So when i run it from home (or a launcher), i get sm64_save_file.bin and sm64config.txt saved in ~/ which is very messy. (To store that in /usr/bin/, isn't a really good solution either). So please make it that it respects "XDG user directories", make it like like this:
sm64config.txt should stay in $XDG_CONFIG_HOME (aka $HOME/.config )
sm64_save_file.bin should stay in $XDG_DATA_HOME (aka $HOME/.local/share)

"unknown argument" while compiling for web

I'm trying to build for web but I'm getting a bunch of errors while compiling, all related to clang-10: error: unknown argument: '-fignore-exceptions'
These are just two at the end of the output

clang-10: error: unknown argument: '-fignore-exceptions'
clang-10: error: unknown argument: '-fignore-exceptions'
emcc: error: '/sbin/clang -target wasm32-unknown-emscripten -D__EMSCRIPTEN_major__=1 -D__EMSCRIPTEN_minor__=39 -D__EMSCRIPTEN_tiny__=13 -D_LIBCPP_ABI_VERSION=2 -Dunix -D__unix -D__unix__ -Werror=implicit-function-declaration -Xclang -nostdsysteminc -Xclang -isystem/usr/lib/emsdk/upstream/emscripten/system/include/compat -Xclang -isystem/usr/lib/emsdk/upstream/emscripten/system/include -Xclang -isystem/usr/lib/emsdk/upstream/emscripten/system/include/libc -Xclang -isystem/usr/lib/emsdk/upstream/emscripten/system/lib/libc/musl/arch/emscripten -Xclang -isystem/usr/lib/emsdk/upstream/emscripten/system/local/include -Xclang -isystem/home/robin/.emscripten_cache/wasm/include -c -I/home/robin/.emscripten_cache/wasm/include/SDL2 -O2 -DUSING_GENERATED_CONFIG_H -w -DEMSCRIPTEN -fignore-exceptions /home/robin/.emscripten_ports/sdl2/SDL2-version_20/src/thread/generic/SDL_systhread.c -Xclang -isystem/usr/lib/emsdk/upstream/emscripten/system/include/SDL -c -o /home/robin/.emscripten_cache/wasm/ports-builds/sdl2/src/thread/generic/SDL_systhread.c.o -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr' failed (1)
emcc: error: '/sbin/clang -target wasm32-unknown-emscripten -D__EMSCRIPTEN_major__=1 -D__EMSCRIPTEN_minor__=39 -D__EMSCRIPTEN_tiny__=13 -D_LIBCPP_ABI_VERSION=2 -Dunix -D__unix -D__unix__ -Werror=implicit-function-declaration -Xclang -nostdsysteminc -Xclang -isystem/usr/lib/emsdk/upstream/emscripten/system/include/compat -Xclang -isystem/usr/lib/emsdk/upstream/emscripten/system/include -Xclang -isystem/usr/lib/emsdk/upstream/emscripten/system/include/libc -Xclang -isystem/usr/lib/emsdk/upstream/emscripten/system/lib/libc/musl/arch/emscripten -Xclang -isystem/usr/lib/emsdk/upstream/emscripten/system/local/include -Xclang -isystem/home/robin/.emscripten_cache/wasm/include -c -I/home/robin/.emscripten_cache/wasm/include/SDL2 -O2 -DUSING_GENERATED_CONFIG_H -w -DEMSCRIPTEN -fignore-exceptions /home/robin/.emscripten_ports/sdl2/SDL2-version_20/src/thread/generic/SDL_systls.c -Xclang -isystem/usr/lib/emsdk/upstream/emscripten/system/include/SDL -c -o /home/robin/.emscripten_cache/wasm/ports-builds/sdl2/src/thread/generic/SDL_systls.c.o -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr' failed (1)

I'm also getting a bunch of what looks like python error, possibly related to the issues above.

multiprocessing.pool.RemoteTraceback: 
"""
Traceback (most recent call last):
  File "/usr/lib/python3.8/multiprocessing/pool.py", line 125, in worker
    result = (True, func(*args, **kwds))
  File "/usr/lib/python3.8/multiprocessing/pool.py", line 48, in mapstar
    return list(map(*args))
  File "/usr/lib/emsdk/upstream/emscripten/tools/system_libs.py", line 89, in run_one_command
    shared.run_process(cmd, stdout=stdout, stderr=stderr, env=safe_env)
  File "/usr/lib/emsdk/upstream/emscripten/tools/shared.py", line 189, in run_process
    ret = subprocess.run(cmd, check=check, input=input, *args, **kw)
  File "/usr/lib/python3.8/subprocess.py", line 512, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/sbin/python3', '/usr/lib/emsdk/upstream/emscripten/emcc.py', '-c', '/home/robin/.emscripten_ports/sdl2/SDL2-version_20/src/SDL_dataqueue.c', '-o', '/home/robin/.emscripten_cache/wasm/ports-builds/sdl2/src/SDL_dataqueue.c.o', '-I/home/robin/.emscripten_cache/wasm/include/SDL2', '-O2', '-DUSING_GENERATED_CONFIG_H', '-w']' returned non-zero exit status 1.
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/lib/emsdk/upstream/emscripten/emcc.py", line 3982, in <module>
    sys.exit(run(sys.argv))
  File "/usr/lib/emsdk/upstream/emscripten/emcc.py", line 2118, in run
    cmd = get_clang_command(input_files)
  File "/usr/lib/emsdk/upstream/emscripten/emcc.py", line 2112, in get_clang_command
    args = system_libs.process_args(args, shared.Settings)
  File "/usr/lib/emsdk/upstream/emscripten/tools/system_libs.py", line 1958, in process_args
    args = port.process_args(Ports, args, settings, shared)
  File "/usr/lib/emsdk/upstream/emscripten/tools/ports/sdl2.py", line 98, in process_args
    get(ports, settings, shared)
  File "/usr/lib/emsdk/upstream/emscripten/tools/ports/sdl2.py", line 84, in get
    return [shared.Cache.get(libname, create, what='port')]
  File "/usr/lib/emsdk/upstream/emscripten/tools/cache.py", line 131, in get
    temp = creator()
  File "/usr/lib/emsdk/upstream/emscripten/tools/ports/sdl2.py", line 79, in create
    ports.run_commands(commands)
  File "/usr/lib/emsdk/upstream/emscripten/tools/system_libs.py", line 1753, in run_commands
    run_build_commands([add_args(c) for c in commands])
  File "/usr/lib/emsdk/upstream/emscripten/tools/system_libs.py", line 103, in run_build_commands
    pool.map_async(run_one_command, commands, chunksize=1).get(999999)
  File "/usr/lib/python3.8/multiprocessing/pool.py", line 768, in get
    raise self._value
subprocess.CalledProcessError: Command '['/sbin/python3', '/usr/lib/emsdk/upstream/emscripten/emcc.py', '-c', '/home/robin/.emscripten_ports/sdl2/SDL2-version_20/src/SDL_dataqueue.c', '-o', '/home/robin/.emscripten_cache/wasm/ports-builds/sdl2/src/SDL_dataqueue.c.o', '-I/home/robin/.emscripten_cache/wasm/include/SDL2', '-O2', '-DUSING_GENERATED_CONFIG_H', '-w']' returned non-zero exit status 1.
make: *** [Makefile:734: build/us_web/src/engine/behavior_script.o] Error 1

Edit: I'm on Arch Linux, have installed all the required packages including emsdk

Mouse look breaks when shooting mario onto a pole or tree

When playing with the mouse enabled the mouse no longer functions for turning the camera after shooting mario onto a pole or tree. It gets stuck directly behind him, and fixes itself by returning to the cannon and firing normally, or by exiting the level. Can be reproduced on all levels tested.

How i can compile under Slackware(64) 14.2 & Configure Controls ?

Hi there i am trying to compiler under Slackwares 14.2 (32 Bits & 64 Bits i have two versions in two diferents partitions).

i try the follow :

cd /tmp 
git clone https://github.com/sm64pc/sm64pc
cd sm64pc

put the base-game on the folder

Under Slackware 14.2 (32 Bits) :
export {C,CXX}FLAGS='-O2' ; export OPTFLAGS='-O2'

Under Slackware 14.2 (64 Bits) :
export {C,CXX}FLAGS='-O2 -fPIC' ; export OPTFLAGS='-O2-fPIC'

after i try to
make

i notice i got an error and i try to make it again, this is the final output :

$ make
tools/skyconv --type sky --split textures/skyboxes/ccm.png build/us_pc/bin
gcc -c -g  -I include -I build/us_pc -I build/us_pc/include -I src -I . -DVERSION_US -DNON_MATCHING -DAVOID_UB -DF3DEX_GBI_2E -fno-strict-aliasing -fwrapv `sdl2-config --cflags` -o build/us_pc/bin/ccm_skybox.o build/us_pc/bin/ccm_skybox.c
tools/skyconv --type sky --split textures/skyboxes/clouds.png build/us_pc/bin
gcc -c -g  -I include -I build/us_pc -I build/us_pc/include -I src -I . -DVERSION_US -DNON_MATCHING -DAVOID_UB -DF3DEX_GBI_2E -fno-strict-aliasing -fwrapv `sdl2-config --cflags` -o build/us_pc/bin/clouds_skybox.o build/us_pc/bin/clouds_skybox.c
tools/skyconv --type sky --split textures/skyboxes/bitfs.png build/us_pc/bin
gcc -c -g  -I include -I build/us_pc -I build/us_pc/include -I src -I . -DVERSION_US -DNON_MATCHING -DAVOID_UB -DF3DEX_GBI_2E -fno-strict-aliasing -fwrapv `sdl2-config --cflags` -o build/us_pc/bin/bitfs_skybox.o build/us_pc/bin/bitfs_skybox.c
tools/skyconv --type sky --split textures/skyboxes/bits.png build/us_pc/bin
gcc -c -g  -I include -I build/us_pc -I build/us_pc/include -I src -I . -DVERSION_US -DNON_MATCHING -DAVOID_UB -DF3DEX_GBI_2E -fno-strict-aliasing -fwrapv `sdl2-config --cflags` -o build/us_pc/bin/bits_skybox.o build/us_pc/bin/bits_skybox.c
tools/skyconv --type sky --split textures/skyboxes/cloud_floor.png build/us_pc/bin
gcc -c -g  -I include -I build/us_pc -I build/us_pc/include -I src -I . -DVERSION_US -DNON_MATCHING -DAVOID_UB -DF3DEX_GBI_2E -fno-strict-aliasing -fwrapv `sdl2-config --cflags` -o build/us_pc/bin/cloud_floor_skybox.o build/us_pc/bin/cloud_floor_skybox.c
tools/skyconv --type sky --split textures/skyboxes/ssl.png build/us_pc/bin
gcc -c -g  -I include -I build/us_pc -I build/us_pc/include -I src -I . -DVERSION_US -DNON_MATCHING -DAVOID_UB -DF3DEX_GBI_2E -fno-strict-aliasing -fwrapv `sdl2-config --cflags` -o build/us_pc/bin/ssl_skybox.o build/us_pc/bin/ssl_skybox.c
tools/skyconv --type sky --split textures/skyboxes/water.png build/us_pc/bin
gcc -c -g  -I include -I build/us_pc -I build/us_pc/include -I src -I . -DVERSION_US -DNON_MATCHING -DAVOID_UB -DF3DEX_GBI_2E -fno-strict-aliasing -fwrapv `sdl2-config --cflags` -o build/us_pc/bin/water_skybox.o build/us_pc/bin/water_skybox.c
tools/skyconv --type sky --split textures/skyboxes/bidw.png build/us_pc/bin
gcc -c -g  -I include -I build/us_pc -I build/us_pc/include -I src -I . -DVERSION_US -DNON_MATCHING -DAVOID_UB -DF3DEX_GBI_2E -fno-strict-aliasing -fwrapv `sdl2-config --cflags` -o build/us_pc/bin/bidw_skybox.o build/us_pc/bin/bidw_skybox.c
tools/skyconv --type sky --split textures/skyboxes/bbh.png build/us_pc/bin
gcc -c -g  -I include -I build/us_pc -I build/us_pc/include -I src -I . -DVERSION_US -DNON_MATCHING -DAVOID_UB -DF3DEX_GBI_2E -fno-strict-aliasing -fwrapv `sdl2-config --cflags` -o build/us_pc/bin/bbh_skybox.o build/us_pc/bin/bbh_skybox.c
tools/skyconv --type sky --split textures/skyboxes/wdw.png build/us_pc/bin
gcc -c -g  -I include -I build/us_pc -I build/us_pc/include -I src -I . -DVERSION_US -DNON_MATCHING -DAVOID_UB -DF3DEX_GBI_2E -fno-strict-aliasing -fwrapv `sdl2-config --cflags` -o build/us_pc/bin/wdw_skybox.o build/us_pc/bin/wdw_skybox.c
gcc -L build/us_pc -o build/us_pc/sm64.us.f3dex2e build/us_pc/src/engine/surface_collision.o build/us_pc/src/engine/behavior_script.o build/us_pc/src/engine/level_script.o build/us_pc/src/engine/graph_node_manager.o build/us_pc/src/engine/math_util.o build/us_pc/src/engine/geo_layout.o build/us_pc/src/engine/surface_load.o build/us_pc/src/engine/graph_node.o build/us_pc/src/game/save_file.o build/us_pc/src/game/level_geo.o build/us_pc/src/game/object_helpers.o build/us_pc/src/game/mario_actions_object.o build/us_pc/src/game/moving_texture.o build/us_pc/src/game/obj_behaviors.o build/us_pc/src/game/object_collision.o build/us_pc/src/game/interaction.o build/us_pc/src/game/platform_displacement.o build/us_pc/src/game/area.o build/us_pc/src/game/spawn_sound.o build/us_pc/src/game/mario_actions_moving.o build/us_pc/src/game/debug_course.o build/us_pc/src/game/game_init.o build/us_pc/src/game/envfx_snow.o build/us_pc/src/game/mario_step.o build/us_pc/src/game/spawn_object.o build/us_pc/src/game/crash_screen.o build/us_pc/src/game/hud.o build/us_pc/src/game/behavior_actions.o build/us_pc/src/game/mario_actions_airborne.o build/us_pc/src/game/mario_actions_cutscene.o build/us_pc/src/game/skybox.o build/us_pc/src/game/paintings.o build/us_pc/src/game/shadow.o build/us_pc/src/game/camera.o build/us_pc/src/game/profiler.o build/us_pc/src/game/memory.o build/us_pc/src/game/mario_actions_submerged.o build/us_pc/src/game/sound_init.o build/us_pc/src/game/ingame_menu.o build/us_pc/src/game/geo_misc.o build/us_pc/src/game/macro_special_objects.o build/us_pc/src/game/mario_actions_stationary.o build/us_pc/src/game/screen_transition.o build/us_pc/src/game/envfx_bubbles.o build/us_pc/src/game/object_list_processor.o build/us_pc/src/game/mario_misc.o build/us_pc/src/game/debug.o build/us_pc/src/game/thread6.o build/us_pc/src/game/obj_behaviors_2.o build/us_pc/src/game/print.o build/us_pc/src/game/mario.o build/us_pc/src/game/rendering_graph_node.o build/us_pc/src/game/mario_actions_automatic.o build/us_pc/src/game/level_update.o build/us_pc/src/audio/heap.o build/us_pc/src/audio/seqplayer.o build/us_pc/src/audio/globals_end.o build/us_pc/src/audio/globals_start.o build/us_pc/src/audio/playback.o build/us_pc/src/audio/effects.o build/us_pc/src/audio/external.o build/us_pc/src/audio/load.o build/us_pc/src/audio/port_eu.o build/us_pc/src/audio/synthesis.o build/us_pc/src/audio/data.o build/us_pc/src/menu/level_select_menu.o build/us_pc/src/menu/intro_geo.o build/us_pc/src/menu/star_select.o build/us_pc/src/menu/file_select.o build/us_pc/src/buffers/framebuffers.o build/us_pc/src/buffers/gfx_output_buffer.o build/us_pc/src/buffers/buffers.o build/us_pc/src/buffers/zbuffer.o build/us_pc/actors/group8.o build/us_pc/actors/group5_geo.o build/us_pc/actors/group9_geo.o build/us_pc/actors/group16.o build/us_pc/actors/group10.o build/us_pc/actors/group16_geo.o build/us_pc/actors/group15.o build/us_pc/actors/group5.o build/us_pc/actors/group6_geo.o build/us_pc/actors/group14.o build/us_pc/actors/common1.o build/us_pc/actors/group9.o build/us_pc/actors/group3_geo.o build/us_pc/actors/group8_geo.o build/us_pc/actors/common0_geo.o build/us_pc/actors/group2.o build/us_pc/actors/group0_geo.o build/us_pc/actors/group6.o build/us_pc/actors/group13_geo.o build/us_pc/actors/group4_geo.o build/us_pc/actors/group17_geo.o build/us_pc/actors/group2_geo.o build/us_pc/actors/group12.o build/us_pc/actors/group11_geo.o build/us_pc/actors/group7.o build/us_pc/actors/group3.o build/us_pc/actors/group7_geo.o build/us_pc/actors/common0.o build/us_pc/actors/group10_geo.o build/us_pc/actors/group0.o build/us_pc/actors/group13.o build/us_pc/actors/group4.o build/us_pc/actors/group17.o build/us_pc/actors/group14_geo.o build/us_pc/actors/common1_geo.o build/us_pc/actors/group15_geo.o build/us_pc/actors/group12_geo.o build/us_pc/actors/group11.o build/us_pc/actors/group1_geo.o build/us_pc/actors/group1.o build/us_pc/levels/entry.o build/us_pc/levels/scripts.o build/us_pc/bin/mountain.o build/us_pc/bin/machine.o build/us_pc/bin/grass.o build/us_pc/bin/water.o build/us_pc/bin/title_screen_bg.o build/us_pc/bin/debug_level_select.o build/us_pc/bin/sky.o build/us_pc/bin/generic.o build/us_pc/bin/spooky.o build/us_pc/bin/fire.o build/us_pc/bin/outside.o build/us_pc/bin/effect.o build/us_pc/bin/snow.o build/us_pc/bin/cave.o build/us_pc/bin/inside.o build/us_pc/bin/segment2.o build/us_pc/data/behavior_data.o build/us_pc/src/pc/ultra_reimplementation.o build/us_pc/src/pc/mixer.o build/us_pc/src/pc/pc_main.o build/us_pc/src/pc/configfile.o build/us_pc/src/pc/gfx/gfx_pc.o build/us_pc/src/pc/gfx/gfx_sdl2.o build/us_pc/src/pc/gfx/gfx_opengl.o build/us_pc/src/pc/audio/audio_sdl.o build/us_pc/src/pc/audio/audio_null.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_sdl.o build/us_pc/src/pc/controller/controller_emscripten_keyboard.o build/us_pc/src/pc/controller/controller_recorded_tas.o build/us_pc/levels/bbh/leveldata.o build/us_pc/levels/castle_grounds/leveldata.o build/us_pc/levels/thi/leveldata.o build/us_pc/levels/wdw/leveldata.o build/us_pc/levels/ddd/leveldata.o build/us_pc/levels/castle_inside/leveldata.o build/us_pc/levels/bitdw/leveldata.o build/us_pc/levels/bowser_2/leveldata.o build/us_pc/levels/lll/leveldata.o build/us_pc/levels/bowser_3/leveldata.o build/us_pc/levels/menu/leveldata.o build/us_pc/levels/jrb/leveldata.o build/us_pc/levels/vcutm/leveldata.o build/us_pc/levels/hmc/leveldata.o build/us_pc/levels/ending/leveldata.o build/us_pc/levels/castle_courtyard/leveldata.o build/us_pc/levels/ttc/leveldata.o build/us_pc/levels/cotmc/leveldata.o build/us_pc/levels/rr/leveldata.o build/us_pc/levels/bitfs/leveldata.o build/us_pc/levels/wmotr/leveldata.o build/us_pc/levels/ttm/leveldata.o build/us_pc/levels/wf/leveldata.o build/us_pc/levels/bits/leveldata.o build/us_pc/levels/intro/leveldata.o build/us_pc/levels/bob/leveldata.o build/us_pc/levels/bowser_1/leveldata.o build/us_pc/levels/totwc/leveldata.o build/us_pc/levels/sa/leveldata.o build/us_pc/levels/pss/leveldata.o build/us_pc/levels/sl/leveldata.o build/us_pc/levels/ccm/leveldata.o build/us_pc/levels/ssl/leveldata.o build/us_pc/levels/bbh/script.o build/us_pc/levels/castle_grounds/script.o build/us_pc/levels/thi/script.o build/us_pc/levels/wdw/script.o build/us_pc/levels/ddd/script.o build/us_pc/levels/castle_inside/script.o build/us_pc/levels/bitdw/script.o build/us_pc/levels/bowser_2/script.o build/us_pc/levels/lll/script.o build/us_pc/levels/bowser_3/script.o build/us_pc/levels/menu/script.o build/us_pc/levels/jrb/script.o build/us_pc/levels/vcutm/script.o build/us_pc/levels/hmc/script.o build/us_pc/levels/ending/script.o build/us_pc/levels/castle_courtyard/script.o build/us_pc/levels/ttc/script.o build/us_pc/levels/cotmc/script.o build/us_pc/levels/rr/script.o build/us_pc/levels/bitfs/script.o build/us_pc/levels/wmotr/script.o build/us_pc/levels/ttm/script.o build/us_pc/levels/wf/script.o build/us_pc/levels/bits/script.o build/us_pc/levels/intro/script.o build/us_pc/levels/bob/script.o build/us_pc/levels/bowser_1/script.o build/us_pc/levels/totwc/script.o build/us_pc/levels/sa/script.o build/us_pc/levels/pss/script.o build/us_pc/levels/sl/script.o build/us_pc/levels/ccm/script.o build/us_pc/levels/ssl/script.o build/us_pc/levels/bbh/geo.o build/us_pc/levels/castle_grounds/geo.o build/us_pc/levels/thi/geo.o build/us_pc/levels/wdw/geo.o build/us_pc/levels/ddd/geo.o build/us_pc/levels/castle_inside/geo.o build/us_pc/levels/bitdw/geo.o build/us_pc/levels/bowser_2/geo.o build/us_pc/levels/lll/geo.o build/us_pc/levels/bowser_3/geo.o build/us_pc/levels/menu/geo.o build/us_pc/levels/jrb/geo.o build/us_pc/levels/vcutm/geo.o build/us_pc/levels/hmc/geo.o build/us_pc/levels/ending/geo.o build/us_pc/levels/castle_courtyard/geo.o build/us_pc/levels/ttc/geo.o build/us_pc/levels/cotmc/geo.o build/us_pc/levels/rr/geo.o build/us_pc/levels/bitfs/geo.o build/us_pc/levels/wmotr/geo.o build/us_pc/levels/ttm/geo.o build/us_pc/levels/wf/geo.o build/us_pc/levels/bits/geo.o build/us_pc/levels/intro/geo.o build/us_pc/levels/bob/geo.o build/us_pc/levels/bowser_1/geo.o build/us_pc/levels/totwc/geo.o build/us_pc/levels/sa/geo.o build/us_pc/levels/pss/geo.o build/us_pc/levels/sl/geo.o build/us_pc/levels/ccm/geo.o build/us_pc/levels/ssl/geo.o   build/us_pc/assets/mario_anim_data.o build/us_pc/assets/demo_data.o build/us_pc/bin/ccm_skybox.o build/us_pc/bin/clouds_skybox.o build/us_pc/bin/bitfs_skybox.o build/us_pc/bin/bits_skybox.o build/us_pc/bin/cloud_floor_skybox.o build/us_pc/bin/ssl_skybox.o build/us_pc/bin/water_skybox.o build/us_pc/bin/bidw_skybox.o build/us_pc/bin/bbh_skybox.o build/us_pc/bin/wdw_skybox.o build/us_pc/sound/sound_data.ctl.o build/us_pc/sound/sound_data.tbl.o build/us_pc/sound/sequences.bin.o build/us_pc/sound/bank_sets.o  build/us_pc/lib/src/__osSpSetPc.o build/us_pc/lib/src/guPerspectiveF.o build/us_pc/lib/src/__osGetCurrFaultedThread.o build/us_pc/lib/src/guTranslateF.o build/us_pc/lib/src/osViTable.o build/us_pc/lib/src/osEPiRawStartDma.o build/us_pc/lib/src/__osSiCreateAccessQueue.o build/us_pc/lib/src/guScaleF.o build/us_pc/lib/src/__osSpGetStatus.o build/us_pc/lib/src/osViData.o build/us_pc/lib/src/__osSpRawStartDma.o build/us_pc/lib/src/__osAiDeviceBusy.o build/us_pc/lib/src/osCreateMesgQueue.o build/us_pc/lib/src/NaN.o build/us_pc/lib/src/__osPiCreateAccessQueue.o build/us_pc/lib/src/unk_stack_data.o build/us_pc/lib/src/__osSpDeviceBusy.o build/us_pc/lib/src/osGetThreadPri.o build/us_pc/lib/src/__osSiRawWriteIo.o build/us_pc/lib/src/osSpTaskYielded.o build/us_pc/lib/src/guOrthoF.o build/us_pc/lib/src/func_802F71A0.o build/us_pc/lib/src/_Ldtob.o build/us_pc/lib/src/alBnkfNew.o build/us_pc/lib/src/__osSpSetStatus.o build/us_pc/lib/src/osSpTaskYield.o build/us_pc/lib/src/__osSiDeviceBusy.o build/us_pc/lib/src/__osDequeueThread.o build/us_pc/lib/src/__osSiRawReadIo.o build/us_pc/lib/src/ldiv.o build/us_pc/lib/src/guMtxF2L.o build/us_pc/lib/src/guLookAtRef.o build/us_pc/lib/src/_Litob.o build/us_pc/lib/src/guRotateF.o build/us_pc/lib/src/guNormalize.o build/us_pc/lib/src/math/llmuldiv.o build/us_pc/lib/src/math/sinf.o build/us_pc/lib/src/math/llconv.o build/us_pc/lib/src/math/cosf.o build/us_pc/src/goddard/old_menu.o build/us_pc/src/goddard/particles.o build/us_pc/src/goddard/dynlist_proc.o build/us_pc/src/goddard/renderer.o build/us_pc/src/goddard/skin.o build/us_pc/src/goddard/joints.o build/us_pc/src/goddard/objects.o build/us_pc/src/goddard/draw_objects.o build/us_pc/src/goddard/debug_utils.o build/us_pc/src/goddard/gd_math.o build/us_pc/src/goddard/gd_memory.o build/us_pc/src/goddard/gd_main.o build/us_pc/src/goddard/skin_movement.o build/us_pc/src/goddard/sfx.o build/us_pc/src/goddard/shape_helper.o build/us_pc/src/goddard/dynlists/dynlist_test_cube.o build/us_pc/src/goddard/dynlists/dynlists_mario_eyes.o build/us_pc/src/goddard/dynlists/anim_mario_lips_1.o build/us_pc/src/goddard/dynlists/dynlist_mario_master.o build/us_pc/src/goddard/dynlists/anim_mario_eyebrows_1.o build/us_pc/src/goddard/dynlists/anim_group_2.o build/us_pc/src/goddard/dynlists/anim_mario_mustache_left.o build/us_pc/src/goddard/dynlists/dynlist_mario_face.o build/us_pc/src/goddard/dynlists/anim_mario_lips_2.o build/us_pc/src/goddard/dynlists/anim_mario_mustache_right.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/anim_group_1.o  -march=native -lm -lGL `sdl2-config --libs` -no-pie -lpthread
gcc: error: unrecognized command line option ‘-no-pie’
Makefile:735: fallo en las instrucciones para el objetivo 'build/us_pc/sm64.us.f3dex2e'
make: *** [build/us_pc/sm64.us.f3dex2e] Error 1

sm64pc_001
sm64pc_002

Thanks for any answer you can give me, i will go try to modify Makefile and delete all parts says

-no-pie

Well this works xD under Slackware64 14.2, for some reason the keyboard does nothing with the game

sm64pc_003

No Fullscreen on Test Version Windows 10

I've been having a fullscreen issue between the regular release and the test release and I'm curious if anyone has a fix.

When I install the non-test release I can enter fullscreen when playing. However when I install the test version it won't enter fullscreen when pressing alt+enter. I would LOOOOVE to play the better camera version in fullscreen if someone know's a fix.

No errors in setting everything up, I just can't enter fullscreen.

No "L" N64 trigger button defined in Controller_SDL (Updated)

Describe the bug
There's no L button defined for SDL Controller input, or any way to cleanly map it to modern controllers (more than 2 shoulder buttons)

Expected behavior
Have the L Trigger assigned and passed to the virtual N64 controller

I have seen references to other SDL controllers on github, it may be possible to define
a Left/Right "Trigger" (back pair of shoulders) to match XBox + Playstation controller layouts.

Gamecube will only have RightTrigger if created of course.

Screenshots
N/A

Additional context
Puppycam / Newcam mods have L+R actions, Mario 64 doesn't use L for anything, but the controller still has it.

Possible to split this PC port into Server and Client Code?

I started looking through this code this weekend and compiling it and just trying some very small mods to get the hand of it and learn it. Been having some fun just messing with the physics and or making various cheats or silly things. I wanted to start a project where I'd work on making some online multiplayer with super mario 64 (probably use the webOpenGL)... anyone know of any similar projects? I was thinking about it and the first thing I would want to see if I can to is split the code into client and server code and setup some interface... Though, thinking about it and looking at the code, perhaps this may be more challenging than I imagined. Does anyone have any recommendations on what modules should go where and how this could work out or what it could look like, or if its even possible.... or am I just going to run into a giant world of pain/headache?

(RPi 1/0 / Low mem issue) Building sound_data.tbl.c

Describe the bug
Compile process of :

hexdump -v -e '1/1 "0x%X,"' build/us_pc/sound/sound_data.tbl >> build/us_pc/sound/sound_data.tbl.c
echo "};" >> build/us_pc/sound/sound_data.tbl.c

requires a LOT of memory (too much for a GPU acceleration prepared Raspbian install)
By default, CMA (VC4 GPU Memory) is set to 256MB. Compiles often need 120MB of free RAM to account for slow disk I/O and hexdump parsing.

To Reproduce
Install fresh Raspbian 10 on a 512MB or lower Raspberry Pi
Enable Accelerated OpenGL (KMS/FKMS) with required SM64PC Debian dependencies
Disable desktop boot to reduce RAM (auto-login command line if preferred) and then restart before

compiling with 'make TARGET_RPI=1'
Wait for sound_Data.tbl to freeze up as it uses +160-190MB (Out of 430MB usable) RAM

Expected behavior
Rasberry Pis with 512MB of RAM or less and accelerated VC4-DRM + OpenGL/Mesa compile and produce a binary in a reasonable (1hr) time from start to finish

Temporary Solution:
After enabling RPi 1/0W accelerated OGL, add

cma=128M to the end of /boot/cmdline.txt
gpu_mem=48M to the end of /boot/config.txt

Proposed solution:
Make sound_tbl into chunks or find a way to reduce memory and I/O during the hexdump extraction process into sound_data.tbl.c from sound_data.tbl

If SDcard I/O is too slow, RAM will be used as a buffer and also causing this issue.
It may be preferable to enforce disk syncs before this step to empty cached data to the SD before this step runs

I can confirm that on Raspbian 10 with these fixes, SM64PC does run with graphics and no compile errors

Is it possible to build a windows executable from linux?

Using Ubuntu 18.04 I can build no problem, however by typing
make WINDOWS_BUILD=1 i get the following error:

/usr/bin/ld: cannot find -lglew32
/usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/libSDL2.a(SDL_dynapi.o): In function `SDL_InitDynamicAPI':
(.text+0x2282): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: cannot find -lasound
collect2: error: ld returned 1 exit status
Makefile:892: recipe for target 'build/us_pc/sm64.us.f3dex2e.exe' failed
make: *** [build/us_pc/sm64.us.f3dex2e.exe] Error 1

I've tried installing some mingw-w64 packages but they didnt do any good.

Can't build for windows on arch

dependencies probably needed that aren't listed because while compiling it spits out this error
know what dependencies are needed? i got all the packages listed in the readme & the output seems kinda confusing (i cant find most of these packages in repositories and the ones i can find i installed & get the same output)

Usage: /usr/bin/sdl2-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--cflags] [--libs]
/usr/bin/ld: cannot find -lglew32
/usr/bin/ld: cannot find -lglu32
/usr/bin/ld: cannot find -lsetupapi
/usr/bin/ld: cannot find -ldinput8
/usr/bin/ld: cannot find -luser32
/usr/bin/ld: cannot find -lgdi32
/usr/bin/ld: cannot find -limm32
/usr/bin/ld: cannot find -lole32
/usr/bin/ld: cannot find -loleaut32
/usr/bin/ld: cannot find -lshell32
/usr/bin/ld: cannot find -lwinmm
/usr/bin/ld: cannot find -lversion
/usr/bin/ld: cannot find -luuid
/usr/bin/ld: cannot find -lopengl32
collect2: error: ld returned 1 exit status

Compiling for the Web?

May be I didn't understand how it works

But when I do on ArchLinux
make TARGET_WEB=1

It wants to write the files on the root / ??

I don't get it

Full Screen in Web html build

Screen turning black if you go full-screen. Returning by hitting ESC, you can hear it playing still, but there is no window at all with video.
Untitled
Untitled

Also the sm64config.txt isn't being generated anywhere that I can see. Also if you refresh it says it can't find it and "makes" another.

Raspberry Pi - Allow / patch local SDL2 for KMSDRM (No X required)

Currently, X11 is required on all Linux targets to output video. Due to the limited CPU of the earlier Raspberry Pi models, it is preferable to not have it run unless a Desktop is required (5-10% of CPU on 1GHz Pi 1).

Not likely to work on Raspberry Pi 4, but others can test and report back.

Steps to enable:

  1. Fresh and fully updated Raspbian 10 or newer image

  2. Install dependencies required for sm64pc compile on RPi

  3. Raspi-Config -> Adv -> OpenGL Accel -> KMS (Full)
    3b (On Pis with 512MB RAM or less, set cma=128M in /boot/cmdline as root, then reboot)

  4. Enable/uncomment deb-src in /etc/apt/sources.list (related files)

  5. Do an apt-get update and follow sdl compile instructions from
    https://stackoverflow.com/questions/57672568/sdl2-on-raspberry-pi-without-x
    until you complete the 'make install' modified SDL2, section. Then, return to SM64 src directory.

  6. Modify SM64 Makefile, RPi section to:
    ifeq ($(TARGET_RPI),1)
    LDFLAGS := $(OPT_FLAGS) -lm -lgbm -lGLESv2 $(CROSS)sdl2-config --libs -no-pie

  7. make TARGET_RPI=1 (on 512mb Pi models, please kill X11 / use raspi-config to disable Desktop boot to run compile in a safer manner)

  8. Wait for compile to complete, switch to Virtual Terminal and/or kill X11

  9. Execute binary in ./build/us_pc/sm64.us.xyz.arm

Note that you will not be able to currently exit Mario 64 as in-game quit is not currently implemented. I have noticed on my 1.1GHz Pi 1 that I get less stutters without X11 and using KMSDRM : GLES2

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.