Homebrew Question Mario 64 port?

FAST6191

Techromancer
Editorial Team
Joined
Nov 21, 2005
Messages
36,798
Trophies
3
XP
28,321
Country
United Kingdom
Any chance any of this could be made to play nice with codeblocks or something equally nice for the general populace?

"Someone told me that each equation I included in the book would halve the sales."
Steven Hawking.

Something similar applies here and if you are getting people to mess with their path values you have lost most of them.
If it has to play with devkitpro that might be a bigger ask, however if we want to get it to the point where people can play with variables of their choosing, or just straight compile, something to click (and maybe paste a make command into) then something easy is going to be necessary.

In general I have seen compiler woes before you even get a hello world has turned off quite a few people from at least C family stuff on many occasions. The dread from first having to fight one has also stopped me from doing things when out in the world as well, or pushed me towards a scripting language.
 

TheCasualties

Just trying to be helpful
Member
Joined
May 11, 2020
Messages
440
Trophies
0
Location
The Bardo Islands
XP
494
Country
Netherlands
Thanks so much for that link masterchan777! I got the nro running on my switch! Now I just need to use nro-asset-editor to put the icon/picture on it. NRO asset editor doesn't seem to work for this. Just use NRO2NSP's forwarder.

@seanp2500, I used that switch build, went through the PC compiling instructions again, but in the switch directory (sm64pc-switch). Skipped the last 1 or 2 steps for compiling the pc version. Then switched to Masterchan's instructions. Not sure i can really help much other than that. Good luck!
 
Last edited by TheCasualties,

Smoker1

Well-Known Member
Member
Joined
Feb 17, 2015
Messages
5,035
Trophies
1
Location
California
XP
6,028
Country
United States
Anyone creating a Switch Version - See if you can create a SM64 (2) Version, with a different TitleID, so it can be Installed along side the Normal one. If Needed, I do know where the (2) Version is to be found ;) #Message
 
D

Deleted User

Guest
Thanks so much for that link masterchan777! I got the nro running on my switch! Now I just need to use nro-asset-editor to put the icon/picture on it.

@seanp2500, I used that switch build, went through the PC compiling instructions again, but in the switch directory. Skipped the last 1 or 2 steps for compiling the pc version. Then switched to Masterchan's instructions. Not sure i can really help much other than that. Good luck!

that's actually what i just began doing. So when you say "switch directory" what is name and path to this directory please. Is it msys\sm64pc-master then you are running the pc instructions from there am I right?

ok something weird looks like i was using wrong zip so I think that should do it thanks so much! Will post tut soon methinks!
 
Last edited by ,

masterchan777

Well-Known Member
Member
Joined
Oct 1, 2007
Messages
380
Trophies
1
Location
World Wide Web
XP
1,468
Country
Now I just need to use nro-asset-editor to put the icon/picture on it.

Simply edit the Makefile in your switch dir and make the following changes :
Code:
Makefile 433: APP_ICON := [path to your icon jpg]
Makefile 806: @elf2nro $< $@ --nacp=$*.nacp --icon=$(APP_ICON)
save, recompile and you're good to go.
 

TheCasualties

Just trying to be helpful
Member
Joined
May 11, 2020
Messages
440
Trophies
0
Location
The Bardo Islands
XP
494
Country
Netherlands
I was having a lot of trouble with getting the APP_ICON path to work (editing makefile), no matter what I set as the path. I tried for about an hour (or more), trying different locations, path formats, etc. And lots of googling with no luck. Kept saying "Failed to open input icon!"

So I just put it into nro2nsp instead. Set the icon that way and now It's got a nice looking icon right on the home screen. Thanks to everyone in this thread. <3
 
Last edited by TheCasualties,

spriteice

Well-Known Member
Newcomer
Joined
Jan 17, 2020
Messages
92
Trophies
0
XP
1,035
Country
Australia
Simply edit the Makefile in your switch dir and make the following changes :
Code:
Makefile 433: APP_ICON := [path to your icon jpg]
Makefile 806: @elf2nro $< $@ --nacp=$*.nacp --icon=$(APP_ICON)
save, recompile and you're good to go.
I was having a lot of trouble with getting the APP_ICON path to work (editing makefile), no matter what I set as the path. I tried for about an hour (or more), trying different locations, path formats, etc. And lots of googling with no luck. Kept saying "Failed to open input icon!"

So I just put it into nro2nsp instead. Set the icon that way and now It's got a nice looking icon right on the home screen. Thanks to everyone in this thread. <3

I set mine as c:/dev/sm64pc-switch/icon.jpg and it worked

EDIT sorry you are supposed to use backward slashes

APP_ICON := c:\dev\sm64pc-switch\icon.jpg
 
Last edited by spriteice,

TheCasualties

Just trying to be helpful
Member
Joined
May 11, 2020
Messages
440
Trophies
0
Location
The Bardo Islands
XP
494
Country
Netherlands
^^^ Weird, I had that exact same path structure in one of my tests. For some reason I couldn't get it to work. Maybe my jpg was wonky? Hopefully I just messed something up and other people reading this will be able to get it working fine.

And if they can't get it to work, just use nro2nsp.
 

urherenow

Well-Known Member
Member
Joined
Mar 8, 2009
Messages
4,762
Trophies
2
Age
48
Location
Japan
XP
3,659
Country
United States
I thought I made it clear. If you use git clone, you are cloning everything, every branch, and you are looking at the MASTER branch by default. you MUST be on that branch to build the PC version (following the wiki). In practice, it isn't good to download the .zip file. Many projects (not this one, I guess) use submodules from other places, and you won't be able to build properly without those specific modules, in the specific state they were in, the last time the author compiled his/her project. To ensure this is always the case, you should "git clone --recursive https://github.... "

Then you change to the switch branch by entering the command "git checkout switch".

For those having problems with finding the correct binaries. assuming you have mingw64 and mingw32 installed, and if you can't be bothered to add the /bin folders to your path, like I said to in the steps I provided, then you should enter this, before entering the "source $DEVKITPRO/switchvars.sh" command:

PATH=/path/to/mingw64/bin:/path/to/mingw32/bin:$PATH

with that, you should absolutely NOT have to change anything in the makefile, if you're in the correct branch, and have everything installed that is supposed to be installed.
 
Last edited by urherenow,
D

Deleted User

Guest
I thought I made it clear. If you use git clone, you are cloning everything, every branch, and you are looking at the MASTER branch by default. you MUST be on that branch to build the PC version (following the wiki). In practice, it isn't good to download the .zip file. Many projects (not this one, I guess) use submodules from other places, and you won't be able to build properly without those specific modules, in the specific state they were in, the last time the author compiled his/her project. To ensure this is always the case, you should "git clone --recursive https://github.... "

Then you change to the switch branch by entering the command "git checkout switch".

For those having problems with finding the correct binaries. assuming you have mingw64 and mingw32 installed, and if you can't be bothered to add the /bin folders to your path, like I said to in the steps I provided, then you should enter this, before entering the "source $DEVKITPRO/switchvars.sh" command:

PATH=/path/to/mingw64/bin:/path/to/mingw32/bin:$PATH

with that, you should absolutely NOT have to change anything in the makefile, if you're in the correct branch, and have everything installed that is supposed to be installed.

your instructions were not clear i am sorry. Also this sounds like some voodoo. But let’s say you are right your command instructions to clone the git are still not clear in this post. Reason I say voodoo is I have compared cloned gits to just dl zips in past with other stuff in git hub and never noticed a difference in files. I would be curious to do comparisons. I know i got the latest files doing it this way because black border issue is gone. I would have cloned the git but no one had that step listed correctly in their commands...
 

Neuil49

Member
Newcomer
Joined
Dec 27, 2015
Messages
7
Trophies
0
Age
43
XP
502
Country
France
Thank you for your help, I manage to build the nro (with proper icon) and convert it with nro2nsp.

Just a question, how can i have a profile selection at launch and nand saves?
 

FAST6191

Techromancer
Editorial Team
Joined
Nov 21, 2005
Messages
36,798
Trophies
3
XP
28,321
Country
United Kingdom
Honestly a Docker image with the build environment would probably make the most sense. I may look at pulling together a dockerfile tomorrow if work is slow.
Never played with Docker so I would probably be in for a learning curve, though it says OS level and they are usually similar enough so eh. If there is an option to do virtualbox that might also be a plan -- Docker does look like a nice wrapper but plenty around here are familiar with virtualbox.
What I am mainly here to say if you do end up including DKP and it is not going to make it ridiculous in size see about including a clone of the source for that version -- DKP devs seem to be on a bit of tear about having old versions out there (which this would be before long) and I would say abusing the open source license to take things down but I will skip that one for now.
 

SniperKil

Member
Newcomer
Joined
Jul 7, 2006
Messages
7
Trophies
0
Location
Pittsburgh, PA
XP
37
Country
United States
Ok, I have been working on a Dockerfile to build fgsfdsfgs's SM64 switch port and I have a rough version working if anyone is interested in trying it. It currently only works for the us version but should be fairly idiot proof as the hard work in getting the build environment right has already been done.

You need to have Docker installed (just a base install of docker-ce) and a local folder with the .z64 file named baserom.us.z64

The command is
docker run --rm -v /home/files:/mnt/n64 -e "camera=1" msimm29/sm64switch-build:latest

/home/files is a folder on my local machine that contains baserom.us.z64, you can use Windows path names if running on windows but use forward slashes (example: c:/files) and don't touch the path after the :

camera=1 enables better camera, camera=0 disables better camera. Once the build is done it will copy the .nro file to the directory you mapped with the .z64 file

This is what it looks like when it kicks off
sm64build.png


The build environment is configured in the image and when you actually run the image is when it pulls the repo and switches to the switch branch so you will always get the newest commits.

The DockerHub link is:
https://hub.docker.com/r/msimm29/sm64switch-build

And the Dockerfile and shell script lives here. Pull requests are welcome if anyone wants to contribute.
https://github.com/SK360/sm64switch-build

Conspiracy theorists: There's no malware, no one wants to steal yo stuff.

Future possible enhancements: grab the region from the file name, add the icon
 
Last edited by SniperKil,

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    Psionic Roshambo @ Psionic Roshambo: https://www.youtube.com/@legolambs