[Tutorial] Setting up Pegaswitch and Preparing for Homebrew

Discussion in 'Switch - Hacking & Homebrew' started by iAqua, Nov 14, 2017.

  1. iAqua
    OP

    iAqua

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

    Our Patreon
    2,842
    2,511
    Dec 7, 2015
    Antarctica
    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.
    • 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 Regular

    Member
    253
    152
    Mar 30, 2016
    Israel
    I can't believe it's happening so fast, appreciate the devs' hard work!! :yayswitch:
     
  4. Thirty3Three

    Thirty3Three Musician Member

    Member
    3,827
    2,199
    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?

    Newcomer
    89
    110
    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

    Newcomer
    33
    411
    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 Regular

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

    Beerus Gbatemp's God Of Destruction

    Member
    802
    438
    May 3, 2017
    Canada
    Universe 7
    thanks man very usefull
     
  9. Ronhero

    Ronhero Too Weird to Live, Too Rare to Die

    Member
    3,118
    1,105
    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

    Member
    2,063
    680
    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

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

    itsjch Advanced Member

    Newcomer
    89
    15
    Feb 22, 2016
    Australia
    Sydney
    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 Regular

    Member
    121
    92
    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 Insert Custom Title

    Member
    7,215
    4,435
    Sep 19, 2009
    Argentina
    Espresso
    Is Pokken Tournament the only game with 3.0.0 update data?
     
  15. Masterwin

    Masterwin GBAtemp Regular

    Member
    283
    187
    Jan 7, 2016
    go go go!
     
  16. tunip3

    tunip3 [debugger active]

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

    heartgold GBAtemp Psycho!

    Member
    4,358
    1,053
    Sep 11, 2009
    London
    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 Advanced Member

    Newcomer
    92
    10
    Jan 30, 2007
    Brazil
    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

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

    RedHunter Advanced Member

    Newcomer
    74
    62
    Dec 12, 2014
    Italy
    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

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