Sphaira - hbmenu replacement

Sphaira is hbmenu alternative. It currently has feature parity with hbmenu (that is, launches homebrew + nxlink) whilst adding quite a few features.



HomeBrew​

The main menu tab, it lists all the .nro found in "/switch/". From there, you can launch, sort, delete, create a forwarder etc.
You can navigate to the other menu tabs using "L" and "R", explained below.

FileBrowser​

By pressing "L" from the main menu, you can access the file browser. You can Cut, Copy, Delete, Rename etc.
You can select multiple files / folders by using the "ZR" button and then se the above functions of that group of files.

Forwaders can be created if the selected file has a file assoc, see below for more details.

Appstore​

sphaira features an appstore, using the api from https://hb-app.store/switch. It can be navigated to by pressing "R" from the main menu.
The appstore is feature parity with hb-appstore app, as well as installing the manifests in the same folder as hb-appstore, in order to not break compatibility between the two.

Themes​

sphaira comes with 3 themes, abyss (default), black and white (unfinished).
custom themes can be added to "/config/sphaira/themes/", here is the abyss theme for example:
INI:
[meta]
name=Abyss
author=TotalJustice
version=1.0.0
; unused currently
preview=romfs:/theme/preview.jpg

[theme]
background=0x0f111aff
grid=0x0f115c30
selected=0x0f115cff
selected_overlay=0x529cffff
text=0xffbc41ff
text_selected=0x529cffff

icon_audio=romfs:/theme/icon_audio.png
icon_video=romfs:/theme/icon_video.png
icon_image=romfs:/theme/icon_image.png
icon_file=romfs:/theme/icon_file.png
icon_folder=romfs:/theme/icon_folder.png
icon_zip=romfs:/theme/icon_zip.png
icon_nro=romfs:/theme/icon_nro.png

music can be added to a theme, as long as the music is converted to bfstm format. simply add an entry like so: `music=/config/sphaira/themes/music/bgmusic_pcm.bfstm`

Forwaders​

sphaira can create and install forwarders for any .nro. It will use the icon of the .nro and the name + author.

It can also install forwarders for files that have a file assoc. For example, if mgba is installed and a game is located in "/roms/gba/game.gba", then the "Install Fowarder" option will appear. In this case, it will try to scrape the icon of the game, otherwise it will use the icon of the .nro and the name will be a combination of the .nro name and game name.

File Assoc​

file assoc is a way to associate file extensions (.gba, .nro etc) with a homebrew app. For example, clicking on rom.gbc that has an file assoc will bring up a list of all the applications that can handle it.
This can be used for emulators, media players, text editors etc...

custom file assoc should go in the folder "/config/sphaira/assoc/"

the format is *very* simple, here is an example of vgedit.ini
INI:
[config]
supported_extensions=txt|json|cfg|ini|md|log

and again for mgba.ini
INI:
[config]
supported_extensions=gba|gbc|sgb|gb
database=Nintendo - Game Boy|Nintendo - Game Boy Color|Nintendo - Game Boy Advance

"path": (optional) fullpath to the .nro. if not specified, it uses the name of the ini, ie, mgba.ini will use mgba.nro.
"supported_extensions": list of extensions the application supports, separated by |. plea
"database": (optional) name of the rom database to use defined by the left-side of this table <https://gist.github.com/ITotalJustice/d5e82ba601ca13b638af9b00e33a4a86>..

All of the retroarch cores has file assoc built into sphaira, so if you download retroarch using the appstore, and then navigate to "/roms/gbc/game.gbc", gambatte and mgba will be available to be selected.

Games can be kept in .zip format, sphaira will peek into the .zip and find the real extension and use that for displaying icons / file assoc.

Roms​

roms should be placed in "/roms/system_name/" where system name is defined by this table right-side entries <https://gist.github.com/ITotalJustice/d5e82ba601ca13b638af9b00e33a4a86>.
this is the same layout emulation station uses. the reason for forcing roms to be in specific folders is due to many roms for different systems using the same file extension, ie, .bin / .cue or .chd.

roms placed in subfolders are allowed, for example "/roms/psx/scooby-doo/scooby-doo.bin" is valid.

Themezer​

themes can be browsed and download by going Menu Options -> Misc -> Themezer. Themes will be downloaded to "/themes/sphaira/Theme Name - By Author/".
To install themes, launch "NXThemes Installer" and browse to the selected folder listed above.

Nxlink​

For homebrew developers, nxlink is built into sphaira. You do not have to press any special buttons, just do "nxlink *.nro" and send your nro like normal, console logging works to be using "nxlink -s *.nro"
By default, this is enabled in the background, to disable it: Menu Options -> Network -> Nxlink.



That's most of the features spahira has. If you enjoy it so much that you'd rather it be launched over regular hbmenu, you can enable the option in "Menu Options -> Replace hbmenu on exit" where it will do just that. It will create a backup of hbmenu in "/switch/hbmenu.nro" should you wish to swap back.
homebrew.jpg

games.jpg

appstore.jpg

appstore_page.jpg

file_browser.jpg

themezer.jpg

launch_options.jpg


Releases: https://github.com/ITotalJustice/sphaira/releases/
Bleeding-edge Releases: https://github.com/ITotalJustice/sphaira/actions
Source Code: https://github.com/ITotalJustice/sphaira
 
Last edited by Deleted member 413168,
Could someone provide directions for creating a forwarder to start a specific game rom in an emulator? So for example, a forwarder to start Combat for the Atari 2600. I am confused as to how to do something like that.
Roms need to go in /roms/system-name/, see the list in the first post for the correct system names.

You may need to create a file assoc for the emulator that can handle the roms. Check the files on the GitHub page for examples, in /assets/romfs/assoc/
 
Well this is awesome, thank you for this!

I would love support for manually choosing an icon and title for ROM forwarders! Either a file picker to choose an icon, or maybe if you put a png with the same name as the rom in the same folder, it could just use that?

Still though, really loving everything here so far!
 
can it be launched without the need of a controller? that's what i'm really looking for in a homebrew menu.
 
Well this is awesome, thank you for this!

I would love support for manually choosing an icon and title for ROM forwarders! Either a file picker to choose an icon, or maybe if you put a png with the same name as the rom in the same folder, it could just use that?

Still though, really loving everything here so far!
Thanks! As for custom icons, it's a bit tricky to cleanly support this. In the case of having a icon next to the path, that would require you to download an image and rename it to match. This would all be done on pc more than likely, as which point its probably better to use a more customizable pc tool to do the job at creating a forwarder.

The point of the forwarders in sphaira is to make quick shortcuts for apps and files on the homescreen, without the need to mess around with config files, images etc. a single click and it's done. It always works. No keys needed etc.

The rom forwarders do try to fetch the image for the icon, but this feature was very lazily added by me, and only works if the rom is named correctly (doesn't do hashes). I have considered adding an option to download a database, using retroarchs for examples, to find images. But in the case of reteoarch, it's quite often that it fails to find images. All other databases are quite large and would take a large time to parse and find, and running a hash over large ROM files instant cheap, and it may fail to find the image. So you'd end up waiting significantly more time to *maybe* get an image.

In the end, I deemed it all not worthwhile for me to work on as the end result wouldn't be perfect and would result in a number of issues open on why rom X doesnt find the image etc. sorry about that.
Post automatically merged:

can it be launched without the need of a controller? that's what i'm really looking for in a homebrew menu.
Unfortunately not as there is no touch support currently. I would say to stick with hbmenu 😄
 
Thanks! As for custom icons, it's a bit tricky to cleanly support this. In the case of having a icon next to the path, that would require you to download an image and rename it to match. This would all be done on pc more than likely, as which point its probably better to use a more customizable pc tool to do the job at creating a forwarder.

The point of the forwarders in sphaira is to make quick shortcuts for apps and files on the homescreen, without the need to mess around with config files, images etc. a single click and it's done. It always works. No keys needed etc.

The rom forwarders do try to fetch the image for the icon, but this feature was very lazily added by me, and only works if the rom is named correctly (doesn't do hashes). I have considered adding an option to download a database, using retroarchs for examples, to find images. But in the case of reteoarch, it's quite often that it fails to find images. All other databases are quite large and would take a large time to parse and find, and running a hash over large ROM files instant cheap, and it may fail to find the image. So you'd end up waiting significantly more time to *maybe* get an image.

In the end, I deemed it all not worthwhile for me to work on as the end result wouldn't be perfect and would result in a number of issues open on why rom X doesnt find the image etc. sorry about that.
Post automatically merged:


Unfortunately not as there is no touch support currently. I would say to stick with hbmenu 😄
I see. Yes, having to add icons from the PC would definitely be required, but it’s a lot easier to create forwarders using Sphaira right on my Switch than it is to have to enter all the info manually in a program on my PC, create the forwarder, copy it over, and install it, every time I want to add a game. Sphaira makes it super easy, which I’m a big fan of! I’ve long been wanting a way to create forwarders directly on my Switch so I’m impressed. I‘m just picky and want to choose my own icons :D

SteamgridDB is usually where I get icons. Can you maybe point me to a commit on GitHub where you implemented finding icons? I don’t know much about Switch development but I’ve been wanting to get into it. Maybe I could take a look and try to improve this?
 
This should be bundled with atmosphere instead of the old hbmenu.
not gonna happen for 2 reasons

1 the forwarder functionality
2 bundling (and therefore endorsing) software from someone who already got dmca twice by nintendo might not be the wisest move for atmosphere if you want nintendo to leave it alone
 
View attachment 476602
I'm very satisfied just looking at this screen of sphaira, and I'm looking forward to seeing what great features will be added in the future. My suggestion is that it would be very cool if there was a function to view screenshots like the official HOS album in sphaira, a function to upload photos like nxgallery or shareNX, and a function to display QR codes! Also, although it's not related to this thread, I hope someone will make a cool icon for ftpsrv.
Finally, sorry for the long message.
I can't set a new background
I tried to create the theme.ini file but the background just doesn't want to appear
 
Well this is awesome, thank you for this!

I would love support for manually choosing an icon and title for ROM forwarders! Either a file picker to choose an icon, or maybe if you put a png with the same name as the rom in the same folder, it could just use that?

Still though, really loving everything here so far!
Made forwarders for my psp games but had trouble getting the icons, fixed it by going to the website the app is scraping from and just renamed the game file to make it exactly as what's in the site, after that the icon showed up. It's easy to do since I just renamed the files directly from spharia but not easy enough for the average user. I had to take a picture of the link displayed in my screen during the failed scraping attempt and typed it in my phone manually.
 
I can't set a new background
I tried to create the theme.ini file but the background just doesn't want to appear
Have you seen the hbc theme I posted in this thread? Iirc it's on page 1 or 2. I change the background in that theme so you can use it as a reference, it's probably an issue with the path provided.
 
good idea, i've pushed a commit with that change.
Post automatically merged:

Here's a hbc theme for sphaira. Its very basic, it uses the assets from hbc wii and music from hbc wiiu. to install, extract the zip to your sd card and select the theme by pressing Y -> Theme -> HBC. I made this to demonstrate how to easily make themes and add background music :)
Not work background music
Post automatically merged:

Have you seen the hbc theme I posted in this thread? Iirc it's on page 1 or 2. I change the background in that theme so you can use it as a reference, it's probably an issue with the path provided.
yes, I solved it thanks, it was the file name that he didn't like
 
About Theme icons.

- Are those resized to 50 heigh AND 50 width ? Or only 50 heigh?

- Is it possible to separate Icons and Themes?
Or I must clone the dark theme just to choose different icons?

Currently I am making my own icons using the OG Switch colour palette.
It is a WIP and will share the final 7-8 icons when are finished.

I have a few more questions in theme making. :) Unable to send a pm.
 

Attachments

  • video.png
    video.png
    5.5 KB · Views: 27
  • music .png
    music .png
    6.9 KB · Views: 26
  • folder.png
    folder.png
    3.5 KB · Views: 32
About Theme icons.

- Are those resized to 50 heigh AND 50 width ? Or only 50 heigh?

- Is it possible to separate Icons and Themes?
Or I must clone the dark theme just to choose different icons?

Currently I am making my own icons using the OG Switch colour palette.
It is a WIP and will share the final 7-8 icons when are finished.

I have a few more questions in theme making. :) Unable to send a pm.
Hmm, I could add a field called "inherit" which inherits all the entries from a theme. Then you can override them.

Also, what do you think about theme creation? Is there anything you feel is missing and you'd look like to be able to customise?

Anything you would like to add, feel free to open an issue on GitHub, and then I'll look into adding everything. The inherit feature I'll definitely add however!
 
Last edited by Deleted member 413168,

Site & Scene News

Popular threads in this forum