# Super Mario 64 PC port has been released!



## Deleted User (May 3, 2020)

A Super Mario PC port has been released!

This is based on the decompiled version of SM64. https://github.com/n64decomp/sm64

First released on discord server. I got my version from a Gofile link. I don´t know if this is legal to share.
Installation is very easy. Just open the mario.exe file. I played the game with my Xbox 360 controller.
I finished the first course, the game runs like a dream!

Update: Nintendo started to take down youtube videos of the pc port.


----------



## FAST6191 (May 3, 2020)

Something actually happened on a discord server? What strange times we live in. Almost enough to make me consider paying attention to the service or at least archive it (stupid proprietary services).

I will be curious to see the resulting code and what was done.
Hopefully it is not a pack in emulator type setup and actually some code properly changed. If it is proper code I imagine the first will be more smooshed around until it compiles but steps in the right direction and all that.


----------



## spotanjo3 (May 3, 2020)

Too bad, I finished it a loooong time ago when N64 was first released. It was fun. I am surprised that it can be done without an emulator. I heard that Zelda 64 like this one will be next. Again,, already played them and I am not going to replay them. Great for people who are struggled with n64 games! Have fun!


----------



## pcwizard7 (May 3, 2020)

OMG thanks


----------



## Deleted User (May 3, 2020)

oh lovely jesus this is amazing

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

now we need pc ports for smash 64, starfox 64 and f zero x


----------



## FAST6191 (May 3, 2020)

azoreseuropa said:


> Too bad, I finished it a loooong time ago when N64 was first released. It was fun. I am surprised that it can be done without an emulator. I heard that Zelda 64 like this one will be next. Again,, already played them and I am not going to replay them. Great for people who are struggled with n64 games! Have fun!


I fear you are missing what this means for the potential future of the game.

With the code now being on PC then mario 64 levels, mods, tweaks and adaptations should be more or less in line with other PC games and open source games.
You don't then have to wait for someone to learn the arcane hardware of the N64*, or deal with the tedious level editors and restrictions of the N64 (if your PC game wants gigabytes to install then nobody cares, 100 megabytes on the N64 is a huge deal and very hard to do).

Hundreds of levels, said levels could easily be 200 times the size, could house thousands of enemies, puzzles and more, new moves, far better graphics, actual 3d, crazy frame rates if you wanted, controls how you like them and on and on and on. How much of that will happen I don't know, and there is the risk of the Nintendo fun police stepping in if it gets too out of hand but having it on the PC places it in the range of a bored programmer or half bright kid messing around of an evening rather than dedicating years to both learn and do some quite complicated stuff that will not be used other than to modify the games.

*I know assembly for several things, I can reach out and touch several actual books on electronics of the sorts of levels that matter here, ROM hacking is a thing I do, I had an N64 back in the day, still have the same one and most of the good PAL games games for it (including Mario 64 for that matter). I don't know the N64 and have actively avoided learning it in favour of other things, and still don't care to as it is that annoying.


----------



## nolimits59 (May 3, 2020)

Found it but the game run at x60 speed for me x)


----------



## pcwizard7 (May 3, 2020)

still trying to locate it


----------



## spotanjo3 (May 3, 2020)

FAST6191 said:


> I fear you are missing what this means for the potential future of the game.
> 
> With the code now being on PC then mario 64 levels, mods, tweaks and adaptations should be more or less in line with other PC games and open source games.
> You don't then have to wait for someone to learn the arcane hardware of the N64*, or deal with the tedious level editors and restrictions of the N64 (if your PC game wants gigabytes to install then nobody cares, 100 megabytes on the N64 is a huge deal and very hard to do).
> ...



Ok. Thank you.


----------



## Deleted User (May 3, 2020)

can you post the link to the discord server?

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



pcwizard7 said:


> still trying to locate it


same, I can't find it anywhere


----------



## nolimits59 (May 3, 2020)

I personnaly found it on a spanish forum (they posted the gofile link)

*Super Mario 64 ha sido portado a PC*


Anyone got the problem of the WAYYYYYY too fast game ?


----------



## dekuleon (May 3, 2020)

I got the Mario 64 PC Port, runs amazingly.
All I want is Majoras Mask compiled for PC now... it's one of the few Zelda games that I didn't finish.


----------



## JeffRuLz (May 3, 2020)

"The program can't start because d3d12.dll is missing from your computer"
lol, I need DirectX 12 to run Mario 64?


----------



## ZeroShift (May 3, 2020)

JeffRuLz said:


> "The program can't start because d3d12.dll is missing from your computer"
> lol, I need DirectX 12 to run Mario 64?


Whoever compiled it set the target for DX12

EDIT: Also, it runs way too fast


----------



## nolimits59 (May 3, 2020)

ZeroShift said:


> Whoever compiled it set the target for DX12
> 
> EDIT: Also, it runs way too fast


Got the same bug... dunno how everyone got it run normal :/

What processor do you have ?

I have a 3770k


----------



## Deleted User (May 3, 2020)

nolimits59 said:


> Got the same bug... dunno how everyone got it run normal :/
> 
> What processor do you have ?
> 
> I have a 3770k


Mine is a AMD Ryzen 3 2200U


----------



## ZeroShift (May 3, 2020)

nolimits59 said:


> Got the same bug... dunno how everyone got it run normal :/
> 
> What processor do you have ?
> 
> I have a 3770k


i7-9700k

EDIT: Checked their Discord, might have something to do with high refresh rates. I'm running at 144hz, and they recommend lowering it to 120hz


----------



## CMDreamer (May 3, 2020)

DX12 for a game from 1996, really? Oh well...

Great/marvelous/awesome achievement by the way, possibilities are endless now.


----------



## Kioku_Dreams (May 3, 2020)

If you have an Nvidia card you can use the Control Panel to limit the frames to 30FPS. This is an exciting time! Too bad Ninty won't like this.


----------



## ShootingStar (May 3, 2020)

Oh god no.
It's cool and all it's available but we PROBABLY shouldn't talk about it, news reporters are stupid and WILL scream at the top of their lungs about this for Nintendo to hear.


----------



## nani17 (May 3, 2020)

Not bad but get it while you can nintendo will come after this


----------



## DrHouse1337 (May 3, 2020)

where is "mario.exe"?


----------



## nolimits59 (May 3, 2020)

ZeroShift said:


> i7-9700k
> 
> EDIT: Checked their Discord, might have something to do with high refresh rates. I'm running at 144hz, and they recommend lowering it to 120hz


Got an old "king"  ACER G245, so i'm 60hz :/.

Will try to force a VSYNC with Nvidia panel.

EDIT: it work but 60fps is still twice as needed x), anyway to force like the FPS with Nvidia ?
EDIT2: found it, working FLAWLESSLY now!


----------



## Stealphie (May 3, 2020)

Dodain47 said:


> A Super Mario PC port has been released!
> 
> This is based on the decompiled version of SM64. https://github.com/n64decomp/sm64
> 
> ...



This is so cool! Tho running it on a PC wasn't a real issue, any 2000's PC should be able to handle SM64 running on P64 just fine. Oh well.


----------



## Stealphie (May 3, 2020)

Nintendo: Perish or Perish


----------



## Kioku_Dreams (May 3, 2020)

Stealphie said:


> This is so cool! Tho running it on a PC wasn't a real issue, any 2000's PC should be able to handle SM64 running on P64 just fine. Oh well.


That's just it.. This is better.


----------



## FAST6191 (May 3, 2020)

ShootingStar said:


> Oh god no.
> It's cool and all it's available but we PROBABLY shouldn't talk about it, news reporters are stupid and WILL scream at the top of their lungs about this for Nintendo to hear.


I don't know what goes here, or what Nintendo might do, but I don't know if I would go that way.

It is not your classic fan game that gets announced as near complete, and then the high speed C&D fairy arrives before the horse has bolted that we have seen the last few times. Indeed the decompilation project that kicked it off has been sitting out in the open for how many months now ( https://github.com/n64decomp/sm64 ), and functional equivalents for pokemon for longer still ( https://glitchcity.info/wiki/List_of_Pokémon_disassembly_projects / https://github.com/pret/pokered  ).
Don't get me wrong though I am slightly apprehensive as Nintendo would appear to have trademark law, copyright law and maybe even patent law somewhere in the mix in some locations (ew software patents) all on their side should they decide to get a bit C&D happy. To that end I do however hope the source code for this port is out there/made available such that it can escape into the seedy underbelly of the internet, or that what upon seeing the original leak of the decompilation I thought was going to be a nightmare port to PC actually is not that bad such that it can be redone in short enough order.


----------



## Dothackjhe (May 3, 2020)

Was not Nintendo rumored at remastering this game for the Switch not too long ago?


----------



## Stealphie (May 3, 2020)

Dothackjhe said:


> Was not Nintendo rumored at remastering this game for the Switch not too long ago?


Rumored. I doubt it's true.


----------



## ChaosEternal (May 4, 2020)

My god. I never thought I'd see the day this came to pass. I can only imagine the possibilities! The source was the first step and this (assuming it truly is natively running and isn't emulated) was the next. Who knows what will happen now?


----------



## ShootingStar (May 4, 2020)

ChaosEternal said:


> My god. I never thought I'd see the day this came to pass. I can only imagine the possibilities! The source was the first step and this (assuming it truly is natively running and isn't emulated) was the next. Who knows what will happen now?


Me, imo i'm hoping that more SM64 source ports will come to follow.
I'd love to see a GZDoom-equivelent source port for SM64 with all sorts of wild enhancements and features.


----------



## 1NOOB (May 4, 2020)

how do you get a controller to work with this .


----------



## Stealphie (May 4, 2020)

ShootingStar said:


> Me, imo i'm hoping that more SM64 source ports will come to follow.
> I'd love to see a GZDoom-equivelent source port for SM64 with all sorts of wild enhancements and features.


SM64 for Switch would be sick


----------



## Pokemon_Tea_Sea_Jee (May 4, 2020)

At the moment, can we play it at 60fps?


----------



## Kwyjor (May 4, 2020)

FAST6191 said:


> Don't get me wrong though I am slightly apprehensive as Nintendo would appear to have trademark law, copyright law and maybe even patent law somewhere in the mix in some locations (ew software patents) all on their side should they decide to get a bit C&D happy.


As the game came out in 1996, even if there were patents involved, they would have expired by now.


----------



## Hambrew (May 4, 2020)

my interest peaks

except i dunno where it can appear


----------



## FAST6191 (May 4, 2020)

Kwyjor said:


> As the game came out in 1996, even if there were patents involved, they would have expired by now.


There are some weird ways to chain some patents together (mainly so you don't technically end up competing with yourself, see some of the end of the nes dpad articles on that one there), but yeah enough time has probably passed by now for any software patent related fun.


----------



## nolimits59 (May 4, 2020)

FAST6191 said:


> There are some weird ways to chain some patents together (mainly so you don't technically end up competing with yourself, see some of the end of the nes dpad articles on that one there), but yeah enough time has probably passed by now for any software patent related fun.



They can't play with the fact they released the game on Wii on the VC for exemple ?


----------



## Kioku_Dreams (May 4, 2020)

Pokemon_Tea_Sea_Jee said:


> At the moment, can we play it at 60fps?


Yes, but it's fast. 



ShootingStar said:


> Me, imo i'm hoping that more SM64 source ports will come to follow.
> I'd love to see a GZDoom-equivelent source port for SM64 with all sorts of wild enhancements and features.



That'd be amazing.


----------



## yadspi (May 4, 2020)

A lot of people are confused it seems, this is not emulated, it's running native on PC. Right now it works perfectly in widescreen (you can cap the frame-rate with RivaTuner or you GPU control panel) and up to 4k. Xinput controller works out of the box too, waiting for a high-res UI, save states and options menu for FPS, Resolutions and controls and it's just a perfect N64 remaster.


----------



## Kioku_Dreams (May 4, 2020)

Went through and  beat it. Can't wait to see what comes from this. Hopefully it doesn't die too quickly.


----------



## nolimits59 (May 4, 2020)

yadspi said:


> A lot of people are confused it seems, this is not emulated, it's running native on PC. Right now it works perfectly in widescreen (you can cap the frame-rate with RivaTuner or you GPU control panel) and up to 4k. Xinput controller works out of the box too, waiting for a high-res UI, save states and options menu for FPS, Resolutions and controls and it's just a perfect N64 remaster.


I would love to see a 3DS port tbh !


----------



## campbell0505 (May 4, 2020)

Does this work with most controllers, for example, the switch pro controller? Anyways, this is awesome.


----------



## FAST6191 (May 4, 2020)

nolimits59 said:


> They can't play with the fact they released the game on Wii on the VC for exemple ?


That has no real relevance in patents. That would only really come into play if someone being sued by Nintendo wanted to claim they abandoned their property (something Nintendo knows all too well -- their Kirby character was named for a lawyer defending them when the theoretical owners of King Kong came knocking about Donkey Kong and the final court result noted king kong and kong were used by all sorts in the general public).
Likewise most places in the world consider software patents an utter abomination (short version is software is maths and you can't patent maths, the US and Japan somehow manage anyway and it generally makes a big mess) so you also have that to worry about.

If Nintendo were to reach out then they have a 5000 times easier case just about anywhere in the world going after either trademark (I imagine they still have the trademark for Super Mario 64, certainly for Mario) for while you and I know this is as likely to be an official Nintendo product as Nintendo turning around tomorrow saying "all good there lads, here have a million to give it a spit and polish up for release" the "typical consumer" may not. You are also somewhat obliged to defend your trademarks, hence most of the takedowns of fan projects we see from them and most of the wording in the video footage/let's play agreements.

Alternatively I would hate to see what decompiled code like this counts as in court but it is not like don't still own the copyright to the models, music, levels, animations, probably actions/play style... and can happily say this was made from at least a derived work of our original work.


----------



## Magnus87 (May 4, 2020)

I'll wait for the version compatible with Ray Tracing


----------



## EIREXE (May 4, 2020)

I have the feeling that having the binaries be released before the source code is risky.


----------



## WannyTiggah (May 4, 2020)

EIREXE said:


> I have the feeling that having the binaries be released before the source code is risky.


As someone mentioned before, this project has been around for a while. Source code is here: https://github.com/n64decomp/sm64


----------



## EIREXE (May 4, 2020)

WannyTiggah said:


> As someone mentioned before, this project has been around for a while. Source code is here: https://github.com/n64decomp/sm64


I am aware, I was referring in particular to the port.


----------



## Kioku_Dreams (May 4, 2020)

Didn't even think to check the n64decomp site. Perfect Dark, Goldeneye and Majora's Mask? Oh my.


----------



## E1ite007 (May 4, 2020)

EIREXE said:


> I have the feeling that having the binaries be released before the source code is risky.


I doubt we'll have the source for the port specifically until the project is considered complete, or maybe even ever.
Releasing the source right now would mean more proof for Nintendo that they're using copywritten material, and although they obviously are, the less proofs against 'em is the safest for the project and for them.
Also, if you're worried about viruses, you can check the executable with VirusTotal.


----------



## FAST6191 (May 4, 2020)

E1ite007 said:


> Also, if you're worried about viruses, you can check the executable with VirusTotal.



Because people capable of translating decompiled "this is our first go on new hardware" code to modern PC compatible code could not dodge something as simple as virustotal?

Normally I hate make disclaimers but what they hey. I have not seen this program, and indeed have no more info than what is on this thread already. Nobody has suggested it is a dodgy file, much less given reason to suspect it from what I have seen.

That said I imagine the reason for not dropping code right now is probably more desire to not create 5000 forks immediately when stuff is still to be done.


----------



## E1ite007 (May 4, 2020)

FAST6191 said:


> Because people capable of translating decompiled "this is our first go on new hardware" code to modern PC compatible code could not dodge something as simple as virustotal?
> 
> Normally I hate make disclaimers but what they hey. I have not seen this program, and indeed have no more info than what is on this thread already. Nobody has suggested it is a dodgy file, much less given reason to suspect it from what I have seen.
> 
> That said I imagine the reason for not dropping code right now is probably more desire to not create 5000 forks immediately when stuff is still to be done.


I've seen claims in spanish forums that the program makes some "dodgy calls" on the system and that it has virus.
My reply is to someone who speaks spanish natively so that's why I'm making that assumption.


----------



## nastys (May 4, 2020)

The debug symbols are still in the exe, so it shouldn't be too hard to see if it contains malware.


----------



## CeeDee (May 4, 2020)

yadspi said:


> waiting for a high-res UI


Might be a hot take here, but something about those pixellized UI icons is just so iconic that I wouldn't want to see them replaced by something high res.


----------



## shano (May 4, 2020)

Why dx12 over opengl, vulkan, dx11?


----------



## megahog2012 (May 4, 2020)

Hey letting you guys know the source is already out


----------



## Magnus87 (May 4, 2020)

Memoir said:


> Didn't even think to check the n64decomp site. Perfect Dark, Goldeneye and Majora's Mask? Oh my.



I would love to see a merger between OOT and MM


----------



## Viri (May 4, 2020)

Can't wait for OOT to get ported, and people to mod it to add OOT3D textures to it.


----------



## pcwizard7 (May 4, 2020)

found it


----------



## Pokemon_Tea_Sea_Jee (May 4, 2020)

Memoir said:


> Yes, but it's fast.


The game does not play at a correct speed?


----------



## ital (May 4, 2020)

nolimits59 said:


> I would love to see a 3DS port tbh !



Oh indeed. That would be quite great. F Zero X as well please!


----------



## Ecchi95 (May 4, 2020)

To find the source code, simply google "sm64pc_src_zip" (doesn't matter if it has quotes)


----------



## SkyDX (May 4, 2020)

So is the gofile .exe safe or not?


----------



## nastys (May 4, 2020)

shano said:


> Why dx12 over opengl, vulkan, dx11?


Apparently, the same source code can be compiled on Linux with GLX.


----------



## nolimits59 (May 4, 2020)

SkyDX said:


> So is the gofile .exe safe or not?


this is the one i have

https://www.virustotal.com/gui/file...b2350b52febc3de77712b7df05eb181a9f5/detection


----------



## nastys (May 4, 2020)

Oh, it just works after copying the base rom to ./baserom.us.z64 and installing the required dependencies.

```
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
make TARGET_N64=0 -j$(nproc)
```
To run it in full screen, open Settings, go to Keyboard Shortcuts, and assign anything to Toggle Fullscreen.




It should also work on L4T Ubuntu on Switch.


----------



## Deleted User (May 4, 2020)

Okay, please stop sending me requests via pm. I´m not going to tell you where you can get the files.
Google is your friend.


----------



## SkyDX (May 4, 2020)

nolimits59 said:


> this is the one i have
> 
> https://www.virustotal.com/gui/file...b2350b52febc3de77712b7df05eb181a9f5/detection



Thanks, looks pretty clean to me


----------



## FAST6191 (May 4, 2020)

Found the source code, I have not gone through it anywhere close to properly to say with any kind of certainty but if it pulls data from the original ROM (see Jenkinsfile within the source, and various readmes) it might be as free and clear as the basic decompilation. Slightly concerned about the level files though. Timestamps are interesting as well if accurate.

Anyway had a cursory skim around but have not seen the original since the leak and my even quicker comparison to final, not to mention I am far from the best Windows game programmer to be making any kind of proper assessment. Does look like a reasonable amount of work went into it and not as many bodges and kludges as I normally would expect in such an early stage project -- it still bears some scars from its heritage but nothing that can't be worked around.


----------



## EIREXE (May 4, 2020)

E1ite007 said:


> I doubt we'll have the source for the port specifically until the project is considered complete, or maybe even ever.
> Releasing the source right now would mean more proof for Nintendo that they're using copywritten material, and although they obviously are, the less proofs against 'em is the safest for the project and for them.
> Also, if you're worried about viruses, you can check the executable with VirusTotal.



They would be in legal trouble regardless of source code availability, since they are already using nintendo characters, assets and trademarks.


----------



## nastys (May 4, 2020)

EIREXE said:


> They would be in legal trouble regardless of source code availability, since they are already using nintendo characters, assets and trademarks.


The source code doesn't include the assets.


----------



## EIREXE (May 4, 2020)

nastys said:


> The source code doesn't include the assets.


Interesting, I was unaware the decompile project required the models and animations from the game's binary (afaik the models in sm64 are built with the binary, but they may have changed this), does this release not include any models and textures then?


----------



## FAST6191 (May 4, 2020)

nastys said:


> The source code doesn't include the assets.


While they appear to have made an effort to remove things the one I got had coordinates for models within the levels it seems.


----------



## nastys (May 4, 2020)

FAST6191 said:


> While they appear to have made an effort to remove things the one I got had coordinates for models within the levels it seems.
> 
> View attachment 207570


So the models are actually hardcoded?


----------



## EIREXE (May 4, 2020)

nastys said:


> So the models are actually hardcoded?


They are hardcoded in the binary, but the decompilation project (mostly) doesn't include them, you have to extract them into c source code with a tool they provide.

I am not sure if the port requires you to provide a rom.


----------



## uyjulian (May 4, 2020)

Here is a diff of the PC sources against sm64 decompilation repo commit 9273f38df135273d905ac14e7a090ebac4ba3ae9...


----------



## Kioku_Dreams (May 4, 2020)

EIREXE said:


> They are hardcoded in the binary, but the decompilation project (mostly) doesn't include them, you have to extract them into c source code with a tool they provide.
> 
> I am not sure if the port requires you to provide a rom.


Well, if the assets aren't included with the decomp, then I'd say it's a safe bet.


----------



## nastys (May 4, 2020)

EIREXE said:


> I am not sure if the port requires you to provide a rom.


Once compiled and built, they are embedded in the binary, even if you compile it for Linux/OpenGL.


----------



## FAST6191 (May 4, 2020)

nastys said:


> So the models are actually hardcoded?


Looks like they are in this copy I have. However if they are that basic it should be possible to grab them from the ROM and generate like many other things.


----------



## TVL (May 4, 2020)

Wow, some people really do some incredible things. Hope someone manages to make a nice level editor for this.

This makes me wish all source code for every abandoned/cancelled/obsolete software would be released and freely available for everyone so those devoted enough can make something out of it.


----------



## EIREXE (May 4, 2020)

FAST6191 said:


> Looks like they are in this copy I have. However if they are that basic it should be possible to grab them from the ROM and generate like many other things.


That model in particular you posted is also in the public decompilation repository:

https://github.com/n64decomp/sm64/blob/master/levels/castle_courtyard/areas/1/2/model.inc.c



nastys said:


> Once compiled and built, they are embedded in the binary, even if you compile it for Linux/OpenGL.



I am aware, that's what I was referring to, unless the people who made the port have extensively modified the game to be able to load models and textures at runtime.



Memoir said:


> Well, if the assets aren't included with the decomp, then I'd say it's a safe bet.


They aren't included in the decomp but you need them to build the game, unless you've done extensive modifications to it to be able to load it externally.

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



TVL said:


> Wow, some people really do some incredible things. Hope someone manages to make a nice level editor for this.
> 
> This makes me wish all source code for every abandoned/cancelled/obsolete software would be released and freely available for everyone so those devoted enough can make something out of it.



I wish copyright terms weren't so long, if they were 25 or 30 years sm64 would be close to entering the public domain by now.


----------



## zfreeman (May 4, 2020)

EIREXE said:


> I wish copyright terms weren't so long, if they were 25 or 30 years sm64 would be close to entering the public domain by now.


USA copyright might be extending again in 2023 to meet the Mickey Mouse Curve.
https://alj.artrepreneur.com/mickey-mouse-keeps-changing-copyright-law/


----------



## Facest4b (May 4, 2020)

Does anyone know how to assign controls to a keyboard or ps3 controller with this?


----------



## zfreeman (May 4, 2020)

Facest4b said:


> Does anyone know how to assign controls to a keyboard or ps3 controller with this?


I use JoyToKey. https://joytokey.net/en/download


----------



## nastys (May 4, 2020)

Facest4b said:


> Does anyone know how to assign controls to a keyboard or ps3 controller with this?


Edit the configuration file to change the keys.
To use a PS3 controller on Windows, use SCPToolkit. On Linux, it should just work (if not, change the SDL controller configuration).


zfreeman said:


> I use JoyToKey. https://joytokey.net/en/download


It emulates a keyboard, which means the analog sticks only work in 8 directions if you use it.


----------



## uyjulian (May 4, 2020)

It also works in the web browser when compiled with "TARGET_WEB=1".


----------



## FAST6191 (May 4, 2020)

zfreeman said:


> USA copyright might be extending again in 2023 to meet the Mickey Mouse Curve.
> https://alj.artrepreneur.com/mickey-mouse-keeps-changing-copyright-law/


While I would not be surprised in the slightest to see them try they did try a few years back before we started getting new public domain content again. The EFF, creative commons and all are likely spoiling for a fight right now, and will be the first to say it was not all together back when the Sonny Bono thing was shoved through.
https://arstechnica.com/tech-policy...ot-planning-another-copyright-extension-push/


----------



## JFizDaWiz (May 4, 2020)

are there multiple EXEs floating around? I'm seeing pictures on here of the demo mode that has "Super Mario 64 PC original game by Nintendo" but my version does not have this.


----------



## uyjulian (May 4, 2020)

Works on Mac...


----------



## Pokemon_Tea_Sea_Jee (May 4, 2020)

uyjulian said:


> Works on Mac...


Nice.

If only Apple weren't (pretty much) evil.


----------



## Ecchi95 (May 4, 2020)

EIREXE said:


> I wish copyright terms weren't so long, if they were 25 or 30 years sm64 would be close to entering the public domain by now.


It's my belief that software should enter the public domain after only 10 years.

(When they start a new project derived from it, that's a separate copyright that starts again. SM64DS, OoT3D, etc.)

But the copyright for a single project should only be 10 years in my opinion. They were able to do SM64DS within that timeframe.


----------



## GizmoTheGreen (May 4, 2020)

anyone tried on a pi?


----------



## DD2XAlpha (May 4, 2020)

Is this illegal to download? hahahaha I thought reverse engineering a software like for example a bios of a console and then rewrite it and make it public was legal because it doesn't contain any code wrote by the original owners, for example ReactOS that can run Windows programs


----------



## Deleted User (May 4, 2020)

DD2XAlpha said:


> Is this illegal to download? hahahaha I thought reverse engineering a software like for example a bios of a console and then rewrite it and make it public was legal because it doesn't contain any code wrote by the original owners, for example ReactOS that can run Windows programs


It appears that some copyrighted material is mixed in the files.


----------



## DD2XAlpha (May 4, 2020)

Dodain47 said:


> It appears that some copyrighted material is mixed in the files.


Oh no, hope the community can redo that copyrighted content to break it free


----------



## Lumstar (May 4, 2020)

Facest4b said:


> Does anyone know how to assign controls to a keyboard or ps3 controller with this?



The version I saw automatically recognized and mapped a 360 controller. except all the dialogue in the game still refers to N64 buttons.


----------



## qweasdgo (May 4, 2020)

you're about a day late with this and didn't even mention the source for it was posted too


----------



## ut2k4master (May 4, 2020)

can get this shit to even compile so whatever


----------



## AvesAvi (May 4, 2020)

Works super well. I'm sure because of the nature of this that development isn't going to be very steady, but where would we go to see if any kind of updates have been released?


----------



## Ampersound (May 4, 2020)

Is there a way to play this with an older version of directX like 11 ?


----------



## nastys (May 4, 2020)

Ampersound said:


> Is there a way to play this with an older version of directX like 11 ?


If you build it for Linux, it uses OpenGL, and it's also possible to build for macOS and HTML, so maybe you can build it on Windows with OpenGL. At least, you should be able to play the HTML version.
Maybe you can replace src/pc/gfx/dxsdk/ with -lGL in the Makefile or something like that.


----------



## Unity150_magickavoxel (May 4, 2020)

there is a opengl windows 10 version of this if you pc does not have directx12


----------



## EnergeticBark (May 5, 2020)

I'm able to compile it on Linux, but running it gives me the error "Warning: can't write everything: 4224 vs 2936".
I can hear the coin sound effect for a split second but nothing else happens.
Is anyone else having this problem?


----------



## raxadian (May 5, 2020)

While this is awesome, I still think the DS version is the best version.


----------



## Bagel1900 (May 5, 2020)

Can anyone help me out? I found the mario.exe file online, but when I try to open it, nothing happens.  It'll say it's running for 2 seconds in task manager but then go away immediately.  My PC has DirectX12 so that shouldn't be an issue.


----------



## SpiffyJUNIOR (May 5, 2020)

cool now add rebindable controls please


----------



## Deleted User (May 5, 2020)

Has anyone figured out how to go fullscreen yet instead of windowed fullscreen?


----------



## Zense (May 5, 2020)

The biggest issue I have with this PC port is that it suffers from the same problems as GlideN64 , which have been named "misaligned polygons". This can easily be spotted in Whomp's Fortress where the brown steps right where you start have a slight gap between the surfaces. This is apparently hard or impossible to fix in GlideN64, and so far you can only have an visually accurate rendering of the game by using some form of software renderer (like Angrylion rdp plus which now runs pretty well in latest retroarch).

This was the first thing I tested and upon seeing it I abandoned this port for now. Hopefully the devs become aware of this and strive for a perfect 1:1 port of the experience without glitches like these. Especially considering they are looking at OOT and Paper Mario both of which suffer more from this when not replicated accurately.

Oh and it's nice to see it take like 40mb of ram and like 3% of the cpu of course. I'd be interested to check out the source with the opengl support so I can try it on older hardware, but as for now I'm sticking with an N64 or angrylion rdp plus in some form.
Here's a quick picture I took of an example of the problem present in the PC port:


You can see the seems between the polygons. This was taken with gliden64 using parallell but the problem is exactly the same in the pc port. I used an emulated version since I already got rid of the pc port as it didn't fix this issue which is the most outstanding issue with n64 emulation imo. Oh and before anyone says anything this isn't fixed by lowering the resolution. This is simply not present on original hardware.


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



Sasori said:


> Has anyone figured out how to go fullscreen yet instead of windowed fullscreen?


alt+enter


----------



## supergamer368 (May 5, 2020)

The thread on the front page said something about analog camera control. Anyone got that working? if so, H o w


----------



## Rabbid4240 (May 5, 2020)

How do I manage the controls?


----------



## BaamAlex (May 5, 2020)

And where's the problem of simply using a rotten emulator? I don't get it. Nothing against the work which is in there. But, I don't get it...


----------



## ArcadeGamer1929 (May 5, 2020)

@Bagel1900 same (also first post on GBATemp)


----------



## chrisrlink (May 5, 2020)

i think nintendo is a little too preoccupied to even DMCA this (with the current leaks and Gamevice)


----------



## Zense (May 5, 2020)

BaamAlex said:


> And where's the problem of simply using a rotten emulator? I don't get it. Nothing against the work which is in there. But, I don't get it...


I would say this has a benefit of running on worse hardware than what would be necessary to run this game through an emulator. Then there's the ease of resolution scalability.

Personally, I still use any emulator with angrylion plugin since that is still the peak of visual accuracy.


----------



## kagami (May 5, 2020)

SexySpai said:


> How do I manage the controls?



Same here

I even tried using the PS4 controller since I have a desktop config for Steam, but nope

unless I'm missing a config I need to turn on with Steam?


----------



## Kagamiku (May 5, 2020)

EnergeticBark said:


> I'm able to compile it on Linux, but running it gives me the error "Warning: can't write everything: 4224 vs 2936".
> I can hear the coin sound effect for a split second but nothing else happens.
> Is anyone else having this problem?



I built it on linux as well and ran into this same problem, with a nvidia 1650 super latest drivers from nvidia and Ubuntu 20.04. I moved the same binary to a system with intel integrated graphics and it runs perfect. 

I suspect that it is some sort of issue with the nvidia GLX implementation, or a conflict with Mesa GLX implementation. but if you run it on a amd/intel graphics stack it seems to run fine.


----------



## VmprHntrD (May 5, 2020)

You know I'm going to parrot that comment... are there more than one version of this for PC?  The one I came across fires up straight copy of the N64 game, yet multiple images in this thread have a screen saying 'Super Mario 64 PC' so what's up with that???

Also controls, if you have an xinput/xbox PC controller it works perfect.  Left analog to move like N64, right analog is your c-stick setup, then your L1/L2 are both Z button, R1/R2 appear to cover camera zoom, and then well you can figure it out from there.

WASD = Movement
Arrows = C Buttons
Space = Start
L = A Button
K = B Button
, = Z Button

Alt+Enter Full Screen/Windowed Mode


----------



## Zense (May 5, 2020)

VmprHntrD said:


> You know I'm going to parrot that comment... are there more than one version of this for PC?  The one I came across fires up straight copy of the N64 game, yet multiple images in this thread have a screen saying 'Super Mario 64 PC' so what's up with that???
> 
> Also controls, if you have an xinput/xbox PC controller it works perfect.  Left analog to move like N64, right analog is your c-stick setup, then your L1/L2 are both Z button, R1/R2 appear to cover camera zoom, and then well you can figure it out from there.
> 
> ...


The reason is because the ones with the Super Mario 64 PC are made from a later version straight from the source that was released shortly after the pc port was leaked from the decomp devs. The leaked pc port is from an earlier version of the pc port source where only dx12 was supported. This pc port in question's source (since there are several)  however can support opengl for example. I'm not sure what other stuff was added with it. Maybe the stretching of the skybox texture was fixed while in widescreen though I'm not sure of this.


----------



## VmprHntrD (May 5, 2020)

Thanks this I didn't realize.  I had a time of just trying to locate the one I did on some spanish site and gave it a few safety tests first.  Now I have to wonder how the hell to find the latest release -- fun.


----------



## Zense (May 5, 2020)

VmprHntrD said:


> Thanks this I didn't realize.  I had a time of just trying to locate the one I did on some spanish site and gave it a few safety tests first.  Now I have to wonder how the hell to find the latest release -- fun.


I don't think anyone has posted a compiled latest release. That's why you'll have to look for the source and compile it yourself which is what the people above have done so far. Someone will probably post it online eventually.

Also the devs wanted to implement a true analog camera (not the buttons of the cbuttons but analog movement) but I don't think they managed to in time before it got leaked. However I'm think water111 who's working on a separate pc port that has the source available straight on github wants to implement the camera stuff as well.

Also hopefully he'll be able to implement a better graphics renderer that fixes the "misaligned polygons" present in the leaked pc port that I mentioned earlier.


----------



## VmprHntrD (May 5, 2020)

Zense said:


> I don't think anyone has posted a compiled latest release. That's why you'll have to look for the source and compile it yourself which is what the people above have done so far. Someone will probably post it online eventually.


Oh I found the source, that's not a problem, but I'm 100% incapable of compiling programming any of that annoyingly and lack the tools to do so even if I could so I have to rely on downloads.  I mean if the DX12 one is all the same basically it's fine.  If it has some improvements though that would suck.  I have to admit I'm a bit surprised no one has created a button mapper for it, or even a basic readme file at all.


----------



## Skiletro (May 5, 2020)

VmprHntrD said:


> Oh I found the source, that's not a problem, but I'm 100% incapable of compiling programming any of that annoyingly and lack the tools to do so even if I could so I have to rely on downloads.  I mean if the DX12 one is all the same basically it's fine.  If it has some improvements though that would suck.  I have to admit I'm a bit surprised no one has created a button mapper for it, or even a basic readme file at all.



That's because this isn't an actual release but rather a leak. It's not finished yet and the developer behind it most likely didn't want it to see the light of day yet.


----------



## VmprHntrD (May 5, 2020)

Skiletro said:


> That's because this isn't an actual release but rather a leak. It's not finished yet and the developer behind it most likely didn't want it to see the light of day yet.


That's a real shame, odds are, as I've seen in many cases over the last 25 years, the author(s) will get pissed off and this may be it.  Too bad whoever leaked it couldn't act mature and wait until it was done, documentation, potential bugs, and all.  From what I've noticed (if you have a new enough PC/gfx card that is) it can run too fast so it I guess lacks a limiter.


----------



## Zense (May 5, 2020)

Skiletro said:


> That's because this isn't an actual release but rather a leak. It's not finished yet and the developer behind it most likely didn't want it to see the light of day yet.


Most of the reason he didn't want it to see the light of day was probably because this is such a legal gray area that hasn't been explored yet. Still he did share it around enough for it to leak. Anyway I hope nothing bad happens to anyone involved with the decomp and porting it.

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



VmprHntrD said:


> That's a real shame, odds are, as I've seen in many cases over the last 25 years, the author(s) will get pissed off and this may be it.  Too bad whoever leaked it couldn't act mature and wait until it was done, documentation, potential bugs, and all.  From what I've noticed (if you have a new enough PC/gfx card that is) it can run too fast so it I guess lacks a limiter.


No it runs too fast because you have a too high refresh rate set on your screen. If you set it to 60hz or 120hz it's fine.


----------



## VmprHntrD (May 5, 2020)

Zense said:


> Most of the reason he didn't want it to see the light of day was probably because this is such a legal gray area that hasn't been explored yet. Still he did share it around enough for it to leak. Anyway I hope nothing bad happens to anyone involved with the decomp and porting it.
> 
> --------------------- MERGED ---------------------------
> 
> ...


Ahhhh ok, yeah I would agree.  I'd like to not see anyone punished over this, though it wouldn't be the designer but those making that executable because much like Doom 64 EX, stand alone is fine, it's when you apply the N64 ROM for the assets then it's not a gray area at all anymore like the file I came across.

And it doesn't run too fast for me.  I use an i7 laptop with the Nvidia 980M in it (basically equals a 970 desktop) and it's set to a solid flat refresh so I don't have the speed issue.  I've just run across quite a few whining about it and having to ask for help, then a few as their graphics tools allowed it locked the frames at 30 or 60fps to get it to behave.


----------



## Zense (May 5, 2020)

VmprHntrD said:


> Ahhhh ok, yeah I would agree.  I'd like to not see anyone punished over this, though it wouldn't be the designer but those making that executable because much like Doom 64 EX, stand alone is fine, it's when you apply the N64 ROM for the assets then it's not a gray area at all anymore like the file I came across.
> 
> And it doesn't run too fast for me.  I use an i7 laptop with the Nvidia 980M in it (basically equals a 970 desktop) and it's set to a solid flat refresh so I don't have the speed issue.  I've just run across quite a few whining about it and having to ask for help, then a few as their graphics tools allowed it locked the frames at 30 or 60fps to get it to behave.


Yeah, and lots of other games have been decompiled. It's just that in this case it's Nintendo and Mario and Nintendo is a whole other level of IP protection. Let's not forget the C64 Mario port that got a C & D pretty quickly.

I swear they'd trademark the Mario name if it wasn't for Italians using it first...


----------



## shano (May 5, 2020)

Anyone know how to fullscreen the opengl version? Alt+Enter does nothing.


----------



## VmprHntrD (May 5, 2020)

Zense said:


> Yeah, and lots of other games have been decompiled. It's just that in this case it's Nintendo and Mario and Nintendo is a whole other level of IP protection. Let's not forget the C64 Mario port that got a C & D pretty quickly.
> 
> I swear they'd trademark the Mario name if it wasn't for Italians using it first...


Hah probably.  I'm aware other stuff including pokemon has been done, just this is another step going into Mario and making it a download any shmuck can use.  I remember the C64 one, and the 2600 title too princess rescue.

The thing is I think Nintendo is a bit fickle about things, and I think they try and put on an air of being downright hardcore, but I think they realize also one stuff leaks, it leaks and I think they like the free advertising before dropping a hammer.  They knew damn well AM2R was coming, it had a countdown, but they didn't even hard core try and stop it until after it released, and even then on a 2nd version update did they ask the maker himself to knock it off.  I bet they love the 'bad press' as it makes for awareness just as this will too.  They'll be about shutting it down by Wednesday give or take depending if more builds drop.


----------



## Zense (May 5, 2020)

shano said:


> Anyone know how to fullscreen the opengl version? Alt+Enter does nothing.


Tried any of the other default keys? F12, F11, F etc.

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



VmprHntrD said:


> Hah probably.  I'm aware other stuff including pokemon has been done, just this is another step going into Mario and making it a download any shmuck can use.  I remember the C64 one, and the 2600 title too princess rescue.
> 
> The thing is I think Nintendo is a bit fickle about things, and I think they try and put on an air of being downright hardcore, but I think they realize also one stuff leaks, it leaks and I think they like the free advertising before dropping a hammer.  They knew damn well AM2R was coming, it had a countdown, but they didn't even hard core try and stop it until after it released, and even then on a 2nd version update did they ask the maker himself to knock it off.  I bet they love the 'bad press' as it makes for awareness just as this will too.  They'll be about shutting it down by Wednesday give or take depending if more builds drop.


At the same time you have to remember that they have lawyers and people actively looking for what they can potentially sue and get away with. I believe Nintendo also wants to set a precedent so that more games do not get decompiled and ported like this(even if the community affiliated with this decomp is or were working on OOT and Golden Eye* decomps as well).


----------



## VmprHntrD (May 5, 2020)

You may be right.  You never can tell.  I only used AM2R because it was a strange coincidence that they had their own unannounced product (inferior one at that) coming to 3DS within a year people didn't know of and they were fairly chill about it all things considered.


Shano: If you're using the OpenGL version it doesn't do full screen, only the DX12 does using ALT+ENTER.  

Here's the layout:
WASD = Movement
Arrows = C Buttons
Space = Start
L = A Button
K = B Button
, = Z Button

Alt+Enter Full Screen/Windowed Mode


----------



## Zense (May 5, 2020)

There are lots of programs you can use to make it as if it were fullscreen. There's "fullscreenizer" that comes to mind, but I believe there's even a better program around.


----------



## Worldblender (May 5, 2020)

I was able to find the source code for both and DirectX and OpenGL versions of this port, but I'll prepare to compile the OpenGL version soon (I'm on Ubuntu 18.04 64-bit x86). Another person posted the command-line steps which I will put here again (thank @nastys for providing them!):

```
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
make TARGET_N64=0 -j4
```
Where -j4 can be replaced with the number of CPU cores + 1 the port will be compiled on. For a quad-core CPU, that means -j5. VERSION=jp can be used in place of the default VERSION=us to build a port based off of the Japanese ROM instead.
When/if I have successfully compiled my version and try it out, I'll come back with the results.


----------



## shano (May 5, 2020)

@VmprHntrD
@Zense 
Thanks for the tips!
Is the dx12 ver just a borderless fullscreen or true fullscreen btw?


----------



## Zense (May 5, 2020)

shano said:


> @VmprHntrD
> @Zense
> Thanks for the tips!
> Is the dx12 ver just a borderless fullscreen or true fullscreen btw?


No problem, and I honestly can't remember if it was or not. I mean the taskbar gets hidden.


----------



## shano (May 5, 2020)

Hope to see many of the other amazing N64 games get ported like this in the future. This stuff is amazing and kudos to all the people that made this possible.

I have a real N64 but whats stopping me from playing it much is all my Controllers sticks are not good enough to enjoy properly. I even got kitsch-bent stick parts and they didn't make the pads much better for me unfortunately.


----------



## VmprHntrD (May 5, 2020)

shano said:


> @VmprHntrD
> @Zense
> Thanks for the tips!
> Is the dx12 ver just a borderless fullscreen or true fullscreen btw?


It's true full screen, you won't see the border up top, though if you want to you could just click the maximize option up top to do that too.


----------



## ChiefReginod (May 5, 2020)

I wonder how the music is handled? In the video in the OP it sounds pretty similar to the original. But as anyone who's into chip music would know, the sound chips from that era all have their own unique properties that are hard to replicate on current hardware without resorting to emulation. So I wonder if there's something like that going on here.


----------



## rodrigues14 (May 5, 2020)

theres a compiled version for donwload?


----------



## nastys (May 5, 2020)

shano said:


> Anyone know how to fullscreen the opengl version? Alt+Enter does nothing.


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.



Worldblender said:


> I was able to find the source code for both and DirectX and OpenGL versions of this port, but I'll prepare to compile the OpenGL version soon (I'm on Ubuntu 18.04 64-bit x86). Another person posted the command-line steps which I will put here again (thank @nastys for providing them!):
> 
> ```
> 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
> ...


You can use: 
	
	



```
make TARGET_N64=0 -j$(nproc)
```


----------



## Zense (May 5, 2020)

rodrigues14 said:


> theres a compiled version for donwload?


Yes, but sharing and asking for it here is against the rules.


----------



## rodrigues14 (May 5, 2020)

Zense said:


> Yes, but sharing and asking for it here is against the rules.


sorry, i won't read the rules my fault...


----------



## Worldblender (May 5, 2020)

nastys said:


> 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:
> ...


I got all that working. Almost everything went smoothly, but:

```
/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 (May 5, 2020)

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 (May 5, 2020)

Worldblender said:


> I got all that working. Almost everything went smoothly, but:
> 
> ```
> /usr/bin/ld: skipping incompatible //usr/lib/x86_64-linux-gnu/libGL.so when searching for -lGL
> ...


It definitely requires 64-bit libraries. Perhaps your distribution's packages are too old? I'm using Ubuntu 20.04, by the way.


----------



## Worldblender (May 5, 2020)

nastys said:


> 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:

```
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...


----------



## Bagel1900 (May 5, 2020)

ArcadeGamer1929 said:


> @Bagel1900 same (also first post on GBATemp)


Yea I've just seen vids of people starting the .exe with it starting up immediately and I'm scratching my head about what to do...


----------



## nastys (May 5, 2020)

Worldblender said:


> The MakeFile is actually forcing to compile the port as 32-bit:
> 
> ```
> ifeq ($(WINDOWS_BUILD),1)
> ...


I guess we don't have the same source code, then.
How many versions have been leaked?


----------



## FAST6191 (May 5, 2020)

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...).


----------



## Worldblender (May 5, 2020)

nastys said:


> I guess we don't have the same source code, then.
> Just how many versions have been leaked?



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  (this version shows some text after the title screen, not opening to the floating Mario head afterwards):





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:

```
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
```


----------



## Kagamiku (May 5, 2020)

Worldblender said:


> The MakeFile is actually forcing to compile the port as 32-bit:
> 
> ```
> ifeq ($(WINDOWS_BUILD),1)
> ...



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


----------



## uyjulian (May 5, 2020)

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):


```
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.


----------



## Worldblender (May 5, 2020)

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:

```
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 (May 5, 2020)

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 (May 5, 2020)

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.


----------



## cagycee (May 5, 2020)

Yeah. Ima just let this sit here.


----------



## Apache Thunder (May 5, 2020)

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. 

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 (May 5, 2020)

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_._


----------



## Pokemon_Tea_Sea_Jee (May 5, 2020)

cagycee said:


> Yeah. Ima just let this sit here.



It's BEAUTIFUL!

Honestly!


----------



## Jokey_Carrot (May 5, 2020)

A pc port that's era approprite that runs on windows 95 and uses glide would be so cool


----------



## FAST6191 (May 5, 2020)

Jokey_Carrot said:


> 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?




PacDan16 said:


> 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.


----------



## JorrickL (May 5, 2020)

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:

```
sudo apt update
sudo apt upgrade
```

I then installed the packages using the command from @nastys, as well as the qemu-irix package:

```
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 
	
	



```
'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:

```
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?


----------



## ut2k4master (May 5, 2020)

JorrickL said:


> Hello, I am trying to compile a Windows build on Ubuntu 20.04 (on Windows 10 with WSL) from 'sm64pc_src.zip' 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:
> ...


i had the exact same problems and couldnt find a fix. maybe it works better on a complete linux vm


----------



## AnthonyM (May 5, 2020)

How do you save the game when playing?


----------



## Bladexdsl (May 5, 2020)

countdown to DMCA! oh and nintendo will find it. they have TOP MEN working on it right now


----------



## JFizDaWiz (May 5, 2020)

AnthonyM said:


> How do you save the game when playing?


save like normal in-game, it creates sm64_save_file.bin


----------



## MetoMeto (May 5, 2020)

This is to complicetad to set up and a drag tbh. I thought it would be like exe or something x)

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



Bladexdsl said:


> countdown to DMCA! oh and nintendo will find it. they have TOP MEN working on it right now


Already??

To be perfectly honest, Nintendo is like Don Quixote here, seriously... Why do they bother... It will just keep coming and coming and coming and coming and.............. the real enemy here is Nintendo them self, they need to face their daemons first and look for some help (possible from Sega, but they wont admit that though..)


----------



## IC_ (May 5, 2020)

It works on Arch Linux


----------



## FAST6191 (May 5, 2020)

MetoMeto said:


> Why do they bother... It will just keep coming and coming and coming and coming and.............. the real enemy here is Nintendo them self, they need to face their daemons first and look for some help (possible from Sega, but they wont admit that though..)


If you have trademarks and care to use them then you can't be allowing fan games being called the same thing as you game to be plastered all across the front pages of the press. Mainly as when you get into court for a real battle about your trademark the opposing side might say "well it looked like they abandoned it, I mean check out all these games using the name with articles in the biggest news sites seen millions of times, millions of downloads...", not to mention customers calling up asking about support for things.


----------



## Dartz150 (May 5, 2020)

People that have PC game modding skills are already reviewing the source for this, so expcet to get hotfixes, QoL improvements, model and texture upgrades and even ports for other platforms. Personally something I would pay to see is to get the extras that the DS version added.


----------



## MetoMeto (May 5, 2020)

FAST6191 said:


> If you have trademarks and care to use them then you can't be allowing fan games being called the same thing as you game to be plastered all across the front pages of the press. Mainly as when you get into court for a real battle about your trademark the opposing side might say "well it looked like they abandoned it, I mean check out all these games using the name with articles in the biggest news sites seen millions of times, millions of downloads...",
> 
> *not to mention customers calling up asking about support for things.*


I mean it will never end, that was my point. Sega was not so rigorous and stiff about it. I just prefer approach like that.

*Lol it would be interesting to see Nintendo employees face when that's happening xD*


----------



## FAST6191 (May 5, 2020)

MetoMeto said:


> Lol it would be interesting to see Nintendo employees face when that's happening xD


I can't imagine it would be any worse than all the inane questions they get all day from parents, grandparents and what have you.


----------



## Deleted User (May 5, 2020)

Over 58.000 views. The hype for this port is insane!

Edit: Updated the first post. More info and videos.


----------



## MetoMeto (May 5, 2020)

FAST6191 said:


> I can't imagine it would be any worse than all the inane questions they get all day from parents, grandparents and what have you.


well i cant say its the same lol


----------



## Pokemon_Tea_Sea_Jee (May 5, 2020)

Dartz150 said:


> People that have PC game modding skills are already reviewing the source for this, so expcet to get hotfixes, QoL improvements, model and texture upgrades and even ports for other platforms. Personally something I would pay to see is to get the extras that the DS version added.


I wouldn't pay. But otherwise, I like your reply.


----------



## FAST6191 (May 5, 2020)

Dodain47 said:


> Over 58.000 views. The hype for this port is insane!
> 
> Edit: Updated the first post. More info and videos.


I guess congratulations on being the better discussion than can be found at polygon.

If you want to do update 2 it might be worth noting source code (rather than just a binary like it initially appeared) for this version and not just the original decompilation is available, and possibly even include one of the diffs people have been linking. I don't know if we have a reasonably foolproof and free build method that mortals can use (even if it is 10 times larger than a proper mingw or whatever install) but if there is that then do that too.


----------



## GizmoTheGreen (May 5, 2020)

trying to compile SDL ver on Manjaro (archlinux based) on raspberry pi 4 (aarch64) and get



Spoiler: code





```
as -I include -I build/us_pc --defsym VERSION_US=1 -MD build/us_pc/sound/sequences/00_sound_player.d -o build/us_pc/sound/sequences/00_sound_player.o sound/sequences/00_sound_player.s
sound/sequences/00_sound_player.s: Assembler messages:
sound/sequences/00_sound_player.s:87: Error: too many positional arguments
sound/sequences/00_sound_player.s:88: Error: too many positional arguments
sound/sequences/00_sound_player.s:89: Error: too many positional arguments
sound/sequences/00_sound_player.s:92: Error: too many positional arguments
sound/sequences/00_sound_player.s:93: Error: too many positional arguments
sound/sequences/00_sound_player.s:194: Error: too many positional arguments
sound/sequences/00_sound_player.s:195: Error: too many positional arguments
sound/sequences/00_sound_player.s:197: Error: too many positional arguments
sound/sequences/00_sound_player.s:200: Error: too many positional arguments
sound/sequences/00_sound_player.s:202: Error: too many positional arguments
sound/sequences/00_sound_player.s:225: Error: too many positional arguments
sound/sequences/00_sound_player.s:225: Error: unknown mnemonic `restore' -- `restore the value'
sound/sequences/00_sound_player.s:227: Error: too many positional arguments
sound/sequences/00_sound_player.s:228: Error: too many positional arguments
make: *** [Makefile:677: build/us_pc/sound/sequences/00_sound_player.o] Error 1
```




Anyone have any ideas?


----------



## IC_ (May 5, 2020)

GizmoTheGreen said:


> trying to compile SDL ver on Manjaro (archlinux based) on raspberry pi 4 (aarch64) and get
> 
> 
> 
> ...


What was your make command?


----------



## GizmoTheGreen (May 5, 2020)

Extrasklep said:


> What was your make command?


make


----------



## IC_ (May 5, 2020)

GizmoTheGreen said:


> make


Try 'make TARGET_N64=0' instead and you might also want to add -j[number of CPU cores in your computer] at the end so it builds faster


----------



## GizmoTheGreen (May 5, 2020)

Extrasklep said:


> Try 'make TARGET_N64=0' instead and you might also want to add -j[number of CPU cores in your computer] at the end so it builds faster


PC port already has those by default.


----------



## Lia (May 5, 2020)

JorrickL said:


> 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:
> ...


I'm getting the exact same error as well, can't seem to get it working.


----------



## xElite_V (May 5, 2020)

Getting the same issue attempting to build an EXE for Windows.

```
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.


----------



## JorrickL (May 5, 2020)

Extrasklep said:


> What was your make command?


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.


----------



## Jamesj1318 (May 5, 2020)

Anyone figure out how to save progress?


----------



## Lia (May 5, 2020)

Jamesj1318 said:


> Anyone figure out how to save progress?


just save normally how you would in the original


----------



## Jamesj1318 (May 5, 2020)

JFizDaWiz said:


> save like normal in-game, it creates sm64_save_file.bin


How? I tried every key on the keyboard to try to save. I get no save option


----------



## Lia (May 5, 2020)

Jamesj1318 said:


> How? I tried every key on the keyboard to try to save. I get no save option


at the end of completing a level you are given the prompt to save


----------



## IC_ (May 5, 2020)

GizmoTheGreen said:


> PC port already has those by default.





JorrickL said:


> 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 (May 5, 2020)

JorrickL said:


> 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.


yooo that did it. compiling more now.
EDIT: it runs really well. fullspeed with a bit of screentearing  rpi4 4gb.


----------



## DD2XAlpha (May 5, 2020)

Have anyone found if mario.exe contains any unintended code like trojans or so?


----------



## Deleted User (May 5, 2020)

DD2XAlpha said:


> Have anyone found if mario.exe contains any unintended code like trojans or so?


No, not that I remember.


----------



## JFizDaWiz (May 5, 2020)

GizmoTheGreen said:


> yooo that did it. compiling more now.
> EDIT: it runs really well. fullspeed with a bit of screentearing  rpi4 4gb.



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


----------



## Plasmaster09 (May 5, 2020)

I know nothing about compiling but waded through pages upon pages of google to find an actual download link and it works
damn this is impressive


----------



## GizmoTheGreen (May 5, 2020)

JFizDaWiz said:


> 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.


----------



## JorrickL (May 5, 2020)

I managed to compile the DirectX12* version (the one with the menu text). I used this guide: https://rentry.co/io5p3


----------



## bnji (May 5, 2020)

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

```
make TARGET_N64=0 -j9
```

i get

```
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!


----------



## Deleted member 526518 (May 5, 2020)

Did someone succeed at compiling the DX12 version? I am stuck at finding out how to do it.


----------



## cyb0rg (May 5, 2020)

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.)


----------



## Pokemon_Tea_Sea_Jee (May 5, 2020)

cyb0rg said:


> 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.
> 
> ...


I have a black Classic Controller Pro. It came bundled with my copy of Monster Hunter Tri






Daang! I just saw this beautiful thing:


----------



## xElite_V (May 5, 2020)

JorrickL said:


> 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.


----------



## uyjulian (May 5, 2020)

bnji said:


> 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
> 
> ```
> ...


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 (May 5, 2020)

uyjulian said:


> 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

```
Makefile.split:152: build/us_pc/level_rules.mk: No such file or directory
Makefile:664: *** missing separator.  Stop.
```


----------



## uyjulian (May 5, 2020)

bnji said:


> 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
> 
> ```
> Makefile.split:152: build/us_pc/level_rules.mk: No such file or directory
> ...


Use GNU Make.


----------



## Nerd42 (May 5, 2020)

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 (May 5, 2020)

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.


----------



## Deleted User (May 5, 2020)

SuperPichu said:


> 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 (May 5, 2020)

Dodain47 said:


> 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.


----------



## Taorn (May 5, 2020)

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?


----------



## Soulslimm (May 5, 2020)

pcwizard7 said:


> still trying to locate it


I have a website up. Not posting it here for privacy reasons but you can add me on discord. Soulslimm#4957!


----------



## Worldblender (May 5, 2020)

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?


----------



## Soulslimm (May 5, 2020)

uyjulian said:


> Works on Mac...


How did you do this? i would like to know! you can contact me on discord Soulslimm#4957


----------



## Colbydude (May 5, 2020)

uyjulian said:


> bnji said:
> 
> 
> > 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
> ...


I was able to get past the separator error by converting indentations to tabs. Running gmake TARGET_N64=0 -j5 got me this far:

```
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!


----------



## bnji (May 6, 2020)

uyjulian said:


> 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 (May 6, 2020)

Colbydude said:


> I was able to get past the separator error by converting indentations to tabs. Running gmake TARGET_N64=0 -j5 got me this far:
> 
> ```
> gcc-9 -P -DVERSION_US -DNON_MATCHING -DAVOID_UB -I . -o build/us_pc/level_rules.mk levels/level_rules.mk
> ...


What program should i compile in? i'm new to this and i'm shit at coding


----------



## bnji (May 6, 2020)

Colbydude said:


> I was able to get past the separator error by converting indentations to tabs. Running gmake TARGET_N64=0 -j5 got me this far:
> 
> ```
> gcc-9 -P -DVERSION_US -DNON_MATCHING -DAVOID_UB -I . -o build/us_pc/level_rules.mk levels/level_rules.mk
> ...


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 (May 6, 2020)

bnji said:


> 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 (May 6, 2020)

JeffRuLz said:


> "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.


----------



## JFizDaWiz (May 6, 2020)

JorrickL said:


> I managed to compile the DirectX12* version (the one with the menu text). I used this guide: https://rentry.co/io5p3



how did you install qemu-irix?

followed step by step and when i run "make -j12 TARGET_N64=0" i get

```
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.
```


----------



## ArcadeGamer1929 (May 6, 2020)

JeffRuLz said:


> "The program can't start because d3d12.dll is missing from your computer"
> lol, I need DirectX 12 to run Mario 64?





LittleRain said:


> 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 (May 6, 2020)

Colbydude said:


> I was able to get past the separator error by converting indentations to tabs. Running gmake TARGET_N64=0 -j5 got me this far:
> 
> ```
> gcc-9 -P -DVERSION_US -DNON_MATCHING -DAVOID_UB -I . -o build/us_pc/level_rules.mk levels/level_rules.mk
> ...



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


----------



## UltraSUPRA (May 6, 2020)

The ray tracing mod causes a black screen with a few tiny pixels shining through.


----------



## Deleted User (May 6, 2020)

cagycee said:


> SAME. Can't post it here. Sorry People. now Im just gonna smash my Keyboard.
> 
> *snip*


Did you smash it with your fingers or your head?


----------



## cagycee (May 6, 2020)

Dodain47 said:


> Did you smash it with your fingers or your head?



Smashed it with my legs. Now my legs is en-crippled.


----------



## cagycee (May 6, 2020)

ugh. This community sum else. Can't even have fun.


----------



## JFizDaWiz (May 6, 2020)

if by fun you mean sharing copyrighted material, then no...it's not fun
you can say goodbye to this website if we started allowing that


----------



## Deleted User (May 6, 2020)

So this was encrypted code!? Ideas people have here..


----------



## Saturosias (May 6, 2020)

The ray tracing is dogshit, literally just a post-processing shader lacking any proper reflectivity data on the textures. Carpet should not be a mirror.


----------



## cagycee (May 6, 2020)

the_randomizer said:


> I... guess I forgot. Sorry.  Still, we don't want Nintendo getting uppity over this, that's all


oh yeah. I understand. I acted without even thinking of the precautions of what will happen to this site no matter if it was encrypted or not. I was wrong.


----------



## nintenbrolluseless (May 6, 2020)

inb4 ps1 port


----------



## JorrickL (May 6, 2020)

JFizDaWiz said:


> how did you install qemu-irix?
> 
> followed step by step and when i run "make -j12 TARGET_N64=0" i get
> 
> ...


I didn't need to install that package, strange.


----------



## fgfemperor (May 6, 2020)

JorrickL said:


> I managed to compile the DirectX12* version (the one with the menu text). I used this guide: https://rentry.co/io5p3


I tried following that guide but I'm getting this weird error:


```
g++.exe: error: src/pc/gfx/dxsdk/64/*.lib: Invalid argument
```

Any guidance is really appreciated!

Edit: Nevermind, I was missing some files! Sorry!


----------



## nitrostemp (May 6, 2020)

i noticed on the 4ch thread there was mention of a 3ds binary and switch binary.


----------



## Alpha_GX (May 6, 2020)

uyjulian said:


> It also works in the web browser when compiled with "TARGET_WEB=1".


How did you you do to get the game running on a browser.
I've compiled the web ver and added the us_web folder in apache2, but when I open the web page it freeze right after the boot logo...
"Exception thrown, see JavaScript console"


----------



## bbsan2k (May 6, 2020)

uyjulian said:


> 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):
> 
> ...



Unfortunately your diff files are failing for me...

```
[email protected]   ~/git/sm64pc     master~4    gmake TARGET_N64=0                                                                                                         2 ↵  2402  19:03:27 
Makefile:664: *** missing separator.  Stop.
```

I'm using gmake from homebrew and did not change anything else in the makefile.


----------



## uyjulian (May 6, 2020)

bbsan2k said:


> Unfortunately your diff files are failing for me...
> 
> ```
> [email protected]   ~/git/sm64pc     master~4    gmake TARGET_N64=0                                                                                                         2 ↵  2402  19:03:27 
> ...


Change the spaces at the line number (and possibly the surrounding areas) to tabs.

(I think my text editor screwed up the Makefile)




Alpha_GX said:


> How did you you do to get the game running on a browser.
> I've compiled the web ver and added the us_web folder in apache2, but when I open the web page it freeze right after the boot logo...
> "Exception thrown, see JavaScript console"
> View attachment 207896


You need to put it on a web server that will respond with the correct MIME type.
The NPM package "http-server" is known to do this correctly.


----------



## bbsan2k (May 6, 2020)

uyjulian said:


> Change the spaces at the line number (and possibly the surrounding areas) to tabs.
> 
> (I think my text editor screwed up the Makefile)


This did the trick! Thx Needs to be changed to tabs

EDIT:
okay, running into lots of other issues... Seems I don't have a compatible "as" available - how did you get yours? yasm -p gas shows me some errors...


----------



## Erfg1 (May 6, 2020)

When can we expect GoldenEye 007 PC port? https://github.com/n64decomp/007


----------



## uyjulian (May 6, 2020)

bbsan2k said:


> This did the trick! Thx Needs to be changed to tabs
> 
> EDIT:
> okay, running into lots of other issues... Seems I don't have a compatible "as" available - how did you get yours? yasm -p gas shows me some errors...


I used the as from mingw-w64. Any as will work as long as it is from the GNU binutils.


----------



## bbsan2k (May 6, 2020)

uyjulian said:


> I used the as from mingw-w64. Any as will work as long as it is from the GNU binutils.


Hmmm weird - if I install binutils through homebrew, AS is missing... maybe I just need to dig a bit deeper :/


----------



## uyjulian (May 6, 2020)

bbsan2k said:


> Hmmm weird - if I install binutils through homebrew, AS is missing... maybe I just need to dig a bit deeper :/


Binutils from homebrew doesn't include as. However, mingw-w64 includes a working as.


----------



## Gladuin (May 6, 2020)

Can anyone send me the N64 Decomp discord link? The one on github is dead...


----------



## bnji (May 6, 2020)

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.


----------



## Jamesj1318 (May 6, 2020)

How do we enable ray tracing like the video clip shows? Is it something in the compiling options or a setting in Nvidia?


----------



## Magnus87 (May 6, 2020)

I would like to see Mario Kart 64 on PC, but changing the pre render graphics of the characters for 3D modeling


----------



## Jamesj1318 (May 6, 2020)

Magnus87 said:


> I would like to see Mario Kart 64 on PC, but changing the pre render graphics of the characters for 3D modeling


And online or even lan multiplayer


----------



## Waveracer (May 6, 2020)

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 (May 6, 2020)

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 (May 6, 2020)

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.


----------



## Worldblender (May 6, 2020)

Jamesj1318 said:


> 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.
> ...


You might try using 
	
	



```
make TARGET_N64=0 -j9
```
 instead, passing the options after setting the variables.


----------



## Jamesj1318 (May 6, 2020)

I started over from scratch and it compiled without issue.


----------



## Aurexion (May 6, 2020)

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 (May 6, 2020)

Aurexion said:


> 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 (May 6, 2020)

Jamesj1318 said:


> 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 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.



uyjulian said:


> 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):
> 
> ...


----------



## Jamesj1318 (May 6, 2020)

Aurexion said:


> 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.


----------



## Rail Fighter (May 6, 2020)

I hope it gets a Steam release


----------



## UltraSUPRA (May 7, 2020)

Rail Fighter said:


> I hope it gets a Steam release


*snort*


----------



## WaterTheFlowers (May 7, 2020)

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.


----------



## Colbydude (May 7, 2020)

For anyone on playing around on macOS, here's what I did to accomplish frame limiting to 30 FPS.

In gfx_sdl2.c:

```
// 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 (May 8, 2020)

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.


----------



## nolimits59 (May 8, 2020)

TzKet-Death said:


> 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 !


----------



## WaterTheFlowers (May 9, 2020)

nolimits59 said:


> Fix it in the Nvidia control panel .
> 
> Also, i saw a SWITCH port laying around !


I have an amd card, doesn't have framelimiting anymore. I still would want a built in solution


----------



## JaapDaniels (May 9, 2020)

how can i configure the settings of this game? i mean i've got 8bitdo sn30 pro gamepads, and these would increase gaming experience!


----------



## Alex4nder001 (May 9, 2020)

I can't get it to run (Windows 10 Pro N 64 bit). When I try to run it nothing happens but it creates dxgi.log:

```
15:31:54:910 [01152] | INFO  | Initializing crosire's ReShade version '4.6.1.827' (64-bit) built on '2020-04-14 19:10:10' loaded from "D:\username\Programs\Super Mario 64 PC\dxgi.dll" into "D:\username\Programs\Super Mario 64 PC\mario.exe" ...
15:31:54:979 [01152] | INFO  | Registering hooks for "user32.dll" ...
15:31:54:979 [01152] | INFO  | > Libraries loaded.
15:31:54:979 [01152] | INFO  | > Found 13 match(es). Installing ...
15:31:54:994 [01152] | INFO  | Registering hooks for "ws2_32.dll" ...
15:31:54:994 [01152] | INFO  | > Delayed.
15:31:54:994 [01152] | INFO  | Registering hooks for "C:\Windows\system32\d2d1.dll" ...
15:31:54:994 [01152] | INFO  | > Delayed.
15:31:54:994 [01152] | INFO  | Registering hooks for "C:\Windows\system32\d3d9.dll" ...
15:31:54:994 [01152] | INFO  | > Delayed.
15:31:54:994 [01152] | INFO  | Registering hooks for "C:\Windows\system32\d3d10.dll" ...
15:31:54:994 [01152] | INFO  | > Delayed.
15:31:54:994 [01152] | INFO  | Registering hooks for "C:\Windows\system32\d3d10_1.dll" ...
15:31:54:994 [01152] | INFO  | > Delayed.
15:31:54:994 [01152] | INFO  | Registering hooks for "C:\Windows\system32\d3d11.dll" ...
15:31:54:994 [01152] | INFO  | > Delayed.
15:31:54:994 [01152] | INFO  | Registering hooks for "C:\Windows\system32\d3d12.dll" ...
15:31:54:994 [01152] | INFO  | > Libraries loaded.
15:31:54:994 [01152] | INFO  | > Found 7 match(es). Installing ...
15:31:55:017 [01152] | INFO  | Registering hooks for "C:\Windows\system32\dxgi.dll" ...
15:31:55:017 [01152] | INFO  | > Delayed until first call to an exported function.
15:31:55:017 [01152] | INFO  | Registering hooks for "C:\Windows\system32\opengl32.dll" ...
15:31:55:017 [01152] | INFO  | > Delayed.
15:31:55:017 [01152] | INFO  | Initialized.
15:31:55:017 [01152] | INFO  | Redirecting CreateDXGIFactory2(Flags = 0, riid = {1BC6EA02-EF36-464F-BF0C-21CA39E5168A}, ppFactory = 000000000148B510) ...
15:31:55:017 [01152] | INFO  | Installing export hooks for "C:\Windows\system32\dxgi.dll" ...
15:31:55:017 [01152] | INFO  | > Found 8 match(es). Installing ...
15:31:55:017 [01152] | INFO  | Redirecting D3D12CreateDevice(pAdapter = 00000000021919C0, MinimumFeatureLevel = 0xb000, riid = {189819F1-1DB6-4B57-BE54-1821339B85F7}, ppDevice = 0000000000000000) ...
15:31:55:017 [01152] | INFO  | Redirecting CreateDXGIFactory2(Flags = 0x80000000, riid = {1BC6EA02-EF36-464F-BF0C-21CA39E5168A}, ppFactory = 000000000205F1E8) ...
15:31:55:017 [01152] | WARN  | D3D12CreateDevice failed with error code DXGI_ERROR_UNSUPPORTED!
15:31:55:017 [01152] | INFO  | Redirecting D3D12CreateDevice(pAdapter = 0000000000000000, MinimumFeatureLevel = 0xb000, riid = {189819F1-1DB6-4B57-BE54-1821339B85F7}, ppDevice = 000000000148B518) ...
15:31:55:017 [01152] | INFO  | Redirecting CreateDXGIFactory2(Flags = 0x80000000, riid = {1BC6EA02-EF36-464F-BF0C-21CA39E5168A}, ppFactory = 000000000205F1E8) ...
15:31:55:017 [01152] | WARN  | D3D12CreateDevice failed with error code DXGI_ERROR_UNSUPPORTED!
15:31:56:213 [01152] | INFO  | Exiting ...
15:31:56:213 [01152] | INFO  | Uninstalling 36 hook(s) ...
15:31:56:220 [01152] | INFO  | Finished exiting.
```
I tried manually installing DX12 and it was already up to date. IDK what else to do. Any ideas?

EDIT: Using Intel HD graphics on an i5-3470. I have an old Nvidia card lying around but its performance is worse.


----------



## JaapDaniels (May 10, 2020)

shut


Alex4nder001 said:


> I can't get it to run (Windows 10 Pro N 64 bit). When I try to run it nothing happens but it creates dxgi.log:
> 
> ```
> 15:31:54:910 [01152] | INFO  | Initializing crosire's ReShade version '4.6.1.827' (64-bit) built on '2020-04-14 19:10:10' loaded from "D:\username\Programs\Super Mario 64 PC\dxgi.dll" into "D:\username\Programs\Super Mario 64 PC\mario.exe" ...
> ...


stop using reshade? You might be trying to use raytrace edition, and your graphics card isn't good enough to get that up and running.
could be wrong though, i've got version no reshade.


----------



## spotanjo3 (May 10, 2020)

What with 60fps ? I tried 60fps and dont liked it. I prefer 30fps because I am so used to it and I am not complaining.


----------



## Pitchounet (May 10, 2020)

Worldblender said:


> 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.



Even with this, same problem. I try to install qemu-irix via msys2 but i don't arrive. qemu ok installed, but not qemu-irix.


----------



## Alex4nder001 (May 11, 2020)

JaapDaniels said:


> shut
> 
> stop using reshade? You might be trying to use raytrace edition, and your graphics card isn't good enough to get that up and running.
> could be wrong though, i've got version no reshade.


The mario.exe file is identical to all the other versions I've downloaded (I compared checksums for all files) which are usually the mario.exe and nothing else. I've tried moving mario.exe to a seperate directory and running it, but it does nothing. I've tried running as administrator, and I've tried every compatibility setting, and nothing works.


----------



## JaapDaniels (May 11, 2020)

Alex4nder001 said:


> The mario.exe file is identical to all the other versions I've downloaded (I compared checksums for all files) which are usually the mario.exe and nothing else. I've tried moving mario.exe to a seperate directory and running it, but it does nothing. I've tried running as administrator, and I've tried every compatibility setting, and nothing works.


you don't need to replace or move mario, shut the application:

15:31:54:910 [01152] | INFO  | Initializing crosire's ReShade version '4.6.1.827' (64-bit) built on '2020-04-14 19:10:10' loaded from "D:\username\Programs\Super Mario 64 PC\dxgi.dll" into "D:\username\Programs\Super Mario 64 PC\mario.exe" ...
15:31:54:979 [01152] | INFO  | Registering hooks for "user32.dll" ...
it's trying to enhence directx game or opengl game (depending on your mario port).
this enhencement tool is crashing your game, might be wrong setup there.
for more info visit:
https://reshade.me/
and:
https://reshade.me/forum/troubleshooting


----------



## Jm9760 (May 12, 2020)

Anyone get this running on macOS?


----------



## uyjulian (May 12, 2020)

Jm9760 said:


> Anyone get this running on macOS?


Yes


----------



## Pitchounet (May 12, 2020)

Pitchounet said:


> Even with this, same problem. I try to install qemu-irix via msys2 but i don't arrive. qemu ok installed, but not qemu-irix.



Any explanation about installing this?  thanks for advance.


----------



## FGFlann (May 12, 2020)

I raised the drawing and spawning distance of all the enemies/objects in the game, completely eliminating pop-in. So good! The experience is so much better for it. I'm having a ball with access to this source code.


----------



## FAST6191 (May 12, 2020)

FGFlann said:


> I raised the drawing and spawning distance of all the enemies/objects in the game, completely eliminating pop-in. So good! The experience is so much better for it. I'm having a ball with access to this source code.


Nice.
Any chance of some shots from the desert/pyramid level (Shifting Sand Land)? While probably not as immediately recognisable as the first level I reckon that would probably showcase such a mod quite well out of all of them.


----------



## FGFlann (May 12, 2020)

When I get there I'll make a point of getting some. There's some fine tuning that needs to be done for certain objects. So I'll be going through area by area making sure everything functions correctly.


----------



## FAST6191 (May 12, 2020)

I did wonder if some things had "when visible" rather than within radius behaviours that would be troubled by this.

Oh well when you get there then -- you can still see what it brings from those, was just that those would be the true test/best example unless you got a nice angle on tall tall mountain or added a walk on air type cheat/truly free camera.

If no fog/draw distance problems are to be a thing with this decompilation lark I hope we get Mario Kart (though most of it is built to not be as troubled by this) and Perfect Dark as that could make for some interesting things.


----------



## TR_mahmutpek (May 12, 2020)

If you cant run it, try on n64 emu.


----------



## Worldblender (May 13, 2020)

FGFlann said:


> I raised the drawing and spawning distance of all the enemies/objects in the game, completely eliminating pop-in. So good! The experience is so much better for it. I'm having a ball with access to this source code.


Where are the source code changes, or diff/patch file, that we can use to apply the changes to the source code? I don't know where to add in these changes to be compiled in.


----------



## FGFlann (May 13, 2020)

Worldblender said:


> Where are the source code changes, or diff/patch file, that we can use to apply the changes to the source code? I don't know where to add in these changes to be compiled in.


I'll upload something when it's ready. Like I said, there's fine tuning that needs to be done. Such as cannon barrels never spawning in which need their loops altered, Chain Chomp trying to attack out-of-sight Mario needs his behaviour altered. But to get a basic idea of how it will look you can sed all instances of oDrawingDistance = xxxx to 20000 to make most things visible. Coins/Goombas/Cannons and other things require a bit more work.


----------



## FGFlann (May 13, 2020)

I see someone else already submitted this idea to the git while I was sleeping, lol. -_-

There's no point in continuing in that case, but as promised here is shifting sand land.


----------



## splatool (May 21, 2020)

Has anyone successfully gotten it to compile /for the N64/ yet? Changed ROMs that skip the intro etc would be god tier.


----------



## FAST6191 (May 21, 2020)

splatool said:


> Has anyone successfully gotten it to compile /for the N64/ yet? Changed ROMs that skip the intro etc would be god tier.


Yeah way before this PC release lark, not to mention the goal of the project was a 1:1 compile and that happened at the time of release of the initial leak really.

Here is a discussion that arose when some people compiled it with a different flag and good a framerate boost in some places

Hack in question
http://www.romhacking.net/hacks/4905/
I don't know what compiler setup is being used for it offhand (whether it is a nice modern homebrew one, whether the modern one works just fine even if it is not 1:1, or if you do need to go find a vintage leaked compiler) but it should not be too hard to source something.

Being a cartridge based affair you can probably do OK at that (a lot of intros on CD games, especially of this game's era, have videos and whatnot as a fancy loading bar). Skipping title cards, face deformation demo, save slot loading/decision and the like is probably within the code, however you might find yourself looking at the levels themselves for the "I've baked a cake for you" stuff.

Bonus is if you can get it to compile you can at least attempt such a thing with almost minimal knowledge of C -- find the files responsible for the parts in question and they will usually start and end with something (possibly even plain old return) or something to jump to something else, find these and paste them in the right place. If you are lucky the initial calls to the title cards and face demo will be in the main loop (or effective main loop) and you can possibly even slice them out there and go right to the stuff you want.
You might get unlucky and some random title card also happens to initialise the memory or something that you can't jump by, and in that case some knowledge of at least the flow of C will probably help; in those cases you might just want to change the jump to always jump rather than on a button press, or decrease the amount of times something has to loop before it does. Nothing creative really in that (you are literally doing things it does by default in the game, or shortening wait times before an automated jump) but something you might want to have skimmed the overview and C syntax of loops and function calls in programming for.
https://www.tutorialspoint.com/cprogramming/c_functions.htm
https://www.tutorialspoint.com/cprogramming/c_loops.htm


----------



## Alpha_GX (May 22, 2020)

tbh the new github wiki makes it super easy to compile, now I can't wait for omeone to code a little online multiplayer poc.


----------



## pritjam (Jul 20, 2020)

I hate to bump this post but it wasn't from _that_ long ago--What's the Discord server that is mentioned numerous times here? Would it be possible to get a link to that?


----------



## MrShadow675 (Jul 30, 2020)

I got to try this out recently, props to the people behind it.


----------

