Super Mario 64 PC port has been released!

  • Thread starter Deleted User
  • Start date
  • Views 159,220
  • Replies 283
  • Likes 33

Worldblender

Well-Known Member
Member
Joined
May 27, 2019
Messages
326
Trophies
0
Age
27
XP
2,245
Country
United States
On Ubuntu, open Settings, go to Keyboard Shortcuts and assign anything to Toggle fullscreen mode (e.g. Super+F), then press it in the game.


You can use:
Code:
make TARGET_N64=0 -j$(nproc)
I got all that working. Almost everything went smoothly, but:
Code:
/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
/usr/bin/ld: cannot find -lSDL2
collect2: error: ld returned 1 exit status
Makefile:702: recipe for target 'build/us_pc/sm64.us.f3dex2e' failed
make: *** [build/us_pc/sm64.us.f3dex2e] Error 1
rm build/us_pc/bin/bidw_skybox.c build/us_pc/bin/bbh_skybox.c build/us_pc/bin/ccm_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 build/us_pc/bin/bitfs_skybox.c build/us_pc/bin/ssl_skybox.c build/us_pc/sound/sequences/00_sound_player.o build/us_pc/bin/cloud_floor_skybox.c

Do some of my libraries need to be 32-bit versions, or is there still a way I can use 64-bit libraries?
 

LightBeam

Well-Known Member
Member
Joined
Oct 1, 2018
Messages
977
Trophies
0
XP
2,448
Country
France
Other ports would be great but I can't see this happening. This one is real because SM64 got decompiled, I believe it is not such an easy task to do
I mean, maybe the people behind the decompilation could get behind Ocarina of Time as it's like ... idk, the 2nd, if not the best game of the N64 but yeah.
So far, it's just a straight port, I'm waiting for some Kaze Emmanuar crazy stuff to pop, and see if there are people willing to mod this

I'm still dreaming of SM64 DS being playable with a joystick, so this has the potential of making reality better than the dream ...
 

nastys

ナースティス
Member
Joined
Aug 5, 2014
Messages
1,730
Trophies
0
Age
26
Location
Earth
XP
1,794
Country
Italy
I got all that working. Almost everything went smoothly, but:
Code:
/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
/usr/bin/ld: cannot find -lSDL2
collect2: error: ld returned 1 exit status
Makefile:702: recipe for target 'build/us_pc/sm64.us.f3dex2e' failed
make: *** [build/us_pc/sm64.us.f3dex2e] Error 1
rm build/us_pc/bin/bidw_skybox.c build/us_pc/bin/bbh_skybox.c build/us_pc/bin/ccm_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 build/us_pc/bin/bitfs_skybox.c build/us_pc/bin/ssl_skybox.c build/us_pc/sound/sequences/00_sound_player.o build/us_pc/bin/cloud_floor_skybox.c

Do some of my libraries need to be 32-bit versions, or is there still a way I can use 64-bit libraries?
It definitely requires 64-bit libraries. Perhaps your distribution's packages are too old? I'm using Ubuntu 20.04, by the way.
 

Worldblender

Well-Known Member
Member
Joined
May 27, 2019
Messages
326
Trophies
0
Age
27
XP
2,245
Country
United States
It definitely requires 64-bit libraries. Perhaps your distribution's packages are too old? I'm using Ubuntu 20.04, by the way.
The MakeFile is actually forcing to compile the port as 32-bit:
Code:
ifeq ($(WINDOWS_BUILD),1)
LDFLAGS := -m32 -march=i686 -Llib -lpthread -lglew32 `sdl2-config --static-libs` -lm -lglu32 -lsetupapi -ldinput8 -luser32 -lgdi32 -limm32 -lole32 -loleaut32 -lshell32 -lwinmm -lversion -luuid -lopengl32 -no-pie -static
else
LDFLAGS := -m32 -march=i686 -lm -lGL `sdl2-config --libs` -no-pie -lpthread `pkg-config --libs libusb-1.0 glfw3` -lasound -lX11 -lXrandr -lpulse

Update: Removing or commenting out all usages of '-m32' in the Makefile will make the compilation finish successfully. Now it's time to see whether the executable 'sm64.us.f3dex2e' will actually work...
 
Last edited by Worldblender,
  • Like
Reactions: Kagamiku

nastys

ナースティス
Member
Joined
Aug 5, 2014
Messages
1,730
Trophies
0
Age
26
Location
Earth
XP
1,794
Country
Italy
The MakeFile is actually forcing to compile the port as 32-bit:
Code:
ifeq ($(WINDOWS_BUILD),1)
LDFLAGS := -m32 -march=i686 -Llib -lpthread -lglew32 `sdl2-config --static-libs` -lm -lglu32 -lsetupapi -ldinput8 -luser32 -lgdi32 -limm32 -lole32 -loleaut32 -lshell32 -lwinmm -lversion -luuid -lopengl32 -no-pie -static
else
LDFLAGS := -m32 -march=i686 -lm -lGL `sdl2-config --libs` -no-pie -lpthread `pkg-config --libs libusb-1.0 glfw3` -lasound -lX11 -lXrandr -lpulse

Update: Removing or commenting out all usages of '-m32' in the Makefile will make the compilation finish successfully. Now it's time to see whether the executable 'sm64.us.f3dex2e' will actually work...
I guess we don't have the same source code, then.
How many versions have been leaked? :unsure:
 

FAST6191

Techromancer
Editorial Team
Joined
Nov 21, 2005
Messages
36,798
Trophies
3
XP
28,346
Country
United Kingdom
I am about to crash for the evening but is it worth figuring out a way to compile this with code:blocks or something equally nice and button pressy (more or less to the point of extract this, put ROM here and make sure it is named [blah], make sure python is installed, press go)?

I would not disagree that a nice mingw/cygwin install or something is a better option if you care about programming and not wasting hard drive space but everybody can dump a ROM, extract a download, download and install two links and press go. Command line will lose people, having to do -Wall and -Werror even more so, and messing with paths is right out.

Would solve a lot of problems with download issues if we can still share the source (or a diff), and might even allow some people to have a bit of fun (should be easy enough to find the camera in this can set it to be closer, further, faster to chase, more health, infinite lives and so on and so on...).
 
  • Like
Reactions: DSoryu

Worldblender

Well-Known Member
Member
Joined
May 27, 2019
Messages
326
Trophies
0
Age
27
XP
2,245
Country
United States
I guess we don't have the same source code, then.
Just how many versions have been leaked? :unsure:

Well, I actually was using the version found off of 4Chan /v/ (Video Games) (it's thread number is 506524730). From there, I followed links that eventually led to files hosted off of anonfiles.com, and downloaded every file hosted on there. I ultimately used only the OpenGL source archive in achieving my goal. I now have a screenshot to show that I can have the port successfully run on my PC :yay: (this version shows some text after the title screen, not opening to the floating Mario head afterwards):
Screenshot_20200504_220900.png


But now I will need to figure out how to change the controls. On startup, the file 'sm64config.txt' was created in my running directory, with its contents:
Code:
fullscreen false
key_a 38
key_b 51
key_start 57
key_r 54
key_z 37
key_cup 328
key_cdown 336
key_cleft 331
key_cright 333
key_stickup 17
key_stickdown 31
key_stickleft 30
key_stickright 32
 
Last edited by Worldblender,

Kagamiku

New Member
Newbie
Joined
May 5, 2020
Messages
2
Trophies
0
Age
34
XP
44
Country
United States
The MakeFile is actually forcing to compile the port as 32-bit:
Code:
ifeq ($(WINDOWS_BUILD),1)
LDFLAGS := -m32 -march=i686 -Llib -lpthread -lglew32 `sdl2-config --static-libs` -lm -lglu32 -lsetupapi -ldinput8 -luser32 -lgdi32 -limm32 -lole32 -loleaut32 -lshell32 -lwinmm -lversion -luuid -lopengl32 -no-pie -static
else
LDFLAGS := -m32 -march=i686 -lm -lGL `sdl2-config --libs` -no-pie -lpthread `pkg-config --libs libusb-1.0 glfw3` -lasound -lX11 -lXrandr -lpulse

Update: Removing or commenting out all usages of '-m32' in the Makefile will make the compilation finish successfully. Now it's time to see whether the executable 'sm64.us.f3dex2e' will actually work...

I grabbed the newer source code revision running around as well and this fix was able to get it to compile and launch
 

uyjulian

Homebrewer
Member
Joined
Nov 26, 2012
Messages
2,567
Trophies
2
Location
United States
Website
sites.google.com
XP
3,883
Country
United States
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.
 

Attachments

  • sm64pc.diff.zip
    216.7 KB · Views: 235
  • sm64pc_macos_emscripten.diff.zip
    2.2 KB · Views: 213
Last edited by uyjulian,
  • Like
Reactions: zfreeman

Worldblender

Well-Known Member
Member
Joined
May 27, 2019
Messages
326
Trophies
0
Age
27
XP
2,245
Country
United States
Eventually, I found another website that holds a table of the keycodes used: http://www.angelfire.com/scifi/nightcode/prglang/qbasic/function/devices/keyboard_scan_codes.html
It will be handy in case anyone needs to change the keyboard controls. Below I'll copy the table here for convenience purposes:
Code:
  Key       Code    ¦     Key          Code    ¦     Key          Code
                    ¦                          ¦
  Esc       1       ¦     A            30      ¦     Caps Lock    58
  ! or 1    2       ¦     S            31      ¦     F1           59
  @ or 2    3       ¦     D            32      ¦     F2           60
  # or 3    4       ¦     F            33      ¦     F3           61
  $ or 4    5       ¦     G            34      ¦     F4           62
  % or 5    6       ¦     H            35      ¦     F5           63
  ^ or 6    7       ¦     J            36      ¦     F6           64
  & or 7    8       ¦     K            37      ¦     F7           65
  * or 8    9       ¦     L            38      ¦     F8           66
  ( or 9    10      ¦     : or ;       39      ¦     F9           67
  ) or 0    11      ¦     " or '       40      ¦     F10          68
  _ or -    12      ¦     ~ or `       41      ¦     F11          133
  + or =    13      ¦     Left Shift   42      ¦     F12          134
  Bksp      14      ¦     | or \       43      ¦     NumLock      69
  Tab       15      ¦     Z            44      ¦     Scroll Lock  70
  Q         16      ¦     X            45      ¦     Home or 7    71
  W         17      ¦     C            46      ¦     Up or 8      72
  E         18      ¦     V            47      ¦     PgUp or 9    73
  R         19      ¦     B            48      ¦     Gray -       74
  T         20      ¦     N            49      ¦     Left or 4    75
  Y         21      ¦     M            50      ¦     Center or 5  76
  U         22      ¦     < or ,       51      ¦     Right or 6   77
  I         23      ¦     > or .       52      ¦     Gray +       78
  O         24      ¦     ? or /       53      ¦     End or 1     79
  P         25      ¦     Right Shift  54      ¦     Down or 2    80
  { or [    26      ¦     Prt Sc or *  55      ¦     PgDn or 3    81
  } or ]    27      ¦     Alt          56      ¦     Ins or 0     82
  Enter     28      ¦     Spacebar     57      ¦     Del or .     83
  Ctrl      29      ¦                          ¦
 

gabisenk

Well-Known Member
Member
Joined
Nov 19, 2017
Messages
150
Trophies
0
Age
30
XP
324
Country
Romania
If you pay attention, you can see the lack of input lag that all emulators seem to have. This is as real as it gets. I always wanted to know what it's like to play the original game. Now I want to play all roms like this.......
 

VmprHntrD

Well-Known Member
Member
Joined
Nov 11, 2004
Messages
2,626
Trophies
0
Age
47
Location
Louisville, KY
XP
517
Country
United States
Well seems the original 4chan post about it and the links to both versions compiled and as source still stand as active right now. If you google it, it's there, and it works. Have to say, it's nice both are there, but the dx12 one seems a bit more nice.
 

Apache Thunder

I have cameras in your head!
Member
Joined
Oct 7, 2007
Messages
4,428
Trophies
3
Age
36
Location
Levelland, Texas
Website
www.mariopc.co.nr
XP
6,796
Country
United States
Everyone here playing the game in HD while I sit here hoping someone ports it to the Playstation 1...because why not. It would be an odd experience playing it on that console and it would be interesting to see it the console could handle this game. :D

Anyways I'll try and hunt this thing down at some point to see what it's like. Could be like previewing the Switch port that Nintendo is no doubt working on.
 

PacDan16

Well-Known Member
Newcomer
Joined
Feb 27, 2018
Messages
52
Trophies
0
Website
twitter.com
XP
250
Country
United States
I'm interested in joining the Discord server mentioned in the GitHub link shared at the beginning of this thread, but unfortunately the invite link is expired. It would be nice to get a new, working link. Figured I'd mention it. I wanted to browse it because I'm a Nintendo fan who likes homebrew, mods and other stuff like that. I'm also wondering what the devs' reactions to this recent SM64 PC Port releasing in sketchy places on the internet (from what I've seen).
Since I've seen this news, I've thought of some questions:
Are the Nintendo leaks and SM64 Port leak at the release happening around the same time purely coincidental? Who is the actual creator behind this .exe file? (I'm sure you're wondering about this one) Is it safe to run the Port program when it is being shared by many sources, passed down from many different people, from links that originated from some Discord server (that won't be named, I'm sure, for good reasons), and 4Chan?
Correct me if I'm wrong about any of this, I definitely could of missed something important.
 
Last edited by PacDan16,

FAST6191

Techromancer
Editorial Team
Joined
Nov 21, 2005
Messages
36,798
Trophies
3
XP
28,346
Country
United Kingdom
A pc port that's era approprite that runs on windows 95 and uses glide would be so cool
Given most PC ports games also on the N64 (or vice versa) were often radically different what are we going to do here?


Since I've seen this news, I've thought of some questions:
Are the Nintendo leaks and SM64 Port leak at the release happening around the same time purely coincidental? Who is the actual creator behind this .exe file? (I'm sure you're wondering about this one) Is it safe to run the Port program when it is being shared by many sources, passed down from many different people, from links that originated from some Discord server (that won't be named, I'm sure, for good reasons), and 4Chan?
Correct me if I'm wrong about any of this, I definitely could of missed something important.
Yeah coincidence. The original decompilation leaks and proper release were months back ( https://github.com/n64decomp/sm64 ) and made by decompilation (a technique that has been increasing in viability for a few years now). Removing all the stuff to interface with the N64 and instead making it work on the PC is then the next logical step really, though I am still somewhat impressed at the timelines. The recent leaks were leaks in the classical sense of someone wanders into somewhere they are not supposed to be and grabs the interesting stuff, finds an old drive not properly disposed of, or breaks trust with files they have access to and shares with others.
The exe or the fork for the PC? They might be different people but I take it you mean people to make the port. If they want to be known I am sure they will make themselves known. Here I guess they want to remain anonymous either to protect the project from the Nintendo fun police or as it was a bit of fun and don't need to be getting all the questions. We might be able to play forensics (code making is somewhat like handwriting in its uniqueness) but I don't see the need.
Safe as it ever is with that kind of chain of events. There will probably be some skiddies doing something before long but seems there are good ones out there. Might be worth getting some SHA1 or something of the good builds, or teaching people to roll their own from the source we can more easily vet. I have not looked at/made any text comparisons yet to see if there is something overt or obfuscated that needs to be looked at but I am not expecting anything.
 
  • Like
Reactions: PacDan16

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    K3Nv2 @ K3Nv2: https://stockanalysis.com/stocks/ntdoy/market-cap/ I think they'll be alright