Homebrew RELEASE Nro2Nsp Retroarch Rom/Nro Forwarders!

Amirgh

Well-Known Member
Newcomer
Joined
Feb 13, 2021
Messages
64
Trophies
0
Age
32
XP
351
Country
United States
sdmc:/switch/pplay.nro
sdmc:/switch/PPSSPP_GL.nro
sdmc:/switch/PPSSPP_GLES2.nro


And I have no plans to do any more forwarders

You are great man,Thanks


How do you load atmos? With primary or secondary? For me, with primary don´t seems to work...
Not emummc but Hekate 5.5.5 and atmos 0.19.1
Also works well after restarting Switch.
 
Last edited by Amirgh,

Meliodas2255

It makes sense
Member
Joined
Jan 4, 2017
Messages
245
Trophies
0
Age
30
XP
317
Country
United States
sdmc:/switch/pplay.nro
sdmc:/switch/PPSSPP_GL.nro
sdmc:/switch/PPSSPP_GLES2.nro


And I have no plans to do any more forwarders

I was looking at your process. nro2nsp is just a tool that automates the process. like you said you can use hacbrewtool to generate nsp with the latest libnx. I don't understand the hb loader enough to work on it. but could you send me your source files so that I'm able to use them as a template and build from there. or
could you provide me with your guide on how to do it, please? what changes did you made on the hbloader code to boot a nro from a different location?
 
Last edited by Meliodas2255,

Meliodas2255

It makes sense
Member
Joined
Jan 4, 2017
Messages
245
Trophies
0
Age
30
XP
317
Country
United States
@Meliodas2255 just get hbl and replace default nro (hbmenu) that will be enough.

I've done that, but i must be doing something wrong. help me out. (in my case, I'm trying to built a forwarder for retroarch). it works. I used your pplay.nsp by renaming the retroarch.nro to pplay.nro. and it boots it and you can launch any games with it. so I'm trying to recreate what you did but it closes as en error when I launch it.

1. download the hbloader source code, edit the main.c to define DEFAULT_NRO to "sdmc:/switch/retroarch.nro"
1. edit the hbl.json (app title, and app title_id) rename it to retroarch.json
2. compile the files. it creates the exefs/main and main.npdm and the nacp file (i used devitkitpro, and edited the makefile to export the nacp as well,i used the cmd "make")
3. set up the hacbrewpack folders
logo
control
romfs
exefs
prod.keys.

I'm pretty sure the problem lies on how I compile the control.nacp, and exefs files.

How do you do it? would you mind helping me out.
 

duckbill007

Well-Known Member
Member
Joined
May 5, 2011
Messages
464
Trophies
0
XP
1,628
Country
Russia
@Meliodas2255 right now I am using this:
Code:
#!/bin/bash

rm -fr tmp_dir > /dev/null 2>&1
mkdir -p tmp_dir
mkdir -p tmp_dir/source
mkdir -p tmp_dir/exefs
mkdir -p tmp_dir/logo
mkdir -p tmp_dir/romfs
mkdir -p tmp_dir/control

NRO_PATH=$1
NRO_NAME=`basename "$NRO_PATH" .nro`
TITLE_ID=$2
TARGET_NRO_PATH=$3

../bin/nstool  --type nro --icon tmp_dir/control/icon_AmericanEnglish.dat --nacp tmp_dir/control/control.nacp $NRO_PATH > /dev/null 2>&1
mogrify -strip tmp_dir/control/icon_AmericanEnglish.dat

cp tmp_dir/control/icon_AmericanEnglish.dat tmp_dir/control/icon_Japanese.dat
cp tmp_dir/control/icon_AmericanEnglish.dat tmp_dir/control/icon_French.dat
cp tmp_dir/control/icon_AmericanEnglish.dat tmp_dir/control/icon_German.dat
cp tmp_dir/control/icon_AmericanEnglish.dat tmp_dir/control/icon_Italian.dat
cp tmp_dir/control/icon_AmericanEnglish.dat tmp_dir/control/icon_Spanish.dat
cp tmp_dir/control/icon_AmericanEnglish.dat tmp_dir/control/icon_Chinese.dat
cp tmp_dir/control/icon_AmericanEnglish.dat tmp_dir/control/icon_Korean.dat
cp tmp_dir/control/icon_AmericanEnglish.dat tmp_dir/control/icon_Dutch.dat
cp tmp_dir/control/icon_AmericanEnglish.dat tmp_dir/control/icon_Portuguese.dat
cp tmp_dir/control/icon_AmericanEnglish.dat tmp_dir/control/icon_Russian.dat
cp tmp_dir/control/icon_AmericanEnglish.dat tmp_dir/control/icon_Taiwanese.dat
cp tmp_dir/control/icon_AmericanEnglish.dat tmp_dir/control/icon_BritishEnglish.dat
cp tmp_dir/control/icon_AmericanEnglish.dat tmp_dir/control/icon_CanadianFrench.dat
cp tmp_dir/control/icon_AmericanEnglish.dat tmp_dir/control/icon_LatinAmericanSpanish.dat
cp tmp_dir/control/icon_AmericanEnglish.dat tmp_dir/control/icon_SimplifiedChinese.dat
cp tmp_dir/control/icon_AmericanEnglish.dat tmp_dir/control/icon_TraditionalChinese.dat
cp tmp_dir/control/icon_AmericanEnglish.dat tmp_dir/control/icon_BrazilianPortuguese.dat

read -r -d$'\n' APP_NAME < <(dd if=tmp_dir/control/control.nacp skip=0 bs=1 count=400 status=none | tr -s '\000' '\n')
read -r -d$'\n' APP_AUTH < <(dd if=tmp_dir/control/control.nacp skip=512 bs=1 count=400 status=none | tr -s '\000' '\n')
read -r -d$'\n' APP_VERS < <(dd if=tmp_dir/control/control.nacp skip=12384 bs=1 count=400 status=none | tr -s '\000' '\n')

echo "name: '""$APP_NAME""'"
echo "auth: '""$APP_AUTH""'"
echo "vers: '""$APP_VERS""'"


cp template.trampoline.s tmp_dir/source/trampoline.s
cp template.NintendoLogo.png tmp_dir/logo/
cp template.StartupMovie.gif tmp_dir/logo/

cp template.app.json tmp_dir/app.json

rpl "Title_ID" "$TITLE_ID" tmp_dir/app.json > /dev/null 2>&1
rpl "App_Name" "$APP_NAME" tmp_dir/app.json > /dev/null 2>&1
rpl "Created_By" "$APP_AUTH" tmp_dir/app.json > /dev/null 2>&1
rpl "Version_Number" "$APP_VERS" tmp_dir/app.json > /dev/null 2>&1

cp template.Makefile tmp_dir/Makefile
rpl "Title_ID" "$TITLE_ID" tmp_dir/Makefile > /dev/null 2>&1
rpl "App_Name" "$APP_NAME" tmp_dir/Makefile > /dev/null 2>&1
rpl "Created_By" "$APP_AUTH" tmp_dir/Makefile > /dev/null 2>&1
rpl "Version_Number" "$APP_VERS" tmp_dir/Makefile > /dev/null 2>&1

cp template.main.c tmp_dir/source/main.c
rpl "placeholder_to_be_replaced.nro" "$TARGET_NRO_PATH" tmp_dir/source/main.c > /dev/null 2>&1

make -C tmp_dir

../bin/hacbrewpack \
--tempdir tmp_dir/raw \
--ncadir tmp_dir/nca \
--nspdir tmp_dir \
--exefsdir tmp_dir/build/exefs \
--romfsdir tmp_dir/romfs \
--logodir tmp_dir/logo \
--controldir tmp_dir/control \
--keepncadir

rm -fr ./hacbrewpack_backup/

TITLE_ID=`echo "$TITLE_ID" | tr '[:upper:]' '[:lower:]'`

mv tmp_dir/$TITLE_ID.nsp "./$NRO_NAME""_[$TITLE_ID].nsp"

--------------------- MERGED ---------------------------

only change to hbl's main.c is nbmenu.nro -> placeholder_to_be_replaced.nro
 
  • Like
Reactions: Amirgh

kodiportalgabe

Member
Newcomer
Joined
Apr 17, 2021
Messages
8
Trophies
0
Age
34
XP
32
Country
United States
@Meliodas2255 right now I am using this:
Code:
#!/bin/bash

rm -fr tmp_dir > /dev/null 2>&1
mkdir -p tmp_dir
mkdir -p tmp_dir/source
mkdir -p tmp_dir/exefs
mkdir -p tmp_dir/logo
mkdir -p tmp_dir/romfs
mkdir -p tmp_dir/control

NRO_PATH=$1
NRO_NAME=`basename "$NRO_PATH" .nro`
TITLE_ID=$2
TARGET_NRO_PATH=$3

../bin/nstool  --type nro --icon tmp_dir/control/icon_AmericanEnglish.dat --nacp tmp_dir/control/control.nacp $NRO_PATH > /dev/null 2>&1
mogrify -strip tmp_dir/control/icon_AmericanEnglish.dat

cp tmp_dir/control/icon_AmericanEnglish.dat tmp_dir/control/icon_Japanese.dat
cp tmp_dir/control/icon_AmericanEnglish.dat tmp_dir/control/icon_French.dat
cp tmp_dir/control/icon_AmericanEnglish.dat tmp_dir/control/icon_German.dat
cp tmp_dir/control/icon_AmericanEnglish.dat tmp_dir/control/icon_Italian.dat
cp tmp_dir/control/icon_AmericanEnglish.dat tmp_dir/control/icon_Spanish.dat
cp tmp_dir/control/icon_AmericanEnglish.dat tmp_dir/control/icon_Chinese.dat
cp tmp_dir/control/icon_AmericanEnglish.dat tmp_dir/control/icon_Korean.dat
cp tmp_dir/control/icon_AmericanEnglish.dat tmp_dir/control/icon_Dutch.dat
cp tmp_dir/control/icon_AmericanEnglish.dat tmp_dir/control/icon_Portuguese.dat
cp tmp_dir/control/icon_AmericanEnglish.dat tmp_dir/control/icon_Russian.dat
cp tmp_dir/control/icon_AmericanEnglish.dat tmp_dir/control/icon_Taiwanese.dat
cp tmp_dir/control/icon_AmericanEnglish.dat tmp_dir/control/icon_BritishEnglish.dat
cp tmp_dir/control/icon_AmericanEnglish.dat tmp_dir/control/icon_CanadianFrench.dat
cp tmp_dir/control/icon_AmericanEnglish.dat tmp_dir/control/icon_LatinAmericanSpanish.dat
cp tmp_dir/control/icon_AmericanEnglish.dat tmp_dir/control/icon_SimplifiedChinese.dat
cp tmp_dir/control/icon_AmericanEnglish.dat tmp_dir/control/icon_TraditionalChinese.dat
cp tmp_dir/control/icon_AmericanEnglish.dat tmp_dir/control/icon_BrazilianPortuguese.dat

read -r -d$'\n' APP_NAME < <(dd if=tmp_dir/control/control.nacp skip=0 bs=1 count=400 status=none | tr -s '\000' '\n')
read -r -d$'\n' APP_AUTH < <(dd if=tmp_dir/control/control.nacp skip=512 bs=1 count=400 status=none | tr -s '\000' '\n')
read -r -d$'\n' APP_VERS < <(dd if=tmp_dir/control/control.nacp skip=12384 bs=1 count=400 status=none | tr -s '\000' '\n')

echo "name: '""$APP_NAME""'"
echo "auth: '""$APP_AUTH""'"
echo "vers: '""$APP_VERS""'"


cp template.trampoline.s tmp_dir/source/trampoline.s
cp template.NintendoLogo.png tmp_dir/logo/
cp template.StartupMovie.gif tmp_dir/logo/

cp template.app.json tmp_dir/app.json

rpl "Title_ID" "$TITLE_ID" tmp_dir/app.json > /dev/null 2>&1
rpl "App_Name" "$APP_NAME" tmp_dir/app.json > /dev/null 2>&1
rpl "Created_By" "$APP_AUTH" tmp_dir/app.json > /dev/null 2>&1
rpl "Version_Number" "$APP_VERS" tmp_dir/app.json > /dev/null 2>&1

cp template.Makefile tmp_dir/Makefile
rpl "Title_ID" "$TITLE_ID" tmp_dir/Makefile > /dev/null 2>&1
rpl "App_Name" "$APP_NAME" tmp_dir/Makefile > /dev/null 2>&1
rpl "Created_By" "$APP_AUTH" tmp_dir/Makefile > /dev/null 2>&1
rpl "Version_Number" "$APP_VERS" tmp_dir/Makefile > /dev/null 2>&1

cp template.main.c tmp_dir/source/main.c
rpl "placeholder_to_be_replaced.nro" "$TARGET_NRO_PATH" tmp_dir/source/main.c > /dev/null 2>&1

make -C tmp_dir

../bin/hacbrewpack \
--tempdir tmp_dir/raw \
--ncadir tmp_dir/nca \
--nspdir tmp_dir \
--exefsdir tmp_dir/build/exefs \
--romfsdir tmp_dir/romfs \
--logodir tmp_dir/logo \
--controldir tmp_dir/control \
--keepncadir

rm -fr ./hacbrewpack_backup/

TITLE_ID=`echo "$TITLE_ID" | tr '[:upper:]' '[:lower:]'`

mv tmp_dir/$TITLE_ID.nsp "./$NRO_NAME""_[$TITLE_ID].nsp"

--------------------- MERGED ---------------------------

only change to hbl's main.c is nbmenu.nro -> placeholder_to_be_replaced.nro

Can you just do us all a favor and make one for retroarch? I tried what you said but couldn't do it.
 

Buckton

New Member
Newbie
Joined
Jan 15, 2021
Messages
4
Trophies
0
Age
28
XP
60
Country
Brazil
This works on AMS19.1 FW12.01 made by my, tested...

Just made me wonder... How can your forwarder be working while all the others I have don't? Since I updated my atmosphere and my firmware it doesn't work at all. Even the ones I tried to create.
 

yeahbeer

Member
Newcomer
Joined
May 3, 2021
Messages
14
Trophies
0
Age
71
XP
327
Country
Barbados
@Meliodas2255 right now I am using this:
Code:
#!/bin/bash

rm -fr tmp_dir > /dev/null 2>&1
mkdir -p tmp_dir
mkdir -p tmp_dir/source
mkdir -p tmp_dir/exefs
mkdir -p tmp_dir/logo
mkdir -p tmp_dir/romfs
mkdir -p tmp_dir/control

NRO_PATH=$1
NRO_NAME=`basename "$NRO_PATH" .nro`
TITLE_ID=$2
TARGET_NRO_PATH=$3

../bin/nstool  --type nro --icon tmp_dir/control/icon_AmericanEnglish.dat --nacp tmp_dir/control/control.nacp $NRO_PATH > /dev/null 2>&1
mogrify -strip tmp_dir/control/icon_AmericanEnglish.dat

cp tmp_dir/control/icon_AmericanEnglish.dat tmp_dir/control/icon_Japanese.dat
cp tmp_dir/control/icon_AmericanEnglish.dat tmp_dir/control/icon_French.dat
cp tmp_dir/control/icon_AmericanEnglish.dat tmp_dir/control/icon_German.dat
cp tmp_dir/control/icon_AmericanEnglish.dat tmp_dir/control/icon_Italian.dat
cp tmp_dir/control/icon_AmericanEnglish.dat tmp_dir/control/icon_Spanish.dat
cp tmp_dir/control/icon_AmericanEnglish.dat tmp_dir/control/icon_Chinese.dat
cp tmp_dir/control/icon_AmericanEnglish.dat tmp_dir/control/icon_Korean.dat
cp tmp_dir/control/icon_AmericanEnglish.dat tmp_dir/control/icon_Dutch.dat
cp tmp_dir/control/icon_AmericanEnglish.dat tmp_dir/control/icon_Portuguese.dat
cp tmp_dir/control/icon_AmericanEnglish.dat tmp_dir/control/icon_Russian.dat
cp tmp_dir/control/icon_AmericanEnglish.dat tmp_dir/control/icon_Taiwanese.dat
cp tmp_dir/control/icon_AmericanEnglish.dat tmp_dir/control/icon_BritishEnglish.dat
cp tmp_dir/control/icon_AmericanEnglish.dat tmp_dir/control/icon_CanadianFrench.dat
cp tmp_dir/control/icon_AmericanEnglish.dat tmp_dir/control/icon_LatinAmericanSpanish.dat
cp tmp_dir/control/icon_AmericanEnglish.dat tmp_dir/control/icon_SimplifiedChinese.dat
cp tmp_dir/control/icon_AmericanEnglish.dat tmp_dir/control/icon_TraditionalChinese.dat
cp tmp_dir/control/icon_AmericanEnglish.dat tmp_dir/control/icon_BrazilianPortuguese.dat

read -r -d$'\n' APP_NAME < <(dd if=tmp_dir/control/control.nacp skip=0 bs=1 count=400 status=none | tr -s '\000' '\n')
read -r -d$'\n' APP_AUTH < <(dd if=tmp_dir/control/control.nacp skip=512 bs=1 count=400 status=none | tr -s '\000' '\n')
read -r -d$'\n' APP_VERS < <(dd if=tmp_dir/control/control.nacp skip=12384 bs=1 count=400 status=none | tr -s '\000' '\n')

echo "name: '""$APP_NAME""'"
echo "auth: '""$APP_AUTH""'"
echo "vers: '""$APP_VERS""'"


cp template.trampoline.s tmp_dir/source/trampoline.s
cp template.NintendoLogo.png tmp_dir/logo/
cp template.StartupMovie.gif tmp_dir/logo/

cp template.app.json tmp_dir/app.json

rpl "Title_ID" "$TITLE_ID" tmp_dir/app.json > /dev/null 2>&1
rpl "App_Name" "$APP_NAME" tmp_dir/app.json > /dev/null 2>&1
rpl "Created_By" "$APP_AUTH" tmp_dir/app.json > /dev/null 2>&1
rpl "Version_Number" "$APP_VERS" tmp_dir/app.json > /dev/null 2>&1

cp template.Makefile tmp_dir/Makefile
rpl "Title_ID" "$TITLE_ID" tmp_dir/Makefile > /dev/null 2>&1
rpl "App_Name" "$APP_NAME" tmp_dir/Makefile > /dev/null 2>&1
rpl "Created_By" "$APP_AUTH" tmp_dir/Makefile > /dev/null 2>&1
rpl "Version_Number" "$APP_VERS" tmp_dir/Makefile > /dev/null 2>&1

cp template.main.c tmp_dir/source/main.c
rpl "placeholder_to_be_replaced.nro" "$TARGET_NRO_PATH" tmp_dir/source/main.c > /dev/null 2>&1

make -C tmp_dir

../bin/hacbrewpack \
--tempdir tmp_dir/raw \
--ncadir tmp_dir/nca \
--nspdir tmp_dir \
--exefsdir tmp_dir/build/exefs \
--romfsdir tmp_dir/romfs \
--logodir tmp_dir/logo \
--controldir tmp_dir/control \
--keepncadir

rm -fr ./hacbrewpack_backup/

TITLE_ID=`echo "$TITLE_ID" | tr '[:upper:]' '[:lower:]'`

mv tmp_dir/$TITLE_ID.nsp "./$NRO_NAME""_[$TITLE_ID].nsp"

--------------------- MERGED ---------------------------

only change to hbl's main.c is nbmenu.nro -> placeholder_to_be_replaced.nro
Can you give more details on the toolchain and folderstructure?
 
D

Deleted User

Guest
Since forwarders are broken in 12 I've decided to move all my Retroarch roms to PC. Will I be able to transfer my save states and saves to Retroarch PC without issue?
 
General chit-chat
Help Users
  • No one is chatting at the moment.
    Dark_Phoras @ Dark_Phoras: Oops, wrong chat