Homebrew [Release] GodMode9 Scripts Megathread

8BitWonder

Small Homebrew Dev
OP
Member
Joined
Jan 23, 2016
Messages
2,420
Trophies
1
Location
47 4F 54 20 45 45 4D
XP
4,286
Country
United States
GodMode9 Scripts Megathread

Since I didn't see any GM9 script collection threads yet, I figured I would start one off with some of my own scripts.
And if anyone would like their script(s) added to this thread, just post your script(s) (with source link if available) and a description of what it does and I'll work on adding it to the original post!

Also, if you have any simple script requests, feel free to post them here!

Also x2, there's a pretty handy All-In-One script being worked on in this other thread if anyone's interested. Pretty much every standalone script here is included in it!
https://gbatemp.net/threads/gm9-script-all-in-one-megascript.496619/

Now on to the good stuff:

Scripts
WHAT THIS DOES

b9s_version.gm9 prints the version of your B9S installation.
Code:
# GodMode9 "b9s_version"
# Verify the version of boot9strap
# author: yonaikerlol

if chk $[HAX] "sighax"
   imgmount S:/firm0.bin

   shaget G:/header.bin VERSION
   if chk $[VERSION] "7C2E1DC860858BF9C7285915957FE64AF3B1B812C57FCB2C417881D31EE4246C"
       echo "SigHax/Boot9Strap v1.3"
   elif chk $[VERSION] "9DDE2F7258FD1EE88EDE335ED781053F8925269D8720FE87BE4E2BD35B5990D3"
       echo "SigHax/Boot9Strap v1.2"
   elif chk $[VERSION] "893A8A5B9B87FD1869AAA0BAE9BCAA3C9102DFEC1FFACB2561321F53B6091884"
       echo "SigHax/Boot9Strap v1.1"
   elif chk $[VERSION] "5C3B0CD4FE0C4987AF764B9FEFAD8B8ED39929E6EA9A8F6D782C2409BB16930A"
       echo "SigHax/Boot9Strap v1.0"
   end

   imgumount
else
   echo "Failed, You do not have boot9strap"
end

DOWNLOADS
Release: https://gbatemp.net/attachments/b9s_version-zip.141115/
WHAT THIS DOES

Backup EmuNAND.gm9 backs up your system's emuNAND.
Code:
# EmuNAND backup GM9 script
# This will create a backup named [SERIAL]_nandmin_???.bin
# author: d0k3

set ERRORMSG      "EmuNAND backup failed"
set SUCCESSMSGMSG "EmuNAND backup success"

ask "Create a EmuNAND backup in $[GM9OUT]?"
findnot $[GM9OUT]/$[DATESTAMP]_$[SERIAL]_emunand_???.bin OUTPATH
cp -h E:/nand_minsize.bin $[OUTPATH]
echo "Backup created succesfully:\n$[OUTPATH]"

DOWNLOADS
Release: https://github.com/d0k3/GodMode9/releases (Included with GodMode9)
Source: https://github.com/d0k3/GodMode9/tree/master/resources/gm9/scripts
WHAT THIS DOES

Backup SysNAND.gm9 backs up your system's sysNAND.
Code:
# SysNAND backup GM9 script
# This will create a backup named [SERIAL]_nandmin_???.bin
# author: d0k3

set ERRORMSG      "SysNAND backup failed"
set SUCCESSMSGMSG "SysNAND backup success"

ask "Create a SysNAND backup in $[GM9OUT]?"
findnot $[GM9OUT]/$[DATESTAMP]_$[SERIAL]_sysnand_???.bin OUTPATH
cp -h S:/nand_minsize.bin $[OUTPATH]
echo "Backup created succesfully:\n$[OUTPATH]"

DOWNLOADS
Release: https://github.com/d0k3/GodMode9/releases (Included with GodMode9)
Source: https://github.com/d0k3/GodMode9/tree/master/resources/gm9/scripts
WHAT THESE DO

Dump CTR Cartridge Priv. Header.gm9 dumps the private header from your currently inserted CTR cartridge to 0:/gm9/out/Private-Header_???.bin.
Code:
# Cartridge Dump Private Header GM9 script
# This will dump your CTR cartridge's private header in 0:/gm9/out
# author: 8BitWonder
# credits: d0k3 (For the scripts I referenced when making this, and GM9)

set ERRORMSG      "Private header dump failed"

ask "Dump private header in $[GM9OUT]?"
find C:/*priv.bin CARTPATH
findnot $[GM9OUT]/Private-Header_???.bin OUTPATH
cp $[CARTPATH] $[OUTPATH]
echo "Private header dumped succesfully:\n$[OUTPATH]"

Dump CTR Cartridge to .3DS (Dec).gm9 dumps your currently inserted CTR cartridge as a decrypted .3DS (helpful for Citra) to 0:/gm9/out/DATESTAMP_CTR_CARTDUMP_???.3ds.
Code:
# Cartridge Dump .3ds (dec) GM9 script
# This will dump your CTR cartridge as a decrypted .3ds in 0:/gm9/out
# author: 8BitWonder
# credits: d0k3 (For the scripts I referenced when making this, and GM9)

set ERRORMSG      "CTR cartridge dump failed"

ask "Dump CTR cartridge as a decrypted .3ds in $[GM9OUT]?"
find C:/*.3ds CARTPATH
findnot $[GM9OUT]/$[DATESTAMP]_CTR_CARTDUMP_???.3ds OUTPATH
cp $[CARTPATH] $[OUTPATH]
decrypt $[OUTPATH]
echo "CTR cartridge dumped succesfully:\n$[OUTPATH]"

Dump CTR Cartridge to .CIA.gm9 dumps your currently inserted CTR cartridge as a .CIA to 0:/gm9/out.
Code:
# Cartridge Dump .cia GM9 script
# This will dump your CTR cartridge as a .cia in 0:/gm9/out
# author: 8BitWonder
# credits: d0k3 (For the scripts I referenced when making this, and GM9)

set ERRORMSG      "CTR cartridge dump failed"

ask "Dump CTR cartridge as a .cia in $[GM9OUT]?"
find C:/*.3ds CARTPATH
buildcia $[CARTPATH]
echo "CTR cartridge dumped succesfully:\n$[GM9OUT]"

Dump NTR Cartridge to .NDS.gm9 dumps your currently inserted NTR cartridge as a .NDS to 0:/gm9/out/DATESTAMP_NTR_CARTDUMP_???.nds.
Code:
# Cartridge Dump .nds GM9 script
# This will dump your NTR cartridge as a .nds in 0:/gm9/out
# author: 8BitWonder
# credits: d0k3 (For the scripts I referenced when making this, and GM9)

set ERRORMSG      "NTR cartridge dump failed"

ask "Dump NTR cartridge as a .nds in $[GM9OUT]?"
find C:/*.nds CARTPATH
findnot $[GM9OUT]/$[DATESTAMP]_NTR_CARTDUMP_???.nds OUTPATH
cp $[CARTPATH] $[OUTPATH]
echo "NTR cartridge dumped succesfully:\n$[OUTPATH]"

DOWNLOADS
Release: https://github.com/16BitWonder/GodMode9-Scripts/releases
Source: https://github.com/16BitWonder/GodMode9-Scripts
WHAT THIS DOES

Convert .3DS to .CIA.gm9 converts any .3ds you select from gm9/out into a .cia within the gm9/out directory.
(You MUST append "_###" to the end of your .3ds in order for selection to work! Ex: _000, _001)
(Your whole file name should be something like: ThisIsMyGame_002.3ds)
Code:
# Convert .3ds to .cia GM9 script
# This will convert the user selected .3ds in gm9/out to a .cia in gm9/out
# author: 8BitWonder
# credits: d0k3 (For the scripts I referenced when making this, and GM9)

set ERRORMSG      "Conversion failed"

ask "Convert .3ds to .cia in $[GM9OUT]?\n(You must have appeneded _### to your .3ds!)"
set NUM "000"
input "Convert which .3ds?\n(Enter the triple-digit number!)\n(Ex: 000, 001, 002, etc.)" NUM
find $[GM9OUT]/*_$[NUM].3ds 3DSPATH
buildcia $[3DSPATH]
find $[GM9OUT]/*_$[NUM].cia CIAPATH
echo ".3ds converted succesfully:\n$[CIAPATH]"

DOWNLOADS
Release: https://github.com/16BitWonder/GodMode9-Scripts/releases
Source: https://github.com/16BitWonder/GodMode9-Scripts
WHAT THIS DOES

Dump boot9.bin & boot11.bin.gm9 dumps boot9.bin and boot11.bin from M:/boot9.bin and M:/boot11.bin to 0:/gm9/out/boot9.bin and 0:/gm9/out/boot11.bin.
(This WILL overwrite any existing boot9.bin/boot11.bin in the output directory!)
Code:
# Boot9 & Boot11 dump GM9 script
# This will create a dump of your boot9.bin and boot11.bin
# author: 8BitWonder
# credits: d0k3 (For the scripts I referenced when making this, and GM9)

set ERRORMSG      "Bootrom dumps failed"

ask "Create boot9 & boot11 dumps in $[GM9OUT]? \n(This will overwrite any existing boot9 & boot11!)"
set OUTPATH9 $[GM9OUT]/boot9.bin
set OUTPATH11 $[GM9OUT]/boot11.bin
cp -w M:/boot9.bin $[OUTPATH9]
cp -w M:/boot11.bin $[OUTPATH11]
echo "Dumps created succesfully:\n$[OUTPATH9]\n$[OUTPATH11]"

DOWNLOADS
Release: https://github.com/16BitWonder/GodMode9-Scripts/releases
Source: https://github.com/16BitWonder/GodMode9-Scripts
WHAT THIS DOES

Dump Citra Files.gm9 creates Citra ready dumps of your 3DS's config, System Archives, and Shared Fonts in 0:/gm9/out/Citra.
(This WILL overwrite any existing Citra files you may have made in a previous dump!)
(This WILL fail if your 3DS has a custom font cia installed!)
Code:
# Citra files dump GM9 script
# This will create a dump of files and folders citra uses (config, system archives, shared fonts)
# author: 8BitWonder
# credits: d0k3 (For the scripts I referenced when making this, and GM9)

set ERRORMSG      "Citra files dump failed"

ask "Create dump of Citra files in $[GM9OUT]/Citra? \n(This will overwrite any existing Citra files!)\n(May fail if you use a custom font!)\n(This will dump System Archives)\n(This will dump Shared Fonts)\n(This will dump config)"

# Begin Create Citra File Structure
mkdir 0:/gm9/out/Citra/user/nand/data/00000000000000000000000000000000/sysdata/00010017/00000000
set CITRA 0:/gm9/out/Citra/user/nand
mkdir $[CITRA]/00000000000000000000000000000000/title/000400db/00010302/content
mkdir $[CITRA]/00000000000000000000000000000000/title/0004009b/00010202/content
mkdir $[CITRA]/00000000000000000000000000000000/title/0004009b/00010402/content
mkdir $[CITRA]/00000000000000000000000000000000/title/0004009b/00014002/content
mkdir $[CITRA]/00000000000000000000000000000000/title/0004009b/00014102/content
mkdir $[CITRA]/00000000000000000000000000000000/title/0004009b/00014202/content
mkdir $[CITRA]/00000000000000000000000000000000/title/0004009b/00014302/content
# End Create Citra File Structure

# Begin Citra Config Dump
set OUTCONFIG 0:/gm9/out/Citra/user/nand/data/00000000000000000000000000000000/sysdata/00010017/00000000/config
inject 1:/data/$[SYSID0]/sysdata/00010017/[email protected]:8000 $[OUTCONFIG]@0
# End Citra Config Dump

# Begin Citra System Archives and Shared Fonts Dump
set OUT1 0:/gm9/out/Citra/user/nand/00000000000000000000000000000000/title/0004009b/00010202/content/00000000.app.romfs
set OUT2 0:/gm9/out/Citra/user/nand/00000000000000000000000000000000/title/0004009b/00010402/content/00000000.app.romfs
set OUT3 0:/gm9/out/Citra/user/nand/00000000000000000000000000000000/title/0004009b/00014002/content/00000000.app.romfs
set OUT4 0:/gm9/out/Citra/user/nand/00000000000000000000000000000000/title/000400db/00010302/content/00000000.app.romfs
set OUT5 0:/gm9/out/Citra/user/nand/00000000000000000000000000000000/title/0004009b/00014102/content/00000000.app.romfs
set OUT6 0:/gm9/out/Citra/user/nand/00000000000000000000000000000000/title/0004009b/00014202/content/00000000.app.romfs
set OUT7 0:/gm9/out/Citra/user/nand/00000000000000000000000000000000/title/0004009b/00014302/content/00000000.app.romfs
imgmount 1:/title/0004009b/00010202/content/00000000.app
inject G:/[email protected]:108898 $[OUT1]@0
imgumount
imgmount 1:/title/0004009b/00010402/content/00000009.app
inject G:/[email protected]:357A0 $[OUT2]@0
imgumount
imgmount 1:/title/0004009b/00014002/content/00000000.app
inject G:/[email protected]:160FDB $[OUT3]@0
imgumount
imgmount 1:/title/000400db/00010302/content/0000000c.app
inject G:/[email protected]:1D0E4 $[OUT4]@0
imgumount
imgmount 1:/title/0004009b/00014102/content/00000001.app
inject G:/[email protected]:17205A $[OUT5]@0
imgumount
imgmount 1:/title/0004009b/00014202/content/00000001.app
inject G:/[email protected]:80E48 $[OUT6]@0
imgumount
imgmount 1:/title/0004009b/00014302/content/00000001.app
inject G:/[email protected]:1BEAE2 $[OUT7]@0
imgumount
# End Citra System Archives and Shared Fonts Dump

echo "Dump created succesfully:\n$[GM9OUT]/Citra"

DOWNLOADS
Release: https://github.com/16BitWonder/GodMode9-Scripts/releases
Source: https://github.com/16BitWonder/GodMode9-Scripts
WHAT THIS DOES

Dump CTRNAND Title to .CIA.gm9 dumps a user specified system title (CTRNAND) to gm9/out.
Code:
# Dump ctrnand title to .cia GM9 script
# This will dump the user selected ctrnand title to a .cia
# author: 8BitWonder
# credits: d0k3 (For the scripts I referenced when making this, and GM9)

set ERRORMSG      "Title dump failed"

ask "Dump CTRNAND title to .cia in $[GM9OUT]?"
set NUM1 "00040000"
set NUM2 "00000000"
input "Enter first 8 digits of the title you are dumping.\n(This is NOT case sensitive)\nYour options are:\n(00040000   0004009B)\n(00040010   000400DB)\n(0004001B   00040130)\n(00040030   00040138)" NUM1
input "Enter last 8 digits of the title you are dumping.\n(This is NOT case sensitive)" NUM2
find 1:/title/$[NUM1]/$[NUM2]/content/*.tmd TITLEPATH
buildcia $[TITLEPATH]
find $[GM9OUT]/$[NUM1]$[NUM2]* CIAPATH
echo "Title dumped succesfully:\n$[CIAPATH]"

DOWNLOADS
Release: https://github.com/16BitWonder/GodMode9-Scripts/releases
Source: https://github.com/16BitWonder/GodMode9-Scripts
WHAT THIS DOES

Dump_HomeMenu_ALL.gm9 dumps the HomeMenu cia from 1:/title/00040030/0000XXXX/content/*.tmd to 0:/gm9/out/homemenu.cia, and decrypts it.
(This is for ALL system regions)
Code:
# homemenu cia dump GM9 script
# This will create a homemenu's cia file in /gm9/out
# This is useful for making customized homemenu's cia.
# Guide's Link is below.
# https://gbatemp.net/threads/complete-3ds-2ds-customization-guide.468268/
# author : windows_server_2003/8BitWonder/TurdPooCharger
# Required write permission : none
# Region : Region-Free

set ERRORMSG "Cancelled by user"
ask "This script dumps the homemenu.cia.\ncontinue?"
set CIA2 "0:/gm9/out/homemenu.cia"
set ERRORMSG "Error:\#1 Not a 3DS or SysNAND is broken"

if chk $[REGION] "JPN"
find 1:/title/00040030/00008202/content/*.tmd TMD
end
if chk $[REGION] "USA"
find 1:/title/00040030/00008F02/content/*.tmd TMD
end
if chk $[REGION] "EUR"
find 1:/title/00040030/00009802/content/*.tmd TMD
end
if chk $[REGION] "CHN"
find 1:/title/00040030/0000A102/content/*.tmd TMD
end
if chk $[REGION] "KOR"
find 1:/title/00040030/0000A902/content/*.tmd TMD
end
if chk $[REGION] "TWN"
find 1:/title/00040030/0000B102/content/*.tmd TMD
end
if chk $[REGION] "UNK"
chk "Aa" "Bb"
end

set ERRORMSG "Error:\#2 SD card error or the tmd file is invalid"
buildcia $[TMD]
set ERRORMSG "Error:\#3 SD card error"

if chk $[REGION] "JPN"
find 0:/gm9/out/0004003000008202* CIA1
end
if chk $[REGION] "USA"
find 0:/gm9/out/0004003000008F02* CIA1
end
if chk $[REGION] "EUR"
find 0:/gm9/out/0004003000009802* CIA1
end
if chk $[REGION] "CHN"
find 0:/gm9/out/000400300000A102* CIA1
end
if chk $[REGION] "KOR"
find 0:/gm9/out/000400300000A902* CIA1
end
if chk $[REGION] "TWN"
find 0:/gm9/out/000400300000B102* CIA1
end

mv -w -n $[CIA1] $[CIA2]
set ERRORMSG "Error:\#4 SD card error"
decrypt $[CIA2]
echo "homemenu.cia dumped succesfully:\n$[CIA2]"

DOWNLOADS
Release: https://github.com/16BitWonder/GodMode9-Scripts/releases
Source: https://github.com/16BitWonder/GodMode9-Scripts
WHAT THIS DOES

Dump_HomeMenu_JPN.gm9 dumps the HomeMenu cia from 1:/title/00040030/00008202/content/*.tmd to 0:/gm9/out/homemenu.cia, and decrypts it.
(This is for JAPAN systems only!)
Code:
# homemenu cia dump GM9 script for
# This is for JPN 3DS.If you have not a JPN 3DS, use 3DNUS.
# This will create a homemenu's cia file in /gm9/out
# This is useful for making customized homemenu's cia.
# Guide's Link is below.
# https://gbatemp.net/threads/complete-3ds-2ds-customization-guide.468268/
# author : windows_server_2003
# Required write permission : none
# Region : JPN only!!

set CIA1 "0:/gm9/out/0004003000008202 (CTR-N-HMMJ).cia"
set CIA2 "0:/gm9/out/homemenu.cia"
set ERRORMSG "Cancelled by user"
ask "This script dumps the homemenu.cia.\ncontinue?"
set ERRORMSG "Error:\#1 Not a JPN 3DS or SysNAND is broken"
find  1:/title/00040030/00008202/content/*.tmd TMD
set ERRORMSG "Error:\#2 SD card error or the tmd file is invalid"
buildcia $[TMD]
set ERRORMSG "Error:\#3 SD card error"
mv -w -n $[CIA1] $[CIA2]
set ERRORMSG "Error:\#4 SD card error"
decrypt $[CIA2]

DOWNLOADS
Release: https://gbatemp.net/attachments/dump_homemenu_jpn-zip.96967/
WHAT THESE DO

Dump_HomeMenu_USA.gm9 dumps a USA system's HomeMenu.cia into gm9/out and decrypts it.
(Will only work on a USA system!)
Code:
# homemenu cia dump GM9 script
# This is for USA 3DS.
# This will create a homemenu's cia file in /gm9/out
# This is useful for making customized homemenu's cia.
# Guide's Link is below.
# https://gbatemp.net/threads/complete-3ds-2ds-customization-guide.468268/
# author : windows_server_2003/8BitWonder
# Required write permission : none
# Region : USA only!!

set CIA2 "0:/gm9/out/homemenu.cia"
set ERRORMSG "Cancelled by user"
ask "This script dumps the homemenu.cia.\ncontinue?"
set ERRORMSG "Error:\#1 Not a USA 3DS or SysNAND is broken"
find  1:/title/00040030/00008F02/content/*.tmd TMD
set ERRORMSG "Error:\#2 SD card error or the tmd file is invalid"
buildcia $[TMD]
set ERRORMSG "Error:\#3 SD card error"
find 0:/gm9/out/0004003000008F02* CIA1
mv -w -n $[CIA1] $[CIA2]
set ERRORMSG "Error:\#4 SD card error"
decrypt $[CIA2]
echo "homemenu.cia dumped succesfully:\n$[CIA2]"

Dump_HomeMenu_EUR.gm9 dumps a EUR system's HomeMenu.cia into gm9/out and decrypts it.
(Will only work on a EUR system!)
Code:
# homemenu cia dump GM9 script
# This is for EUR 3DS.
# This will create a homemenu's cia file in /gm9/out
# This is useful for making customized homemenu's cia.
# Guide's Link is below.
# https://gbatemp.net/threads/complete-3ds-2ds-customization-guide.468268/
# author : windows_server_2003/8BitWonder
# Required write permission : none
# Region : EUR only!!

set CIA2 "0:/gm9/out/homemenu.cia"
set ERRORMSG "Cancelled by user"
ask "This script dumps the homemenu.cia.\ncontinue?"
set ERRORMSG "Error:\#1 Not a EUR 3DS or SysNAND is broken"
find  1:/title/00040030/00009802/content/*.tmd TMD
set ERRORMSG "Error:\#2 SD card error or the tmd file is invalid"
buildcia $[TMD]
set ERRORMSG "Error:\#3 SD card error"
find 0:/gm9/out/0004003000009802* CIA1
mv -w -n $[CIA1] $[CIA2]
set ERRORMSG "Error:\#4 SD card error"
decrypt $[CIA2]
echo "homemenu.cia dumped succesfully:\n$[CIA2]"

Dump_HomeMenu_CHN.gm9 dumps a CHN system's HomeMenu.cia into gm9/out and decrypts it.
(Will only work on a CHN system!)
Code:
# homemenu cia dump GM9 script
# This is for CHN 3DS.
# This will create a homemenu's cia file in /gm9/out
# This is useful for making customized homemenu's cia.
# Guide's Link is below.
# https://gbatemp.net/threads/complete-3ds-2ds-customization-guide.468268/
# author : windows_server_2003/8BitWonder
# Required write permission : none
# Region : CHN only!!

set CIA2 "0:/gm9/out/homemenu.cia"
set ERRORMSG "Cancelled by user"
ask "This script dumps the homemenu.cia.\ncontinue?"
set ERRORMSG "Error:\#1 Not a CHN 3DS or SysNAND is broken"
find  1:/title/00040030/0000A102/content/*.tmd TMD
set ERRORMSG "Error:\#2 SD card error or the tmd file is invalid"
buildcia $[TMD]
set ERRORMSG "Error:\#3 SD card error"
find 0:/gm9/out/000400300000A102* CIA1
mv -w -n $[CIA1] $[CIA2]
set ERRORMSG "Error:\#4 SD card error"
decrypt $[CIA2]
echo "homemenu.cia dumped succesfully:\n$[CIA2]"

Dump_HomeMenu_KOR.gm9 dumps a KOR system's HomeMenu.cia into gm9/out and decrypts it.
(Will only work on a KOR system!)
Code:
# homemenu cia dump GM9 script
# This is for KOR 3DS.
# This will create a homemenu's cia file in /gm9/out
# This is useful for making customized homemenu's cia.
# Guide's Link is below.
# https://gbatemp.net/threads/complete-3ds-2ds-customization-guide.468268/
# author : windows_server_2003/8BitWonder
# Required write permission : none
# Region : KOR only!!

set CIA2 "0:/gm9/out/homemenu.cia"
set ERRORMSG "Cancelled by user"
ask "This script dumps the homemenu.cia.\ncontinue?"
set ERRORMSG "Error:\#1 Not a KOR 3DS or SysNAND is broken"
find  1:/title/00040030/0000A902/content/*.tmd TMD
set ERRORMSG "Error:\#2 SD card error or the tmd file is invalid"
buildcia $[TMD]
set ERRORMSG "Error:\#3 SD card error"
find 0:/gm9/out/000400300000A902* CIA1
mv -w -n $[CIA1] $[CIA2]
set ERRORMSG "Error:\#4 SD card error"
decrypt $[CIA2]
echo "homemenu.cia dumped succesfully:\n$[CIA2]"

Dump_HomeMenu_TWN.gm9 dumps a TWN system's HomeMenu.cia into gm9/out and decrypts it.
(Will only work on a TWN system!)
Code:
# homemenu cia dump GM9 script
# This is for TWN 3DS.
# This will create a homemenu's cia file in /gm9/out
# This is useful for making customized homemenu's cia.
# Guide's Link is below.
# https://gbatemp.net/threads/complete-3ds-2ds-customization-guide.468268/
# author : windows_server_2003/8BitWonder
# Required write permission : none
# Region : TWN only!!

set CIA2 "0:/gm9/out/homemenu.cia"
set ERRORMSG "Cancelled by user"
ask "This script dumps the homemenu.cia.\ncontinue?"
set ERRORMSG "Error:\#1 Not a USA 3DS or SysNAND is broken"
find  1:/title/00040030/0000B102/content/*.tmd TMD
set ERRORMSG "Error:\#2 SD card error or the tmd file is invalid"
buildcia $[TMD]
set ERRORMSG "Error:\#3 SD card error"
find 0:/gm9/out/000400300000B102* CIA1
mv -w -n $[CIA1] $[CIA2]
set ERRORMSG "Error:\#4 SD card error"
decrypt $[CIA2]
echo "homemenu.cia dumped succesfully:\n$[CIA2]"

DOWNLOADS
Release: https://github.com/16BitWonder/GodMode9-Scripts/releases
Source: https://github.com/16BitWonder/GodMode9-Scripts
WHAT THIS DOES

Dump Installed Title to .CIA.gm9 dumps a user specified SD title (Game/Update/DLC) to gm9/out.
Code:
# Dump installed title to .cia GM9 script
# This will dump the user selected title to a .cia (Can be game, update or dlc)
# author: 8BitWonder
# credits: d0k3 (For the scripts I referenced when making this, and GM9)

set ERRORMSG      "Title dump failed"

ask "Dump installed title to .cia in $[GM9OUT]?"
set NUM1 "00040000"
set NUM2 "00000000"
input "What type of title are you dumping?\n(This is NOT case sensitive)\n(00040000 = Game)\n(0004000E = Update)\n(0004008C = DLC)" NUM1
input "Enter 8 digits of the title you are dumping.\n(This is NOT case sensitive)\n(This identifies the Game/Update/DLC)" NUM2
find A:/title/$[NUM1]/$[NUM2]/content/*.tmd TITLEPATH
buildcia $[TITLEPATH]
find $[GM9OUT]/$[NUM1]$[NUM2]* CIAPATH
echo "Title dumped succesfully:\n$[CIAPATH]"

DOWNLOADS
Release: https://github.com/16BitWonder/GodMode9-Scripts/releases
Source: https://github.com/16BitWonder/GodMode9-Scripts
WHAT THIS DOES

Dump otp.bin.gm9 dumps your 3DS's otp.bin from M:/otp.mem to 0:/gm9/out/SERIAL_otp.bin.
(This WILL overwrite any current otp.bin you have in the output directory!)
Code:
# Otp.bin dump GM9 script
# This will create a dump of your system's otp.bin
# author: 8BitWonder
# credits: d0k3 (For the scripts I referenced when making this, and GM9)

set ERRORMSG      "otp.bin dump failed"

ask "Dump otp.bin in $[GM9OUT]? \n(This will overwrite any existing otp.bin!)"
set OUTPATH $[GM9OUT]/$[SERIAL]_otp.bin
cp -w M:/otp.mem $[OUTPATH]
echo "Dump created succesfully:\n$[OUTPATH]"

DOWNLOADS
Release: https://github.com/16BitWonder/GodMode9-Scripts/releases
Source: https://github.com/16BitWonder/GodMode9-Scripts
WHAT THIS DOES

Dump TWLNAND Title to .CIA.gm9 dumps a user specified system title (TWLNAND) to gm9/out.
Code:
# Dump twlnand title to .cia GM9 script
# This will dump the user selected twlnand title to a .cia
# author: 8BitWonder
# credits: d0k3 (For the scripts I referenced when making this, and GM9)

set ERRORMSG      "Title dump failed"

ask "Dump TWLNAND title to .cia in $[GM9OUT]?"
set NUM1 "00030000"
set NUM2 "00000000"
input "Enter first 8 digits of the title you are dumping.\n(This is NOT case sensitive)\nYour options are:\n(00030004)\n(00030005)\n(0003000F)" NUM1
input "Enter last 8 digits of the title you are dumping.\n(This is NOT case sensitive)" NUM2
find 2:/title/$[NUM1]/$[NUM2]/content/*.tmd TITLEPATH
buildcia $[TITLEPATH]
echo "Title dumped succesfully:\n$[GM9OUT]"

DOWNLOADS
Release: https://github.com/16BitWonder/GodMode9-Scripts/releases
Source: https://github.com/16BitWonder/GodMode9-Scripts
WHAT THESE DO

friendsave_backup.gm9 backs up your current Friends module save to 0:/gm9/out/friendsave_???.
(Contains your friend code and current registered friends.)
Code:
# Friends module savegame backup GM9 script
# This will create a backup of your current Friends module save
# author: SvenDaHacker64

set ERRORMSG      "Friends module save backup failed"

ask "Create friendsave in $[GM9OUT]?"
findnot $[GM9OUT]/friendsave_??? OUTPATH
cp 1:/data/$[SYSID0]/sysdata/00010032/00000000 $[OUTPATH]
echo "Backup created succesfully:\n$[OUTPATH]"

friendsave_restore.gm9 restores a user specified friendsave_??? from 0:/gm9/out/friendsave_???.
(This WILL overwrite your system's current Friends module save!)
Code:
# Friends module savegame restore GM9 script
# This will restore your current Friends module save from GM9OUT
# author: SvenDaHacker64

set ERRORMSG      "Friends module save restore failed"

ask "Restore friendsave from $[GM9OUT]?"
set OUTPATH 1:/data/$[SYSID0]/sysdata/00010032/00000000
set NUM "000"
input "Restore which backup?" NUM
find $[GM9OUT]/friendsave_$[NUM] COPYPATH
cp -w $[COPYPATH] $[OUTPATH]
echo "Friend-save restored succesfully:\n1:/data/<ID0>/sysdata/00010032/00000000"

DOWNLOADS
Release: https://gbatemp.net/attachments/friend-save-backup-restore-gm9-zip.97157/
THESE SCRIPTS WILL NOT WORK PROPERLY ON GM9 +1.4.1
Follow this guide if you are using GM9 +1.4.1
https://3ds.guide/godmode9-usage#backup_gba

WHAT THESE DO

Backup gbavc.sav.gm9 backs up your current gbavc.sav from S:/gbavc.sav to 0:/gm9/out/gbavc.sav.
(It WILL overwrite any current gbavc.sav in the output directory!)
Code:
# gbavc.sav backup GM9 script
# This will create a backup of your current gbavc.sav
# author: 8BitWonder
# credits: d0k3 (For the scripts I referenced when making this, and GM9)

set ERRORMSG      "gbavc.sav backup failed"

ask "Create a gbavc.sav backup in $[GM9OUT]? \n(This will overwrite any existing gbavc.sav!)"
set OUTPATH $[GM9OUT]/gbavc.sav
cp -w S:/gbavc.sav $[OUTPATH]
echo "Backup created succesfully:\n$[OUTPATH]"

Restore gbavc.sav.gm9 restores gbavc.sav from 0:/gm9/out/gbavc.sav to S:/gbavc.sav.
(It will fail if gbavc.sav is not in the correct directory.)
(Only restore your save if it is to the last gba vc you launched)
(Make sure that your gbavc.sav is still 64KB before restoring it.)
Code:
# gbavc.sav restore GM9 script
# This will restore your current gbavc.sav from GM9OUT
# author: 8BitWonder
# credits: d0k3 (For the scripts I referenced when making this, and GM9)

set ERRORMSG      "gbavc.sav restore failed"

ask "Restore gbavc.sav from $[GM9OUT]? \n(Your save must be for the last gba vc you launched!)\n(Your gbavc.sav must also be 64KB!)"
set OUTPATH S:/gbavc.sav
cp -w $[GM9OUT]/gbavc.sav $[OUTPATH]
echo "gbavc.sav restored succesfully:\n$[OUTPATH]"

DOWNLOADS
Release: https://github.com/16BitWonder/GodMode9-Scripts/releases
Source: https://github.com/16BitWonder/GodMode9-Scripts
THESE SCRIPTS WILL NOT WORK PROPERLY ON GM9 +1.4.1
Follow this guide if you are using GM9 +1.4.1
https://3ds.guide/godmode9-usage#backup_gba

WHAT THESE DO

BackupGBA.gm9 backs up your current gbavc.sav to 0:/gm9/out/gbavc_???.sav.
Code:
set ERRORMSG      "gbavc.sav backup failed"
set OUTPATH 0:/gm9/out/gbavc.sav
findnot $[GM9OUT]/gbavc_???.sav OUTPATH
cp -w S:/gbavc.sav $[OUTPATH]

RestoreGBA.gm9 restores the most recent gbavc.sav from 0:/gm9/out/gbavc_???.sav.
Code:
find $[GM9OUT]/gbavc_???.sav INPATH
cp -w $[INPATH] S:/gbavc.sav

DOWNLOADS
Release: https://gbatemp.net/attachments/gbavc-sav-backup-and-restore-scripts-zip.97405/
WHAT THESE DO

Backup LocalFriendCodeSeed_B.gm9 backs up your current LocalFriendCodeSeed_B from 1:/rw/sys/LocalFriendCodeSeed_B to 0:/gm9/out/SERIAL_LocalFriendCodeSeed_B.
(This WILL overwrite any current LocalFriendCodeSeed_B you have in the output directory!)
Code:
# LocalFriendCodeSeed_B backup GM9 script
# This will create a backup of your current LocalFriendCodeSeed_B
# author: 8BitWonder
# credits: d0k3 (For the scripts I referenced when making this, and GM9)

set ERRORMSG      "LocalFriendCodeSeed_B backup failed"

ask "Create a LocalFriendCodeSeed_B backup in $[GM9OUT]? \n(This will overwrite any existing\nLocalFriendCodeSeed_B!)"
set OUTPATH $[GM9OUT]/$[SERIAL]_LocalFriendCodeSeed_B
cp -w 1:/rw/sys/LocalFriendCodeSeed_B $[OUTPATH]
echo "Backup created succesfully:\n$[OUTPATH]"

Restore LocalFriendCodeSeed_B.gm9 restores LocalFriendCodeSeed_B from 0:/gm9/out/LocalFriendCodeSeed_B to 1:/rw/sys/LocalFriendCodeSeed_B.
(This WILL overwrite your 3DS's current LocalFriendCodeSeed_B!)
Code:
# LocalFriendCodeSeed_B restore GM9 script
# This will restore your current LocalFriendCodeSeed_B from GM9OUT
# author: 8BitWonder
# credits: d0k3 (For the scripts I referenced when making this, and GM9)

set ERRORMSG      "LocalFriendCodeSeed_B restore failed"

ask "Restore LocalFriendCodeSeed_B from $[GM9OUT]? \n(This will overwrite your 3DS's current\nLocalFriendCodeSeed_B!)"
set OUTPATH 1:/rw/sys/LocalFriendCodeSeed_B
find $[GM9OUT]/*LocalFriendCodeSeed_B COPYPATH
cp -w $[COPYPATH] $[OUTPATH]
echo "LocalFriendCodeSeed_B restored succesfully:\n$[OUTPATH]"

DOWNLOADS
Release: https://github.com/16BitWonder/GodMode9-Scripts/releases
Source: https://github.com/16BitWonder/GodMode9-Scripts
WHAT THIS DOES

Swap Nintendo 3DS Folder.gm9 swaps your current Nintendo 3DS folder with another Nintendo 3DS folder on your SD card.
(Your other Nintendo 3DS folders must be named Nintendo3DSX, with 'X' being a letter/number or word)
(Your current folder will be renamed as the folder you swapped with)
Code:
# Swap "Nintendo 3DS" folder GM9 script
# This will swap between user numbered Nintendo 3DS folders, useful if you have 300 titles installed in one Nintendo 3DS folder and want to install more in another
# author: 8BitWonder
# credits: d0k3 (For the scripts I referenced when making this, and GM9)

set ERRORMSG      "Failed to swap folders\nFolder likely doesn't exist"

ask "Swap your current Nintendo 3DS folder with another?\nFolders must be named 'Nintendo 3DSX'\nWith 'X' being a number or letter.\nEx: Nintendo 3DS0, Nintendo 3DS1, Nintendo 3DS2."

# Designate desired and original folder
set DESIRED "0"
input "Swap with which Nintendo 3DS folder?\nYour current folder will be renamed as\nthe folder you swapped with." DESIRED
find "0:/Nintendo 3DS$[DESIRED]" DESIREDPATH
set ORIGINALPATH "0:/Nintendo 3DS"

# Swap current folder with designated folder
mv $[ORIGINALPATH] "0:/Nintendo 3DSTEMP"
mv $[DESIREDPATH] $[ORIGINALPATH]
mv "0:/Nintendo 3DSTEMP" $[DESIREDPATH]

echo "Folders swapped successfully!"

DOWNLOADS
Release: https://github.com/16BitWonder/GodMode9-Scripts/releases
Source: https://github.com/16BitWonder/GodMode9-Scripts

Standalone Autorun Scripts
To run these, load them as you would a normal .firm payload.
WHAT THIS DOES

Wipe Play-History on Boot comes named as "boot.firm", and is intended to be placed on the root of your SD card, any other boot.firm you had at the time must be renamed "boot.launch" so that it will be launched following boot.firm's (the script) execution. This standalone script will wipe your play history every time it is run (so every time you boot up).
(This script DOES NOT create a backup of your play-history, if you care about it, back it up before using this!)
Code:
allow -a 1:/
rm -o -s 1:/data/$[SYSID0]/sysdata/00010022/00000000
boot 0:/boot.launch

DOWNLOAD
Release: https://github.com/16BitWonder/GodMode9-Scripts/releases



GodMode9 Download: https://github.com/d0k3/GodMode9/releases

If there is ever something wrong with a script, please say so!

8/25/2018
  • Added Verify B9S Version Script (yonaikerlol)
3/06/2018
  • Added Wipe Play-History on Boot Standalone Script (Searinox/8BitWonder)
2/17/2018
  • Added Dump HomeMenu ALL Script (windows_server_2003/8BitWonder/TurdPooCharger)
1/28/2018
  • Added Swap Nintendo 3DS Folder Script (8BitWonder)
9/21/2017
  • Updated Dump Citra Files Script (8BitWonder)
9/07/2017
  • Added All Scripts.zip to bottom of post. (Will update as post does)
9/01/2017
  • Updated gbavc.sav Restore Script (MyLegGuy)
8/31/2017
  • Added Dump CTRNAND Title to .CIA Script (8BitWonder)
  • Added Dump Installed Title to .CIA Script (8BitWonder)
  • Added Dump TWLNAND Title to .CIA Script (8BitWonder)
  • Added Dump HomeMenu USA, EUR, CHN, KOR, TWN Scripts (windows_server_2003/8BitWonder)
  • Updated gbavc.sav Backup and Restore Scripts (8BitWonder)
  • Updated Dump Citra Files Script (8BitWonder)
  • Updated Dump boot9.bin & boot11.bin Script (8BitWonder)
8/30/2017
  • Added Convert .3DS to .CIA Script (8BitWonder)
8/29/2017
  • Added Friend-save Backup and Restore Scripts (SvenDaHacker64)
8/28/2017
  • Added gbavc.sav Backup and Restore Scripts (MyLegGuy)

8/27/2017

  • Added Dump_HomeMenu_JPN Script (windows_server_2003)
8/26/2017
  • Added Cartridge Dump Scripts (8BitWonder)
  • Updated Dump otp.bin Script (8BitWonder)
  • Updated LocalFriendCodeSeed_B Backup and Restore Scripts (8BitWonder)

8/25/2017

  • Added gbavc.sav Backup and Restore Scripts (8BitWonder)
  • Added LocaFriendCodeSeed_B Backup and Restore Scripts (8BitWonder)
  • Added Dump Citra Files Script (8BitWonder)
  • Added Dump boot9.bin & boot11.bin Script (8BitWonder)
  • Added Dump otp.bin Script (8BitWonder)
  • Added Backup SysNAND Script (d0k3)
  • Added Backup EmuNAND Script (d0k3)

USE THIS LINK FOR ALL-SCRIPTS.ZIP:
https://github.com/16BitWonder/GodMode9-Scripts/releases/download/v3.6/All-Scripts.zip
 
Last edited by 8BitWonder,

MattKimura

3DS & WiiU Enthusiast
Member
Joined
Jun 30, 2014
Messages
2,130
Trophies
1
XP
2,735
Country
United States
I've always asked myself "What other scripts are there" and this brings them all together. Thanks for the list and also thanks for your handy GBA scripts!
 
  • Like
Reactions: 8BitWonder

8BitWonder

Small Homebrew Dev
OP
Member
Joined
Jan 23, 2016
Messages
2,420
Trophies
1
Location
47 4F 54 20 45 45 4D
XP
4,286
Country
United States
UPDATE 8/26/2017
  • Added Cartridge Dump Scripts
    • Dump CTR Cartridge Priv. Header
    • Dump CTR Cartridge to .3DS (Dec)
    • Dump CTR Cartridge to .CIA
    • Dump NTR Cartridge to .NDS

  • Improved Three Current Scripts
    • Dump otp.bin
      • Now appends your console's serial to the dumped otp.bin. (SERIAL_otp.bin)
    • Backup LocalFriendCodeSeed_B
      • Now appends your console's serial to the dumped LocalFriendCodeSeed_B. (SERIAL_LocalFriendCode_B)
    • Restore LocalFriendCodeSeed_B
      • Will only look for a filename with "LocalFriendCodeSeed_B" in it, ignoring the serial.
As always, if you ever find that there is something wrong with one of these scripts, or that it can be improved in some way, please say so!

Also if you have any simple script requests, it'd be fine to make them here.
 
Last edited by 8BitWonder,

8BitWonder

Small Homebrew Dev
OP
Member
Joined
Jan 23, 2016
Messages
2,420
Trophies
1
Location
47 4F 54 20 45 45 4D
XP
4,286
Country
United States
I've looked everywhere for the 1.3.4 nightly but it always turns out to be the 1.3.0 release. Any idea where to find it?
I wasn't able to find it either, so I just compiled it.

You can compile it from this zip
g1CYGkf.png


Or I can just drop the one I use here.
(Just use it at your own risk)
 

Attachments

  • GodMode9 1.3.4 (Nightly).zip
    198.9 KB · Views: 238

Keizel

Well-Known Member
Member
Joined
Jun 28, 2015
Messages
381
Trophies
0
XP
372
Country
United States
One question: Why now we use scripts when before we could, for example, dump NAND with only select the correct option?
 

8BitWonder

Small Homebrew Dev
OP
Member
Joined
Jan 23, 2016
Messages
2,420
Trophies
1
Location
47 4F 54 20 45 45 4D
XP
4,286
Country
United States
One question: Why now we use scripts when before we could, for example, dump NAND with only select the correct option?
Scripts allow for more customizable actions by end-users.
Before we could only do a few specific things that were built-in, such as dumping sysNAND or emuNAND.
But now with scripts, end-users have the power to make their own automated and complex actions like dumping and decrypting several games at once, or dumping specific blocks of information from system files, and everything in-between (and more!).
 
  • Like
Reactions: Keizel

windows_server_2003

Well-Known Member
Newcomer
Joined
Jul 13, 2017
Messages
79
Trophies
0
Age
41
XP
259
Country
Japan
I tried to make custom homemenu along this guide(Link below).but the homemenu's cia file(JPN, downloaded with 3DNUS and encrypted with godmode9) doesn't have the japanese "menu_lsbt.LZ".so I dumped from my 2DS and made script for that.It will make "homemenu.cia" at /gm9/out/ It maybe useful if you have a JPN 3ds and have the same problem.
If you run this on not a JPN 3DS, it will show error.

https://gbatemp.net/threads/complete-3ds-2ds-customization-guide.468268/
 

Attachments

  • Dump_HomeMenu_JPN.zip
    648 bytes · Views: 293
  • Like
Reactions: 8BitWonder

8BitWonder

Small Homebrew Dev
OP
Member
Joined
Jan 23, 2016
Messages
2,420
Trophies
1
Location
47 4F 54 20 45 45 4D
XP
4,286
Country
United States
I tried to make custom homemenu along this guide(Link below).but the homemenu's cia file(JPN, downloaded with 3DNUS and encrypted with godmode9) doesn't have the japanese "menu_lsbt.LZ".so I dumped from my 2DS and made script for that.It will make "homemenu.cia" at /gm9/out/ It maybe useful if you have a JPN 3ds and have the same problem.
If you run this on not a JPN 3DS, it will show error.

https://gbatemp.net/threads/complete-3ds-2ds-customization-guide.468268/
Added! Thank you for your contribution! ^_^
 

8BitWonder

Small Homebrew Dev
OP
Member
Joined
Jan 23, 2016
Messages
2,420
Trophies
1
Location
47 4F 54 20 45 45 4D
XP
4,286
Country
United States
Is there a command that can be used to find files that got their paths from findnot?
For example, I could do this:
Code:
findnot $[GM9OUT]/aaa_???.sav OUTPATH
If my script created files with OUTPATH, and I ran my script multiple times, I would have files named aaa_000.sav, aaa_001.sav, aaa_002.sav, and so on. What I would like to do is find the latest file. In this example, aaa_002.sav. I tried the "find" command, but I got aaa_000.sav. Maybe, I could use "findnot" and then decrease the number at the end by one? Is that even possible?
I'm not sure that's possible yet, though an alternative (that would require knowing your most recent number) that you may be able to do is something like this:
Code:
input "Most recent file?" NUM  # You would enter your three digit number here and store it as NUM, Ex: 001, 002, 003, etc.
set OUTPATH $[GM9OUT]/aaa_$[NUM].sav # And then here you would set that number as the file being looked at
I don't currently have time to test this, but it seems like it should work (Though to be fair I haven't tried the input command yet, so hopefully you can input numbers like that). I'll try making some test scripts tomorrow and see what I can come up with.
 
Last edited by 8BitWonder,
  • Like
Reactions: Deleted User
General chit-chat
Help Users
  • No one is chatting at the moment.
    Psionic Roshambo @ Psionic Roshambo: Hmm didn't know they made more Dusk Till Dawn movies watched part one on Pluto TV and they have...