-
-
Notifications
You must be signed in to change notification settings - Fork 377
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GitHub Actions: add Nintendo Switch as build target #3928
Conversation
Hi @dimag0g , could you please take a look at this pull request? |
@ihhub NRO is a "Nintendo Resource Object" which is a custom archive containing sections of an ELF file, an icon and a few description fields. Unlike Java JAR files, NRO is not compatible with ZIP. This format is mostly used by homebrew SW, the eShop games usually come in NSP files (Nintendo Switch Package) which contain a mountable filesystem image. It's also possible to package homebrew in an NSP, but it only makes sense if all game resources can be distributed together with the executable, which is not the case for fheores2. Typically, NRO files run with current directory set to the SD card folder where they are located, while NSP files run with the current directory set to the mountpoint where the image was mounted. Here's a
Since fheroes2 needs additional files (*.mo) inside the package, it makes sense to put the NRO file together with Note that my |
Hi @dimag0g
I suppose we need an icon? I wasn't able to find |
@oleg-derevenetz You'll need a 256x256 picture. If you don't supply one, the NRO will get a default icon from devkitPro which I suppose is free to use. I didn't include the icon I use in the repo because its license is not GPL-compatible. |
Hi @ihhub @dimag0g Now the NRO file is produced and packed into the ZIP archive with all other stuff.
I copied @dimag0g if you have a Switch, could you please test the produced NRO? The test release is available here: https://github.com/oleg-derevenetz/fheroes2/releases/tag/fheroes2-switch-sdl2_dev Also there are still no installation instructions that could be included in the ZIP package. |
Hi @oleg-derevenetz and @dimag0g , if we need 256x256 image we can use this: |
@oleg-derevenetz Your build runs on my Switch just fine. As I explained, the lowest available resolution is a bit too high and the default button mapping is a bit unusual ("A" is mouse right click, "B" is mouse left click), but the game is fully usable otherwise. |
@oleg-derevenetz , a huge thanks for implementing this! @dimag0g , could you please assist to complete the support of Nintendo Switch: documentation perhaps and extra resolutions like we did for PlayStation Vita? |
@ihhub @oleg-derevenetz Upon further testing I discovered that the game tries to use the root folder of the SD card as the home directory, so the config file is saved in the root, saving a game fails due to missing directory, and language files are not loaded:
I remember working on this problem in my Switch releases. I will make a PR soon with the changes (custom resolution, button mapping, home directory detection and the README file I have written). For now, it's a great progress to have official Switch builds, thanks to both of you for this effort! |
close #3215
Unfortunately, I have no idea how to make a package properly (now I just create a ZIP file with
fheroes2
binary file and all usual stuff) and there is no separate README for Switch, so only generic README.txt it is included in the package.