[Tutorial] Setting up Pegaswitch and Preparing for Homebrew

Discussion in 'Switch - Emulation, Homebrew & Software Projects' started by iAqua, Nov 14, 2017.

  1. iAqua


    GBAtemp Patron
    iAqua is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    Dec 7, 2015
    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​
    • 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
    • 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.
    • 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
      and then add this line into .bashrc
    • 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
      and make the file look like this
    Section 4 - Running Pegaswitch On Your Switch
    • Open a bash terminal and run this command
    • 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
    • Install these packages with the package manager of your choice
    • 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, Nov 15, 2017
  2. swabbo
    This message by swabbo has been removed from public view by TwinRetro, Nov 15, 2017, Reason: garbage.
    Nov 14, 2017
  3. XxShalevElimelechxX

    XxShalevElimelechxX GBAtemp Fan

    Mar 30, 2016
    I can't believe it's happening so fast, appreciate the devs' hard work!! :yayswitch:
    NoNAND likes this.
  4. Thirty3Three

    Thirty3Three Musician Member

    Mar 22, 2013
    United States
    Wherever you want me, baby.
    Uh wait.... they said this would work on 3.0 or LOWER... Uh
  5. sirocyl

    sirocyl Are we Geniuses or what?

    Apr 30, 2012
    United States
    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, Nov 14, 2017
  6. Daeken

    Daeken Member

    Aug 20, 2017
    United States
    Don't directly edit config.json. That is a terrible idea for the future. Just type 'enable sdbcore' at the Pegaswitch prompt to enable it.
  7. XxShalevElimelechxX

    XxShalevElimelechxX GBAtemp Fan

    Mar 30, 2016
    Just wanted to edit my post and say this haha
  8. Beerus

    Beerus Gbatemp's God Of Destruction

    May 3, 2017
    Universe 7
    thanks man very usefull
  9. Ronhero

    Ronhero Too Weird to Live, Too Rare to Die

    Jun 28, 2014
    United States
    Arizona Bay
    Time to setup my ras pi to run this and ps4, well hopefully both at the same time if not ill grab another
  10. weatMod

    weatMod GBAtemp Addict

    Aug 24, 2013
    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?
  11. GSFanatic

    GSFanatic Member

    Jun 29, 2016
    United States
    Runs like a charm! Thanks a lot!
  12. itsjch

    itsjch GBAtemp Regular

    Feb 22, 2016
    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.
  13. machinoman

    machinoman GBAtemp Fan

    Feb 12, 2011
    United States
    it should be noted that using virtualbox you will need to use a bridged adapter for the network
  14. WiiUBricker

    WiiUBricker News Police

    Sep 19, 2009
    Is Pokken Tournament the only game with 3.0.0 update data?
  15. Masterwin

    Masterwin GBAtemp Fan

    Jan 7, 2016
    go go go!
  16. tunip3

    tunip3 [debugger active]

    Oct 31, 2016
    United Kingdom
    No but would you rather get Poken or just dance
  17. heartgold

    heartgold GBAtemp Psycho!

    Sep 11, 2009
    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?
  18. Pacote

    Pacote GBAtemp Regular

    Jan 30, 2007
    Isnt Pokken the only game with the actual update 3.0.0 in the cartridge?
  19. SkulllKid
    This message by SkulllKid has been removed from public view by Issac, Nov 14, 2017, Reason: English please.
    Nov 14, 2017
  20. Jran Sakarra

    Jran Sakarra GBAtemp Regular

    May 24, 2008
    United States
    Somewhere in Kanto
    On the ground floor for this!
  21. RedHunter

    RedHunter GBAtemp Regular

    Dec 12, 2014
    Who said that? I know that it works only on 3.0 I wish it was true so I could save the money for Pokken.
  22. lexs2kari

    lexs2kari Member

    May 15, 2013
    Nice tutorial!
    Congratulations to all developers for making this happening. :bow: