ITotalJustice 73886c28ae add gc event waiting, fix control nca mounting, better skip nca support.
- gamecards now wait for an event to change, rather than polling each frame.
  this reduces cpu load on core 3 slightly (3-4% less).
- my understanding of fsOpenFileSystemWithId() was wrong, i thought it used the app_id for the id param.
  turns out it needs the program id (found in the nca header), this is why mounting some control ncas
  would fail.
  fs (and ncm) have a call in 17+ to get the program id, it does so by parsing the nca header.
  in yati, we already have the header so we can avoid the call.
  for the gamecard menu, we don't. so we can parse the nca header, or use the id offset (which we already have)
  to form the program id.
- std::find_if in yati now takes args by ref rather than by value, avoid quite large copies.
- stream installs can now parse the control nca.
- if an nca is already installed, it is now skipped. this is regardless to whether it is not in ncm db.
- nca skipping is technically supported for stream installs, however it is disabled for now as there needs
  to be a way to allow for the stream to continue reading and discarding data until the stream has finished.
  currently, if a ftp (stream) install is skipped, it will close the progress box and cause spahira to hang.
  this is because sphaira expects the stream to only be closed upon all data being read, so there's nothing more
  to process.
- renamed the title_id field in nca header to program_id.
2025-04-29 12:47:38 +01:00
2024-12-16 21:13:05 +00:00
2024-12-16 21:13:05 +00:00
2024-12-16 21:13:05 +00:00
2024-12-16 21:13:05 +00:00
2024-12-16 21:13:05 +00:00

Sphaira

A homebrew menu for the Nintendo Switch.

See the GBATemp thread for more details / discussion.

We have now have a Discord server!. Please use the issues tab to report bugs, as it is much easier for me to track.

Showcase

Img Img
Img Img
Img Img
Img Img

Bug reports

For any bug reports, please use the issues tab and explain in as much detail as possible!

Please include:

  • CFW type (i assume Atmosphere, but someone out there is still using Rajnx);
  • CFW version;
  • FW version;
  • The bug itself and how to reproduce it.

FTP

FTP can be enabled via the network menu. It uses the same config as ftpsrv /config/ftpsrv/config.ini. See here for the full list of all configs available.

MTP

MTP can be enabled via the Network menu.

File association

Sphaira has file association support. Let's say your app supports loading .png files, then you could write an association file, then when using the file browser, clicking on a .png file will launch your app along with the .png file as argv[1]. This was primarly added for rom loading support for emulators / frontends such as RetroArch, MelonDS, mGBA etc.

[config]
path=/switch/your_app.nro
supported_extensions=jpg|png|mp4|mp3

The path field is optional. If left out, it will use the name of the ini to find the nro. For example, if the ini is called mgba.ini, it will try to find the nro in /switch/mgba.nro and /switch/folder/mgba.nro.

See assets/romfs/assoc/ for more examples of file assoc entries.

Credits

  • borealis
  • stb
  • yyjson
  • nx-hbmenu
  • nx-hbloader
  • deko3d-nanovg
  • libpulsar
  • minIni
  • GBATemp
  • hb-appstore
  • haze
  • Everyone who has contributed to this project!
Description
A homebrew menu for the Nintendo Switch
Readme GPL-3.0 16 MiB
Languages
C 52.1%
C++ 45.1%
JavaScript 1.2%
CMake 0.6%
Python 0.5%
Other 0.5%