Tutorial  Updated

Generate RetroArch NSP Forwarders (with proper icon and title)

This tutorial will show you how to generate a RetroArch NSP Forwarder. The end result is a game on your HOME menu, and when you open it RetroArch is launched with the game directly running. Here's a video showing what it looks like (video by @bobdamnit).

I may or may not make an automated version of it, in a nice GUI, without any external dependency required. Time will tell. If someone wants to do it, go ahead.

1. What's needed
  • The latest release of hacBrewPack : https://github.com/The-4n/hacBrewPack/releases
  • keys.dat (I recommend using Lockpick to dump it)
  • The latest release of my modded hbloader : https://github.com/natinusala/nx-hbloader-retroarch-forwarder-mod/releases (build.zip)
  • The core (NRO) and the game you want to forward on your SD card (download the core through RA's online updater)
  • A 256x256 JPG icon of the game you want to forward (I suggest that you make your own)
  • (optional) a PNG to be displayed in the top-left corner of the screen while loading (normally Nintendo logo) and a GIF to be displayed in the bottom-right corner (normally an animated Switch logo)
2. Creating the NSP

Extract hacBrewPack somewhere and follow these steps:
  • copy your keys.dat where hacbrewpack.exe is
  • copy both "control" and "exefs" from my modded hbloader to the folder where hacbrewpack.exe is
  • inside the new "control", copy your 256x256 JPG and rename it "icon_AmericanEnglish.dat"
  • create a folder called "logo" where hacbrewpack.exe is
  • now the important part: create a folder called "romfs" where hacbrewpack.exe is
    • inside, create two files: "nextNroPath" and "nextArgv"
    • in "nextNroPath", write the path to the core on your SD card starting by "sdmc:" (for example sdmc:/retroarch/cores/quicknes_libretro_libnx.nro)
    • in "nextArgv", write the path to the core on your SD card starting by "sdmc":, followed by a whitespace and the path to the game on your SD card between quotes (for example sdmc:/retroarch/cores/quicknes_libretro_libnx.nro "sdmc:/roms/nes/Super Mario Bros. 3 (USA).nes")
    • Be sure not to put newlines in the end of any of those files
  • Open cmd in the folder where hacbrewpack.exe is and run "hacbrewpack.exe --titleid <title id> --titlename <game name> --titlepublisher <game publisher>"
  • If everything went fine, you should have your NSP in the "hacbrewpack_nsp" folder (called by its title id)
3. How does it work?

If a content path is set in argv when running RetroArch, the content is loaded instead of opening the menu.

This is a simple mod of hbloader which reads the NRO path ("nextNroPath") as well as argv ("nextArgv") from its romfs.
  1. you run the title
  2. hbloader starts
  3. hbloader reads the NRO path and its arguments from its romfs
  4. hbloader starts the NRO (the core), giving the arguments (the content path)
  5. The core is started, and loads the content given in arguments
"But why use romfs, you could have directly set the path in the code" I hear you ask. I used romfs because I wanted to be able to change the core and content path without rebuilding hbloader, for an eventual automated tool.
 
Last edited by natinusala,

PRAGMA

Well-Known Member
Member
Joined
Dec 29, 2015
Messages
2,258
Trophies
1
Location
Ireland
Website
github.com
XP
5,038
Country
Ireland
I wanted to be able to change the core and content path without rebuilding hbloader, for an eventual automated tool.
I've made such an automated tool here, https://gbatemp.net/threads/nton-yet-another-nro-to-nsp-forwarder-for-v12-0-0.621619/
Post automatically merged:

Just a heads up for anyone else that comes along wondering why their hacBrewPack NSP's are only showing up as a generic question mark "?" icon on the HomeScreen, it's because of Atmosphere v0.10.x. For some reason Atmosphere v0.10.x versions are not allowing the icons to show up correctly, but instead being shown as just a generic icon with a question mark. While using FW 9.0.0, I rolled back to Atmosphere v0.9.4 and now when I install them they work just fine.

If you have NSP forwards installed and then update to Atmosphere v0.10.x, then the icons will continue to show up like normal. The issue is only occurring if you try to install a hacBrewPack created NSP with Atmosphere v0.10.x, then the HomeScreen icon will only show up as a Generic "?" question mark.
Not true, it's because there's residual bit of EXIF or unnecessary metadata that Horizon does not like.
Using ImageMagick with the `-strip` flag, and formatting as JPEG will always produce a .jpg file that when renamed to .bin will be valid. Just make sure it was resized to 256x256.
 
  • Love
Reactions: chronoss

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    K3Nv2 @ K3Nv2: https://youtu.be/9pwfLTaW8J8?si=FaKUzB-OBP92LnUD