Homebrew [Tutorial] Setting up Pegaswitch and Preparing for Homebrew

iAqua

OP
Member
Joined
Dec 7, 2015
Messages
2,848
Trophies
1
Location
XP
2,476
Country
United Kingdom
Hey, what's up, hello. Today I'm going to teach you how to set up Pegaswitch and prepare your Nintendo Switch for homebrew.
This guide was last updated on: November 13th 2017​
Requirements
  • A computer that either runs a unix os or has a virtual machine with a unix os on it. (here's a guide for setting up a ubuntu virtual machine)
  • A nintendo switch.
  • A internet connection that your switch and computer can share.
  • More than three iq.
Table of Contents
Use Ctrl+F to search!​

Main Guide
  • Section 1 - Updating Your Switch to 3.0.0 (Skip if already on 3.0.0)
  • Section 2 - Preparing Your Switch
  • Section 3 - Setting Up Pegaswitch (Unix, use a virtual machine if on windows)
  • Section 4 - Running Pegaswitch On Your Switch
Optional
  • Section 5 - Building Your Own Homebrew NROS
Section 1 - Upgrading Your Switch to 3.0.0
Skip this section if your switch is already on 3.0.0, if you're above 3.0.0 you cannot do this.
  • Obtain a copy of Pokken Tournament Deluxe
  • Clear your update data by powering your switch off fully and then booting while holding + and -, then reboot back to the main menu.
  • Disable wifi and ensure it's off, otherwise you'll end up updating your switch to the latest version.
  • Insert your copy of Pokken Tournament Deluxe and attempt to run it.
  • The game will prompt your switch to update, allow the game to update your switch.
  • After rebooting you will be on 3.0.0.
  • Continue to Section 2.
Section 2 - Preparing Your Switch
  • Make a copy of your miis to a QR code if you care about them, since they'll be deleted when using pegaswitch.
  • Ensure your system is on 3.0.0 and clear update data, you can clear update data by powering your switch off and holding + and - while booting.
  • Ensure your system and your computer and switch share the same network.
Section 3 - Setting Up Pegaswitch
  • Install nodejs, git, and nano using the package manager of your choice.
  • Open a bash terminal and run these commands in order.
    cd ~/pegaswitch
    npm install
    sudo node start.js
  • If everything has gone correctly you should be in pegaswitch, but we're not done yet, we're gonna setup a alias that'll allow us to enter pegaswitch just by typing "pegaswitch" into the terminal.
  • Type .exit into the pegaswitch window and then run this command
    nano ~/.bashrc
    and then add this line into .bashrc
    alias pegaswitch='cd ~/pegaswitch; sudo node start.js'
  • Reload your bash terminal and try typing "pegaswitch" into the terminal, if done correctly you now have a pegaswitch link. So, we're done, right? Nope, we've gotta enable sdbcore to be able to load homebrew .nros.
  • Exit out of pegaswitch once again with .exit and then run this command
    nano ~/pegaswitch/config.json
    and make the file look like this
    {"sdbcore":true}
Section 4 - Running Pegaswitch On Your Switch
  • Open a bash terminal and run this command
    pegaswitch
  • Pegaswitch should start and it should show you a "Switch DNS IP", open your switches internet settings and set your DNS to that IP.
  • Attempt to connect to the wifi, it'll tell you that registration is required, accept those prompts and Pegaswitch will load on your switch.
  • Whenever you want to load pegaswitch you'll have to follow these steps (excluding step two, that should save itself automatically)
  • Congratulations, you now have pegaswitch set up and ready to run homebrew nros, no real homebrew nros have been released yet, but they will be soon and i'll make sure to update this guide once they are! :)
Section 5 - Building Your Own Homebrew NROS
  • To build your own homebrew nros you'll have to have libtransistor set up. Continue following this to do thatthat.
  • Open a terminal and run these commands
    cd ~/libtransistor
  • Install these packages with the package manager of your choice
    python2, clang, lld, llvm, python2-lz4, lz4, and python2-pyelftools
  • In the test folder there are multiple c files, edit them to include your own code.
  • After you've edited the c files with your own code open a terminal in the libtransistor folder and run "make".
  • Your code will be packed into a nro file with the same name as the .c file you edited, you can run the nro files on your switch with loadNro.js through pegaswitch.
Congratulations, you now have pegaswitch and (maybe) libtransistor setup, and you're now ready for when switch homebrew comes out!
 
Last edited by iAqua,

sirocyl

Are we Geniuses or what?
Newcomer
Joined
Apr 30, 2012
Messages
92
Trophies
1
Age
31
XP
324
Country
United States
Section 1 - Upgrading Your Switch to 3.0.0
Skip this section if your switch is already on 3.0.0, if you're above 3.0.0 you cannot do this.
  • Obtain a copy of Pokken Tournament Deluxe
  • Clear your update data by powering your switch off fully and then booting while holding + and -, then reboot back to the main menu.
  • Insert your copy of Pokken Tournament Deluxe and attempt to run it.
  • The game will prompt your switch to update, allow the game to update your switch.
  • After rebooting you will be on 3.0.0.
  • Continue to Section 2.

You forgot to add a critical point - you must disconnect from the internet, or add the update block DNS, before performing the update from the cartridge. People will update beyond homebrew to the latest system version, otherwise.
I see it's been edited in, thanks! :D
 
Last edited by sirocyl,

weatMod

Well-Known Member
Member
Joined
Aug 24, 2013
Messages
3,305
Trophies
2
Age
47
XP
3,336
Country
United States
  • Ensure your system and your computer and switch share the same network.
probably should add to disconnect your router from the internet 1st?
 

itsjch

Well-Known Member
Member
Joined
Feb 22, 2016
Messages
176
Trophies
0
Age
31
Location
Sydney
XP
995
Country
Australia
if you are going to do this on same network and not get update prompt for switch make sure to use its mac address and block it from connecting to the internet entirely that way it only uses the WAN part of your router and stays local.
 

heartgold

Well-Known Member
Member
Joined
Sep 11, 2009
Messages
4,378
Trophies
0
Location
London
Website
Visit site
XP
2,085
Country
Does it require me to connect my desktop and Switch once, thereafter I can keep the homebrew running even in sleep mode, or everytime to access homebrew we have to setup Pegaswitch each time?
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    K3Nv2 @ K3Nv2: Those IHOP chips are actually pretty damn good