Super Mario 64 PC port has been released!

  • Thread starter Deleted User
  • Start date
  • Views 158,867
  • Replies 283
  • Likes 33

bnji

Member
Newcomer
Joined
May 5, 2020
Messages
5
Trophies
0
Age
30
XP
47
Country
United Kingdom
Has anyone worked out a way to make it run at a normal speed on Linux/Macos yet? (framelimiter or something)
Been poking around in the code but haven't found anything helpful so far.
 

Waveracer

Well-Known Member
Member
Joined
Jul 22, 2016
Messages
230
Trophies
0
XP
395
Country
United Kingdom
I tried to launch it but nothing happens. I checked DirectX Diagnostic Tool and it says that I have DirectX 12 so no idea what's missing.
 

DaniPoo

Well-Known Member
Member
Joined
Jan 2, 2013
Messages
925
Trophies
1
Age
35
XP
2,282
Country
Would be nice if they made a tool that build the port for you from a rom that you provide yourself.
That way thay could probably avoid some legal issues
 

Jamesj1318

Member
Newcomer
Joined
May 5, 2020
Messages
8
Trophies
0
Age
34
XP
35
Country
United States
So I get everything correct until this
$ make -j9 TARGET_N64=0
which: no qemu-irix in (/mingw64/bin:/usr/local/bin:/usr/bin:/bin:/c/Windows/System32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0/:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl)
Makefile:257: *** Please install qemu-irix package or set QEMU_IRIX env var to the full qemu-irix binary path. Stop.

Anyone know how to fix this?

Update I started over from scratch and it compiled without issue.
 
Last edited by Jamesj1318,

Worldblender

Well-Known Member
Member
Joined
May 27, 2019
Messages
326
Trophies
0
Age
27
XP
2,233
Country
United States
So I get everything correct until this
$ make -j9 TARGET_N64=0
which: no qemu-irix in (/mingw64/bin:/usr/local/bin:/usr/bin:/bin:/c/Windows/System32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0/:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl)
Makefile:257: *** Please install qemu-irix package or set QEMU_IRIX env var to the full qemu-irix binary path. Stop.

Anyone know how to fix this?
You might try using
Code:
make TARGET_N64=0 -j9
instead, passing the options after setting the variables.
 

Aurexion

New Member
Newbie
Joined
May 6, 2020
Messages
1
Trophies
0
Age
23
XP
42
Country
United States
Do you know how to get controllers to work on it? I plugged in my switch pro controller but I can't figure it out

--------------------- MERGED ---------------------------

How do you get controllers to work? I plugged in my switch pro controller but I can't get it to work
 

Jamesj1318

Member
Newcomer
Joined
May 5, 2020
Messages
8
Trophies
0
Age
34
XP
35
Country
United States
Do you know how to get controllers to work on it? I plugged in my switch pro controller but I can't figure it out

--------------------- MERGED ---------------------------

How do you get controllers to work? I plugged in my switch pro controller but I can't get it to work
Xbox controller works perfectly without configuration if you have one. Not sure the switch one will without a mapper software.
 

Worldblender

Well-Known Member
Member
Joined
May 27, 2019
Messages
326
Trophies
0
Age
27
XP
2,233
Country
United States
Nope still the same error. :/
$ make TARGET_N64=0 -j9
which: no qemu-irix in (/mingw64/bin:/usr/local/bin:/usr/bin:/bin:/c/Windows/System32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0/:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl)
Makefile:257: *** Please install qemu-irix package or set QEMU_IRIX env var to the full qemu-irix binary path. Stop.

I tired doing this first but no change
pacman -S mingw-w64-x86_64-qemu

Still get the error

--------------------- MERGED ---------------------------



Did you figure this out? I am stuck here too
I think you're not using the correct source code; the official version from the GitHub repository doesn't contain the necessary code to allow it to compile on PCs. However, someone already posted a diff file that can be used on that repository if you don't want to search for the source code archives that already do have the necessary code built-in.

Attached is a patch from the sm64 decompilation commit 9273f38df135273d905ac14e7a090ebac4ba3ae9 to the PC version source code floating around.

You can apply using this command (after changing directory to the git clone of the sm64 decompilation and checking out commit 9273f38df135273d905ac14e7a090ebac4ba3ae9 from the sm64 decompilation repository):

Code:
patch -p1 -i/path/to/sm64pc.diff

Additionally, here is a patch to allow the compilation to succeed on macOS and Emscripten. In the Makefile, change "AS" to a working as from GNU Binutils (any architecture), "CPP" to a working C preprocessor from GCC (any architecture), "OBJDUMP" to a working objdump from GNU Binutils (any architecture), and "OBJCOPY" to a working objcopy from GNU Binutils (any architecture). Use GNU Make to build the project.
If there are any missing libraries or dependencies, install them.
 

Jamesj1318

Member
Newcomer
Joined
May 5, 2020
Messages
8
Trophies
0
Age
34
XP
35
Country
United States
Do you know how to get controllers to work on it? I plugged in my switch pro controller but I can't figure it out

--------------------- MERGED ---------------------------

How do you get controllers to work? I plugged in my switch pro controller but I can't get it to work

I heard you can run the game exe through steam and configure the controller.
 

WaterTheFlowers

Member
Newcomer
Joined
Mar 4, 2019
Messages
6
Trophies
0
Age
27
XP
79
Country
United States
Does anyone know where to limit the fps besides using a third party app to do so? For DX12. I have a 144hz monitor and the game runs at 36 fps. Switching to 60hz fixes it to 30 but I still would like a fix in the code itself.
 
Last edited by WaterTheFlowers,

Colbydude

Member
Newcomer
Joined
Nov 11, 2011
Messages
6
Trophies
0
Website
colbydude.com
XP
201
Country
United States
For anyone on playing around on macOS, here's what I did to accomplish frame limiting to 30 FPS.

In
gfx_sdl2.c
:
Code:
// Add the following towards the top of the file.
const unsigned int FPS = 30;
const unsigned int FRAME_TARGET_TIME = 1000 / FPS;

int ticksLastFrame = 0;

// Update this method to the following:
static bool gfx_sdl_start_frame(void) {
// Sleep the execution until we reach the target frame time in ms.
int timeToWait = FRAME_TARGET_TIME - (SDL_GetTicks() - ticksLastFrame);

// Only call delay if we are too fast to process this frame.
if (timeToWait > 0 && timeToWait < FRAME_TARGET_TIME) {
SDL_Delay(timeToWait);
}

ticksLastFrame = SDL_GetTicks();

return true;
}
Definitely not the most elegant solution, but it works!
 

Rfire

Well-Known Member
Member
Joined
Dec 25, 2005
Messages
131
Trophies
0
Website
Visit site
XP
452
Country
United States
Possible idea for a fork to make distributing the binary OKish:

Change it so that instead of it building the game's assets into the game executible it instead uses external files that you extract from the ROM image. Eg, /sfx/ for sound effects /textures/, etc that way even the compiled binary wouldn't contain any Nintendo copyrighted assets. It would also make it easier to mod textures and things like the HUD and music.

So you would have Mario64.exe which itself would contain no Nintendo copyrighted content, and you'd use a Python script or whatever to extract the needed assets from the ROM and the executible would load in the assets from the files you extracted to the subdirectories.

Even better is if the extracted assets were converted into a standard format for easy editing such as textures in PNG format. Though that would probably take a lot of coding to do in comparison with having it load in the assets externally instead of building them into the executible.

Think of it the same way as many early (and some current) emulators work: Doesn't emulate the BIOS and so you need a BIOS bin file for the emulator to work, and it is left to the end user to put the BIOS bin in the folder themselves so that the emulator can be distributed legally.

To use a more relevant example, the Doom 64 Ex project. Allows you to play Doom 64 natively on many different platforms, but you have to supply/extract the WAD file from a Doom 64 ROM image yourself. As opposed to the copyrighted assets being packed in with the executible which means only the source code can be legally distributed.
 
Last edited by Rfire,
  • Like
Reactions: Worldblender

nolimits59

Well-Known Member
Member
Joined
Apr 25, 2008
Messages
701
Trophies
1
XP
2,064
Country
France
Does anyone know where to limit the fps besides using a third party app to do so? For DX12. I have a 144hz monitor and the game runs at 36 fps. Switching to 60hz fixes it to 30 but I still would like a fix in the code itself.
Fix it in the Nvidia control panel :).

Also, i saw a SWITCH port laying around !
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    Sonic Angel Knight @ Sonic Angel Knight: :ninja: