I had difficulty finding much information regarding these topics, I want everyone to be able to see at a glance that this does indeed work, thanks again my friend!
Install the version corresponding to your Operating System (64 or 32 bits).
Accept the defaults in installation program of MSYS2 once you finish the installation you will have shortcuts for MSYS2, MinGW32 and MinGW64. MSYS2 is used to compiling POSIX binaries for Linux from Windows.
MinGW32 & MinGW64 compile Native Windows binaries using a linux toolchain (gcc, bash, etc.)
Launch MSYS2 shell and execute the command: pacman -Syuu several times until you get the message: "there is nothing to do".
In order to compile the Switch binary you must first confirm all works fine compiling a binary for Windows. So do the next steps:
Install prerequisites
In a MinGW64 shell (or MinGW32 if you have a Windows 32 bit edition, why?). Be sure the prompt shows MINGW64 or MINGW32 if not you started the wrong shell, close it and open the right one.
Please execute the next command, several times until you get the message "there is nothing to do", you can be asked to restarts the MINGW64 environment few times: pacman -Syuu
Pay attention to the space before " -lstdc++". then run the commands:
Code:
cd ..
make
Last, you can compile the Widows executable using make and the build options you choose, by example:
Code:
cd ..
make BETTERCAMERA=1 NODRAWINGDISTANCE=1 TEXTURE_FIX=1 EXT_OPTIONS_MENU=1 -j9
If all go through you get an .exe file on build subfolder of sm64ex.
Troubleshooting
If you get the error gcc: command not found or make: gcc: No such file or directory you do not install all needed packages or run the wrong Shell, be sure of running «MINGW32» or «MINGW64» and what that is pointed on the prompt in purple.
If the ROM is missing or wrong format/version you get the error Failed to open baserom.us.z64! Verify the correct ROM at the c:\msys64\home\<username>\sm64ex.folder.
If you get the error make: *** No targets specified and no makefile found. Stop. You are on the wrong folder the last make command should be run from c:\msys64\home\<username>\sm64ex folder.
Be sure of get the responses Target: i686-w64-mingw32 or Target: x86_64-w64-mingw32 when you run the command gcc -v if else other is shown on screen you install the wrong gcc package or run MSYS shell, remember the process should be run on «MINGW32» or «MINGW64» shells.
Nintendo Switch compilation.
After all works fine and a Windows binary is created, you can run extra steps for make a Switch NRO file
First you need to install DevKitPro.
You need to edit the pacman.conf on c:\msys64\etc\
And add the next lines at end of it:
Code:
[dkp-libs]
Server = https://downloads.devkitpro.org/packages
[dkp-windows]
Server = https://downloads.devkitpro.org/packages/windows
By last run the next commands in order to make the NRO file, PLEASE DO NOT FORGET TO COPY THE EXE FILE GENERATED FOR WINDOWS TO OTHER PATH, it will be deleted on the next step.
You can use any build options you want, one example:
Code:
make TARGET_SWITCH=1 BETTERCAMERA=1 NODRAWINGDISTANCE=1 TEXTURE_FIX=1 -j9
BUILD OPTIONS
Build option
Default
Possible values
Description
VERSION
us
us, eu, jp, sh
Which ROM to use. The selected ROM has to be in the repo folder with the name baserom.$VERSION.z64. sh is currently broken.
TARGET_BITS
32, 64,
TARGET_BITS=n appends some compiler flags for an n-bit build. If the value is empty, the option does nothing, assuming your native toolchain will set everything up by itself. Use this only if you're having trouble otherwise.
If 1, build for Windows. Usually set automatically if building on Windows.
OSX_BUILD
0
0, 1
If 1, build for OSX.
WINDOWS_CONSOLE
0
0, 1
If 1, append -mconsole to Windows CFLAGS, making a console window appear while the game is running. Can be useful for debugging purposes.
DEBUG
0
0, 1
If 1, build with debug symbols and default optimization level. Otherwise build with -O2.
RENDER_API
GL
GL, GL_LEGACY, D3D11, D3D12
Select rendering backend to use.
GL corresponds to OpenGL 2.1 (gfx_opengl.c),
GL_LEGACY corresponds to OpenGL 1.3 (gfx_opengl_legacy.c).
Direct3D backends will also force WINDOW_API to DXGI.
WINDOW_API
SDL2
SDL2, DXGI
Select windowing backend. GL renderers force SDL2 and D3D renderers force DXGI for now, so you don't need to specify this.
AUDIO_API
SDL2
SDL2
Select audio backend. There's only one right now.
CONTROLLER_API
SDL2
SDL2
Specify list of controller backends to use. There's only one right now.
BETTERCAMERA
0
0, 1
If 1, build with analog camera support (uses Puppycam).
NODRAWINGDISTANCE
0
0, 1
If 1, build with disabled draw distance (every object is active at all times). May affect gameplay.
TEXTURE_FIX
0
0, 1
If 1, enable various texture-related bugfixes (e.g. fixes the smoke texture).
EXT_OPTIONS_MENU
1
0, 1
If 1, enable Options menu. Accessed from the Pause menu by pressing R.
EXTERNAL_DATA
0
0, 1
If 1, load textures and soundbanks from external files. Allows you to use texture packs. The default data is copied to a res folder next to the produced executable. (En Switch va en la carpeta raíz), para PC no lo genera
DISCORDRPC
0
0, 1
If 1, enable Discord Rich Presence support. Only works on x86_64.
TEXTSAVES
0
0, 1
If 1, use INI-based save format instead of binary EEPROM dumps. Experimental.
Optional Steps
If you want a Banner for the NRO file, you need to put a file called nx_icon.jpg on the sm64ex folder and BEFORE run the last make command you edit the Makefile file and replace the next lines
Code:
# add `--icon=$(APP_ICON)` to this when we get a suitable icon
%.nro: %.stripped %.nacp
@elf2nro $< $@ --nacp=$*.nacp
@echo built ... $(notdir $@)
By these:
Code:
# add `--icon=$(APP_ICON)` to this when we get a suitable icon
%.nro: %.stripped %.nacp
@elf2nro $< $@ --nacp=$*.nacp --icon=$(APP_ICON)
@echo built ... $(notdir $@)
After the NRO file is created, you can use SAK Switch Army Knife to make a NSP forwarder installable on the HOS.
Retrospective from a noob here, now that I have compiled a fully working .nro after the best part of two weeks trying!
First, for anyone using the EXTERNAL_DATA build flag, you must copy the res folder containing the base.zip with the .nro, else the game will crash on boot. May be obvious to anyone who isn’t a noob like me!
@impeeza - thank you so much for the write up on page 17, it holds up perfectly given how long ago it was originally written and has everything you need to know if you have no prior experience in this stuff, thanks again!
Also, a question - What can I put in the res folder that is compatible with this build? I have the Render96 HD texture pack working, but without the models too, the game just looks like N64 era Mario in a modern game?!
I have the .pak texture packs from a previous .nsp installation of NX, but can’t seem to get them to work with my sm64ex build. Any help is gratefully appreciated!
Big thanks to @fgsfds as well for yet another fantastic port! I think I’ve inadvertently collected most if not all of them now!
Retrospective from a noob here, now that I have compiled a fully working .nro after the best part of two weeks trying!
First, for anyone using the EXTERNAL_DATA build flag, you must copy the res folder containing the base.zip with the .nro, else the game will crash on boot. May be obvious to anyone who isn’t a noob like me!
@impeeza - thank you so much for the write up on page 17, it holds up perfectly given how long ago it was originally written and has everything you need to know if you have no prior experience in this stuff, thanks again!
Also, a question - What can I put in the res folder that is compatible with this build? I have the Render96 HD texture pack working, but without the models too, the game just looks like N64 era Mario in a modern game?!
I have the .pak texture packs from a previous .nsp installation of NX, but can’t seem to get them to work with my sm64ex build. Any help is gratefully appreciated!
Big thanks to @fgsfds as well for yet another fantastic port! I think I’ve inadvertently collected most if not all of them now!
if those are models, you probably have to compile them with the project. that's how it is with the pc version. btw, there's a packs folder in dynos, but I do not know what a pak file is.
if those are models, you probably have to compile them with the project. that's how it is with the pc version. btw, there's a packs folder in dynos, but I do not know what a pak file is.
Think it’s an outdated format for textures. There’s a bunch of tools out there to unpack them to turn them into something readable, but none of them work.
I’m guessing you mean drop them in the appropriate folders (e.g. ‘actors’) once the repo is downloaded, prior to running make?
Think it’s an outdated format for textures. There’s a bunch of tools out there to unpack them to turn them into something readable, but none of them work.
I’m guessing you mean drop them in the appropriate folders (e.g. ‘actors’) once the repo is downloaded, prior to running make?
well, the render96ex version requires you to compile with the added models, then you can modify the models, but textures just need to be added to the res folder afaik. it could be gfx, but I don't remember. textures don't need to be compiled with them on, at least with render96ex. I may have had a problem recompiling the nx version, but I don't remember if it was a specific version or even that at all. I'm thinking I had some issues with a switch version of something.
well, the render96ex version requires you to compile with the added models, then you can modify the models, but textures just need to be added to the res folder afaik. it could be gfx, but I don't remember. textures don't need to be compiled with them on, at least with render96ex. I may have had a problem recompiling the nx version, but I don't remember if it was a specific version or even that at all. I'm thinking I had some issues with a switch version of something.
That sounds about right. I managed to compile Render96ex for PC but ran into issues trying to get the Switch version to work. I’ll probably take another stab at it now I know a little bit more about what I’m doing xD
The working file structure is sdmc/switch/sm64/res/gfx so well remembered if it’s been a while since you looked at it
That sounds about right. I managed to compile Render96ex for PC but ran into issues trying to get the Switch version to work. I’ll probably take another stab at it now I know a little bit more about what I’m doing xD
The working file structure is sdmc/switch/sm64/res/gfx so well remembered if it’s been a while since you looked at it
I think it was the nx version, but the render96ex or something mentioned that the switch compile is broken. even if you use the one suggested at the bottom, it doesn't work. however, apparently, it was just a guess as to if it worked. it doesn't with the nx version. I think @impeeza or @binkinator confirmed it. he said he could build it last year, but now it no longer works.
I think it was the nx version, but the render96ex or something mentioned that the switch compile is broken. even if you use the one suggested at the bottom, it doesn't work. however, apparently, it was just a guess as to if it worked. it doesn't with the nx version. I think @impeeza or @binkinator confirmed it. he said he could build it last year, but now it no longer works.
I’ve made good progress since the last messages. I found some HD models for Mario and Bowser that work very well. I’ve also been playing around with early versions (1.3) of the Render96 model pack to what works and what doesn’t.
The PC version won’t compile, but I attribute that to age and lack of updates. The Switch version compiles and appears to load the models, but…
Errbody Purple!
So two questions, 1) what tf is going on? And 2) what are the options for HD models on fgsfdsfgs fork? My goal is to get it looking as good as the .nsp version of sm64nx if that is at all helpful.
I’ve made good progress since the last messages. I found some HD models for Mario and Bowser that work very well. I’ve also been playing around with early versions (1.3) of the Render96 model pack to what works and what doesn’t.
The PC version won’t compile, but I attribute that to age and lack of updates. The Switch version compiles and appears to load the models, but…
Errbody Purple! View attachment 371551
So two questions, 1) what tf is going on? And 2) what are the options for HD models on fgsfdsfgs fork? My goal is to get it looking as good as the .nsp version of sm64nx if that is at all helpful.
Had that happen one time. Just need to make sure all the HD Textures are in it. Once had a LOT of Purple Items, and Characters. LOL. Just wishing could Compile it into a NSP like those other Builds
Today, April 8th, 2024, at 4PM PT, marks the day in which Nintendo permanently ends support for both the 3DS and the Wii U online services, which include co-op play...
A new Nintendo Switch firmware update is here. System software version 18.0.1 has been released. This update offers the typical stability features as all other...
With Apple having recently updated their guidelines for the App Store, iOS users have been left to speculate on specific wording and whether retro emulators as we...
The time has finally come, and after many, many years (if not decades) of Apple users having to side load emulator apps into their iOS devices through unofficial...
The highly popular and accurate FPGA hardware, MisterFGPA, has received today a brand new update with a long-awaited feature, or rather, a new core for hardcore...
TheFlow has done it again--a new kernel exploit has been released for PlayStation 4 consoles. This latest exploit is called PPPwn, and works on PlayStation 4 systems...
Nintendo might just as well be a law firm more than a videogame company at this point in time, since they have yet again issued their now almost trademarked usual...
Another video game prototype has been found and preserved, and this time, it's none other than the game that spawned an entire franchise beloved by many, the very...
Anbernic is back with yet another retro handheld device. The upcoming RG28XX is another console sporting the quad-core H700 chip of the company's recent RG35XX 2024...
Nintendo has recently announced through their social media accounts that a new Indie World stream will be airing tomorrow, scheduled for April 17th, 2024 at 7 a.m. PT...
Today, April 8th, 2024, at 4PM PT, marks the day in which Nintendo permanently ends support for both the 3DS and the Wii U online services, which include co-op play...
Nintendo might just as well be a law firm more than a videogame company at this point in time, since they have yet again issued their now almost trademarked usual...
With Apple having recently updated their guidelines for the App Store, iOS users have been left to speculate on specific wording and whether retro emulators as we...
The time has finally come, and after many, many years (if not decades) of Apple users having to side load emulator apps into their iOS devices through unofficial...
A new Nintendo Switch firmware update is here. System software version 18.0.1 has been released. This update offers the typical stability features as all other...
TheFlow has done it again--a new kernel exploit has been released for PlayStation 4 consoles. This latest exploit is called PPPwn, and works on PlayStation 4 systems...
Two classic titles join the Nintendo Switch Online Expansion Pack game lineup. Available starting April 24th will be the motorcycle racing game Extreme G and another...
The highly popular and accurate FPGA hardware, MisterFGPA, has received today a brand new update with a long-awaited feature, or rather, a new core for hardcore...
Nintendo has recently announced through their social media accounts that a new Indie World stream will be airing tomorrow, scheduled for April 17th, 2024 at 7 a.m. PT...
In 2017, the United States Federal Communications Commission (FCC) repealed net neutrality. At the time, it was a major controversy between internet service providers...