sm64-port / sm64_3ds

3DS fork of sm64-port
https://discord.gg/7bcNTPK
209 stars 26 forks source link

[Request] Optionally build SM64 as CIA #34

Open CyberYoshi64 opened 3 years ago

CyberYoshi64 commented 3 years ago

Although I did that myself, it would be a very good idea to let people install the game to the HOME menu instead of putting it in a potentially loong list of homebrew apps in the homebrew launcher by using makerom with the elf used to generate the 3dsx file.

The only change would need to be made in the Makefile to add an optional flag to build a CIA instead of a 3DSX.

aspendlove commented 3 years ago

I would love to be able to do this, It's inconvenient to have to navigate to the homebrew menu to launch the game.

RandomMan25XX commented 3 years ago

If I recall correctly, both a 3dsx and elf file are built (if I'm misremembering disregard this), that elf file is just one part to building a cia, you'll also need a banner made and a 3 second(?) sound clip , after you have all that you'll have your cia after using a tool to build said cia

CyberYoshi64 commented 3 years ago

Well, it's mostly true. The tools "makerom" (from The3DSGuy) and "bannertool" (from Steveice10) do not come with a standard installation of DevkitPro but can easily be found on GitHub to add to dkp's bin directory. The elf file used to make the 3dsx can also be used for the cia with no problems. Although making the CIA may take a minute or 2 because this game doesn't use RomFS but everything is in ExeFS. The banner is just a simple 256x128 image with a WAV file that can be up to 3 secs in length. (You could use a 3DS bcmdl but it's not necessary.) The RSF you need for a CIA is also incredibly easy. Just pass in a process name, TID and other CIA-relevant details.

For customizability sake, you can just supply a WAV file with no data (so the header is the only content) and the one building the game to a CIA can supply a WAV file with e.g. a SM64 coin or a Mario voice clip as the banner sound.

Here's the files I used to make the CIA. (It is made for Linux and requires makerom and bannertool to be in $PATH, or easily said, in devkitPro's bin directory) sm64-3ds-port-elf2cia.zip I'll allow you to take the banner files for it, if you plan on allowing CIA building.