Super Mario 64 PC port has been released!

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

uyjulian

Homebrewer
Member
Joined
Nov 26, 2012
Messages
2,567
Trophies
2
Location
United States
Website
sites.google.com
XP
3,890
Country
United States
i'm trying to build for macos using the opengl version
got the source code, have applied @uyjulian's diff patch, rom is located at ./baserom.us.z64 but when i use
Code:
make TARGET_N64=0 -j9

i get
Code:
Makefile.split:152: build/us_pc/level_rules.mk: No such file or directory
cpp -P -DVERSION_US -DNON_MATCHING -DAVOID_UB -I . -o build/us_pc/level_rules.mk levels/level_rules.mk
clang: error: no such file or directory: 'c'
clang: warning: .: 'linker' input unused [-Wunused-command-line-argument]
make: *** [build/us_pc/level_rules.mk] Error 1

i'm sure i must be missing something really obvious but any pointers would be appreciated!
You need to use the C preprocessor from GCC. The C preprocessor from Clang does not support all options. See my second patch and the related instructions.
 

bnji

Member
Newcomer
Joined
May 5, 2020
Messages
5
Trophies
0
Age
30
XP
47
Country
United Kingdom
You need to use the C preprocessor from GCC. The C preprocessor from Clang does not support all options. See my second patch and the related instructions.
thanks for that, i've installed gcc from brew, it came with cpp-9 so i've pointed my makefile to that but still stuck on this
Code:
Makefile.split:152: build/us_pc/level_rules.mk: No such file or directory
Makefile:664: *** missing separator.  Stop.
 

Nerd42

Member
Newcomer
Joined
Nov 4, 2008
Messages
8
Trophies
0
XP
187
Country
United States
Their discord link is invalid now, haha, probably due to the flood of hundreds if not thousands of people trying to join their discord to get a build.
 

SuperPichu

New Member
Newbie
Joined
May 5, 2020
Messages
2
Trophies
0
Age
28
XP
45
Country
United States
For the record, I was indeed able to build and run it on L4T Ubuntu on the switch. Had to do the comment removal from the sound file as described above and remove "-m32" and change "-march=i686" to "-march=arm64" in the Makefile.
 
  • Like
Reactions: Deleted User
D

Deleted User

Guest
OP
For the record, I was indeed able to build and run it on L4T Ubuntu on the switch. Had to do the comment removal from the sound file as described above and remove "-m32" and change "-march=i686" to "-march=arm64" in the Makefile.
How is performance on Switch?
 

SuperPichu

New Member
Newbie
Joined
May 5, 2020
Messages
2
Trophies
0
Age
28
XP
45
Country
United States
How is performance on Switch?
Not stellar. You also have to do some special setup to get SDL to accept the joycons as a gamepad. I would guess it's running at around an average of ~60% speed. But I have no actual numbers. If anyone knows how to get the game to show framerate I'd be happy to report back.
 
  • Like
Reactions: Deleted User

Taorn

Well-Known Member
Member
Joined
May 27, 2017
Messages
257
Trophies
0
Age
53
XP
1,837
Country
United States
Cross compiling on Ubuntu for Windows doesn't seem to work.
g++ doesn't have any target -mwindows. And -m64 seems to miss two libs (xinput9_1_0, Ole32) on the system.
Should be one DirectX lib and the other one is a COM lib. How would that work?

Any pointers how to cross compile it?
 
Last edited by Taorn,

Worldblender

Well-Known Member
Member
Joined
May 27, 2019
Messages
326
Trophies
0
Age
27
XP
2,252
Country
United States
While I have made good progress with this port (using a PowerA Xbox One controller to access analog contols), minus the quirks of typical late 1990s video games, it does make me wonder: with the OpenGL source code version, could it be possible to get this port to run on other Unix-like (but non-Linux) operating systems, such as the various BSD distros (most likely to try FreeBSD) after compilation?
 
Last edited by Worldblender,

Colbydude

Member
Newcomer
Joined
Nov 11, 2011
Messages
6
Trophies
0
Website
colbydude.com
XP
201
Country
United States
thanks for that, i've installed gcc from brew, it came with cpp-9 so i've pointed my makefile to that but still stuck on this
Code:
Makefile.split:152: build/us_pc/level_rules.mk: No such file or directory
Makefile:664: *** missing separator.  Stop.
Use GNU Make.
I was able to get past the separator error by converting indentations to tabs. Running
gmake TARGET_N64=0 -j5
got me this far:
Code:
gcc-9 -P -DVERSION_US -DNON_MATCHING -DAVOID_UB -I . -o build/us_pc/level_rules.mk levels/level_rules.mk
ld: warning: ignoring file levels/level_rules.mk, building for macOS-x86_64 but attempting to link with file built for unknown-unsupported file format ( 0x23 0x64 0x65 0x66 0x69 0x6E 0x65 0x20 0x53 0x54 0x55 0x42 0x5F 0x4C 0x45 0x56 )
Undefined symbols for architecture x86_64:
  "_main", referenced from:
     implicit entry/start for main executable
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
gmake: *** [Makefile.split:151: build/us_pc/level_rules.mk] Error 1

Edit: Issue with my tooling, got it now!
 
Last edited by Colbydude,

bnji

Member
Newcomer
Joined
May 5, 2020
Messages
5
Trophies
0
Age
30
XP
47
Country
United Kingdom
Use GNU Make.
Hurrah, after all day trial and erroring, finally got it running! Thanks for the help :)

Just need to figure out resizing the window & limiting it to 30fps... This is crazy though. Excited to see what else comes from these decompiles.
 

Soulslimm

Member
Newcomer
Joined
May 5, 2020
Messages
12
Trophies
0
Age
24
XP
47
Country
United States
I was able to get past the separator error by converting indentations to tabs. Running
gmake TARGET_N64=0 -j5
got me this far:
Code:
gcc-9 -P -DVERSION_US -DNON_MATCHING -DAVOID_UB -I . -o build/us_pc/level_rules.mk levels/level_rules.mk
ld: warning: ignoring file levels/level_rules.mk, building for macOS-x86_64 but attempting to link with file built for unknown-unsupported file format ( 0x23 0x64 0x65 0x66 0x69 0x6E 0x65 0x20 0x53 0x54 0x55 0x42 0x5F 0x4C 0x45 0x56 )
Undefined symbols for architecture x86_64:
  "_main", referenced from:
     implicit entry/start for main executable
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
gmake: *** [Makefile.split:151: build/us_pc/level_rules.mk] Error 1
What program should i compile in? i'm new to this and i'm shit at coding
 

bnji

Member
Newcomer
Joined
May 5, 2020
Messages
5
Trophies
0
Age
30
XP
47
Country
United Kingdom
I was able to get past the separator error by converting indentations to tabs. Running
gmake TARGET_N64=0 -j5
got me this far:
Code:
gcc-9 -P -DVERSION_US -DNON_MATCHING -DAVOID_UB -I . -o build/us_pc/level_rules.mk levels/level_rules.mk
ld: warning: ignoring file levels/level_rules.mk, building for macOS-x86_64 but attempting to link with file built for unknown-unsupported file format ( 0x23 0x64 0x65 0x66 0x69 0x6E 0x65 0x20 0x53 0x54 0x55 0x42 0x5F 0x4C 0x45 0x56 )
Undefined symbols for architecture x86_64:
  "_main", referenced from:
     implicit entry/start for main executable
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
gmake: *** [Makefile.split:151: build/us_pc/level_rules.mk] Error 1
I can't quite remember how I fixed mine as it was all trial and error, but what I do remember is I added all the missing gnu tools to the ./tools folder. If I'm not breaking any rules by sharing it I'd be happy to share just my Makefile and tools folder?
 

Soulslimm

Member
Newcomer
Joined
May 5, 2020
Messages
12
Trophies
0
Age
24
XP
47
Country
United States
Hurrah, after all day trial and erroring, finally got it running! Thanks for the help :)

Just need to figure out resizing the window & limiting it to 30fps... This is crazy though. Excited to see what else comes from these decompiles.
I know i sound like a scum. but if you find a way can you send it over on discord? Soulslimm#4957
 

LittleRain

Member
Newcomer
Joined
Jan 14, 2020
Messages
5
Trophies
0
Age
32
XP
49
Country
Canada
"The program can't start because d3d12.dll is missing from your computer"
lol, I need DirectX 12 to run Mario 64?
Lol, I don't get why they didnt use Open GL, even an old version would run it fine. Then it could be cross platform as well.
Maybe I'll give it a go when I have the time.
I assume they chose direct X 12 for raytracing, but could be wrong.
 

ArcadeGamer1929

New Member
Newbie
Joined
Jul 4, 2018
Messages
2
Trophies
0
Age
21
XP
155
Country
United Kingdom
"The program can't start because d3d12.dll is missing from your computer"
lol, I need DirectX 12 to run Mario 64?

Lol, I don't get why they didnt use Open GL, even an old version would run it fine. Then it could be cross platform as well.
Maybe I'll give it a go when I have the time.
I assume they chose direct X 12 for raytracing, but could be wrong.

An OpenGL version exists out in the wild, I have it, but to abide by the rules on this forum, I cannot post it here.
 

Leehro

New Member
Newbie
Joined
Jun 3, 2006
Messages
2
Trophies
0
XP
269
Country
Afghanistan
I was able to get past the separator error by converting indentations to tabs. Running
gmake TARGET_N64=0 -j5
got me this far:
Code:
gcc-9 -P -DVERSION_US -DNON_MATCHING -DAVOID_UB -I . -o build/us_pc/level_rules.mk levels/level_rules.mk
ld: warning: ignoring file levels/level_rules.mk, building for macOS-x86_64 but attempting to link with file built for unknown-unsupported file format ( 0x23 0x64 0x65 0x66 0x69 0x6E 0x65 0x20 0x53 0x54 0x55 0x42 0x5F 0x4C 0x45 0x56 )
Undefined symbols for architecture x86_64:
  "_main", referenced from:
     implicit entry/start for main executable
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
gmake: *** [Makefile.split:151: build/us_pc/level_rules.mk] Error 1

Edit: Issue with my tooling, got it now!

what did you do for the linker error?

edit: Also figured it out. Even though I was running "gnumake" I actually needed to brew install make and run
/usr/local/opt/make/libexec/gnubin/make
 
Last edited by Leehro,

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • K3Nv2
  • Xdqwerty
    what are you looking at?
  • BakerMan
    I rather enjoy a life of taking it easy. I haven't reached that life yet though.
    K3Nv2 @ K3Nv2: https://youtube.com/shorts/Tt5J7AfCK6E?si=g4dGzOkhACLJAovM