Super Mario 64 PC port has been released!

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

Deleted member 381889

Guide Writer
Member
Joined
Jan 29, 2016
Messages
2,035
Trophies
1
XP
4,420
Hello, I am trying to compile a Windows build on Ubuntu 20.04 (on Windows 10 with WSL) from 'sm64pc_src.zip' (OpenGL) using the US ROM.
I am able to successfully compile and run a build for Ubuntu (18.04, Virtual Machine), but not for Windows.

From a fresh installation, I executed:
Code:
sudo apt update
sudo apt upgrade

I then installed the packages using the command from @nastys, as well as the qemu-irix package:
Code:
sudo apt install build-essential pkg-config git binutils-mips-linux-gnu python3 zlib1g-dev libaudiofile-dev libsdl2-dev x11proto-randr-dev libusb-dev libglfw3-dev libusb-1.0.0-dev
sudo dpkg -i qemu-irix-2.11.0-2169-g32ab296eef_amd64.deb

WSL could not find libusb-1.0.0-dev, so I changed it to libusb-1.0-0-dev (notice the hyphen between the two zeroes). VM18.04 automatically changed it to that.

I then executed
Code:
'make TARGET_N64=0 WINDOWS_BUILD=1 -j4'

wup.c:22 did not compile to due the libusb include, so I changed the include <libusb.h> to <libusb-1.0/libusb.h>

after cleaning and rebuilding, I encountered the following error message:
Code:
g++: error: unrecognized command line option ‘-mwindows’
make: *** [Makefile:702: build/us_pc/sm64.us.f3dex2e.exe] Error 1

Does anyone know what I am doing wrong?
I'm getting the exact same error as well, can't seem to get it working.
 

xElite_V

New Member
Newbie
Joined
May 29, 2018
Messages
3
Trophies
0
Age
24
XP
69
Country
United States
Getting the same issue attempting to build an EXE for Windows.
Code:
g++: error: unrecognized command line option ‘-mwindows’
make: *** [Makefile:702: build/us_pc/sm64.us.f3dex2e.exe] Error 1
Does anyone know how to fix this? I've built it on Ubuntu 20.04 but can't build an EXE file.
 

IC_

GBAtemp's ???
Member
Joined
Aug 24, 2017
Messages
1,569
Trophies
1
Location
The Forest
XP
5,466
Country
Antarctica
PC port already has those by default.
I've read that you need to remove the commented code in the 00_sound_player.s file. Seems like the compiler accidentally uses the comments as parameters.
I think I tried it first without that flag and it didn't work but it worked just fine after adding that flag
 

GizmoTheGreen

Well-Known Member
Member
Joined
Oct 8, 2009
Messages
813
Trophies
1
XP
905
Country
damn, i tried in windows using ubuntu from microsoft store, manjora VM and Ubuntu VM and kept getting same issues as you and I gave up. i already had the exe but i wanted to try compiling myself, nice to see the source was broken causing the issue haha
just went through the file with CTRL+f for # and removed all comments.
 

bnji

Member
Newcomer
Joined
May 5, 2020
Messages
5
Trophies
0
Age
30
XP
47
Country
United Kingdom
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!
 

cyb0rg

Well-Known Member
Newcomer
Joined
Aug 29, 2014
Messages
79
Trophies
0
XP
1,711
Country
United States
For those who don't have an Xbox controller, this worked for me:

XOutput presumably works with all sorts of controllers, but this is my particular setup confirmed working without any issues.

Wii Classic Controller Adapter for PC
http://www.mayflash.com/Products/PCUSB/PC052.html

Wii Classic Controller Pro - Black - Nintendo Wii Standard Edition
https://www.amazon.com/Wii-Classic-Controller-Pro-Nintendo-Standard/dp/B002TLTBN0

https://sourceforge.net/projects/xoutput/

XOutput Setup:

1. Open XOutput.exe
2. [Add controller]
3. [Edit]
4. Set up your thumb sticks and buttons.
5. [X] out of the window when you are done.
6. [Save Configuration]
7. [Start]
8. Open mario.exe


Alternative for PS4 controllers:

DS4Windows.exe
http://ds4windows.com


Update:
XOutput confirmed working without issue with this controller:
Nyko 80610 Airflo PC Game Controller
https://www.amazon.com/Nyko-80610-AirFlo-Game-Controller/dp/B0000TNJWM/
(No additional adapter was used.)
 
Last edited by cyb0rg,
  • Like
Reactions: Pokemon_Tea_Sea_Jee

Pokemon_Tea_Sea_Jee

Well-Known Member
Member
Joined
May 3, 2020
Messages
666
Trophies
0
XP
585
Country
Canada
For those who don't have an Xbox controller, this worked for me:

XOutput presumably works with all sorts of controllers, but this is my particular setup confirmed working without any issues.

Wii Classic Controller Adapter for PC
http://www.mayflash.com/Products/PCUSB/PC052.html

Wii Classic Controller Pro - Black - Nintendo Wii Standard Edition
https://www.amazon.com/Wii-Classic-Controller-Pro-Nintendo-Standard/dp/B002TLTBN0

https://sourceforge.net/projects/xoutput/

XOutput Setup:

1. Open XOutput.exe
2. [Add controller]
3. [Edit]
4. Set up your thumb sticks and buttons.
5. [X] out of the window when you are done.
6. [Save Configuration]
7. [Start]
8. Open mario.exe

Alternative for PS4 controllers:

DS4Windows.exe
I have a black Classic Controller Pro. It came bundled with my copy of Monster Hunter Tri
149765-l.jpg


Daang! I just saw this beautiful thing:
18j50ktgj2m29jpg.jpg
 
Last edited by Pokemon_Tea_Sea_Jee,

xElite_V

New Member
Newbie
Joined
May 29, 2018
Messages
3
Trophies
0
Age
24
XP
69
Country
United States
I managed to compile the OpenGL version (the one with the menu text). I used this guide: Removed it prevented post from new members.
This worked for me and allowed me to compile DX12 version on Windows. Thanks for this. I've saved this site on my PC in case it gets deleted.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Purple_Heart @ Purple_Heart: ye