WIP Modchip Software: Simple-UF2 with SWITCHBOOT. Save fuses without AutoRCM

Discussion in 'Switch - Backup Loaders & Modchips' started by mattytrog, Dec 18, 2018.

  1. mattytrog

    mattytrog Not on my watch.

    Apr 27, 2018
    United Kingdom
    **Note for Mattytrog-The-Senile... TODO: Add pics, Add mode table maybe? Add pin table.

    Simple UF2. Current version: 0.9.8r3 beta
    Download links in post 2!

    This is almost-finished (and final) solution for launching payloads on the switch console with a SAMD21 dongle / modchip. I have made other threads on this, but these were mostly for development. But it is time to do things right now. Fingers crossed this will get stickied (and completely abandoned like other stickies).

    Intended use:
    This is meant for modchip fitters or experimenters to aid in fitting modchips for an end-user. However, end-users are more than welcome to have a play too!

    The payload / HWInit is based off CTCAer`s Hekate & Reswitched`s Atmosphere
    The SAMD launcher USB init is based off QUANTUM_CROSS/ATLAS44 code
    @consolex for bringing this to La France!
    @Dougiejones & @popy for testing and bug reporting
    The rest of it... Don`t shoot anyone else. It`s MY FAULT.

    I hate having to do this...

    From 0.9.7, I have swapped the vol+ pin and mode change pins. I will update the graphics in the modchip thread which is HERE.

    The new vol+ hold feature was not working correctly due to a problem with the SAMD itself. Nothing is wrong with the code. Believe me... Apart from its written by an idiot on a ZX spectrum

    So, if you have one of these boards, your options are:

    • Swap the wires (straps) 11 & 12. So solder the current pin 11 wire to pin 12, and pin 12 wire to pin 11. Wanted to sort this before v1.0 out of beta
    • REALLY REALLY SORRY about this. But it isn`t my fault really. On my prototype board, the old pin arrangement was working fine. This is an ADAFRUIT / ATMEL problem. Most likely adafruit.
    • If 0.9.6 is working for you, no reason to change anything.
    • New ItsyBitsy / Feather SWITCHBOOT files coming. Will be clearly labelled.

    17/01/2019 - Updated SWITCHBOOT slightly. Not mandatory to update.
    • In INFO_UF2.TXT, you will see something like this example:

    Also uploaded BIN, update BIN and INO arduino images of SWITCHBOOT.

    Download in post 2.

    TL;DR Very Quick Guide

    Modchip users:

    • Double-press reset to get up bootloader drive, or if already installed, disconnect from Switch, press RESET and reconnect
    • If you are using any straps, download SWITCHBOOT (joycon or both), drop on to chip (UF2 file) depending on what straps used
    • Download latest Simple-UF2 for your chip. Drop on chip
    • Chip will either boot Hekate or "payload.bin", or "payload1.bin" if they exist.
    • Done.
    • If you are using "4-wire" or an old "method 1" install, skip SWITCHBOOT. You don`t need it.

    Dongle users:

    • Connect dongle to PC
    • Double-press your RESET button to open your dongles update drive. If you see a CURRENT.UF2 then just overwrite this with "Simple-UF2.UF2" and you are done.
    • Remember, your dongle MAY work differently. Your dongles LED may quickly flash while it is looking for RCM, then it will sleep. If you are unsure, backup your current "CURRENT.UF2" in case you want to return to your previous config.

    Simple-UF2 / SWITCHBOOT Features:


    • Easy mode - just place "payload.bin" on SD root (SXOS / Memloader / ReiNX / Atmosphere etc etc). Rename your payload to "payload.bin", place on SD root, done.
    • No extra files or folders needed. No 0 folder, no nx/s2 files, nothing.
    • Hekate 4.6 fallback. If "payload.bin" or your selected payload is not there, Hekate 4.6 will launch.
    • Modchip info displayed in Hekate screen
    • In Hekate, select payloads from SD root or /bootloader/payloads directories
    • Up to 8 payloads selectable via chip
    • All current firmwares supported (up to 6.2.0).
    • Settings are written to flash, so resets etc won`t affect your settings. This is set and forget! No switches required beyond basic setup unless you want to experiment or build an advanced dongle / modchip for a customer.
    • Hold VOL+ to change chip settings, select payload etc etc (If you have the vol+ strap fitted)
    • Automatic coldboot pushing of payload if USB is disconnected. (accidental RCM is now a thing of the past)

    Hekate changes

    • Choose payloads from SD root as well as bootloader/payloads folder
    • Modchip payload and mode displayed on menu
    • Quick backup - An absolute MUST. If you don`t backup anything else, USE THIS. Backs up BOOT0/BOOT1/PRODINFO. About 12MB in total. YOU WILL NEED THIS IF YOU BRICK AND DON`T OTHERWISE HAVE A NAND BACKUP. For example if some Jellyperson uploads a bricker. Do it. Only takes a second.

    SWITCHBOOT (requires straps fitting)

    • Permanent modification of your switch (You can disable / change in software. Drag and drop!)
    • Does not waste power. Switch is properly shut off
    • AutoRCM not required
    • Save fuses (if using both straps)
    • Official Nintendo updates DO NOT BURN FUSES! RCM mode survives all firmware upgrades (if using both straps)
    • Internal eMMC is NOT MODIFIED

    Step 0 - If you require BOTH UF2 files,

    You flash SWITCHBOOT first, then Simple-UF2.

    • Simple-UF2
    In that order.

    Switchboot is once-only. You do not need to flash every update.

    Switchboot is independent. You can use SWITCHBOOT with other UF2s provided by others

    Software Installation:
    Step 1 - Identify your installation method.

    Straps 101 - What are "straps"?
    Find out about straps HERE

    Let us try to work out how your chip is fitted... Have a read of the below install methods. Ask me if you are unsure.
    It will be one of these 5...
    Skip if you know how your chip is fitted.

    Step 2 - Do you need a specially-made-for-Nintendo-Switch UF2 bootloader?

    If using the new "Universal Fitting Methods" then YES! You will need to flash a "SWITCHBOOT" bootloader. This enables the "straps" to work correctly without draining battery.

    SWITCHBOOT is not tied to Simple-UF2. It is fully independent. You can just use SWITCHBOOT and another UF2 if you wish.

    You can download these HERE

    Brief bootloader function diagram here...


    Step 3 - Get into bootloader mode. If you know how to get your UF2 drive up, skip this.

    Skip if you know how to access UF2 drive.

    Step 4 - Drag and drop time!

    OK... You should be sat there with a drive open on your PC`s desktop. It will be called <SOMETHING>BOOT. For example, TRINKETBOOT, REBUG_BOOT, GEMMABOOT or whatever. You should see the CURRENT.UF2 in the folder with 2 other files. The CURRENT.UF2 is the important one.

    • a) If using an old fitting method, then feel free to skip this step. I`m sure it will not apply to you. Just move on to b. If using a new "universal" fitting method, drag your preferred "SWITCHBOOT" bootloader to the drive where CURRENT.UF2 is. The drive will then disappear. Once the drive has closed, disconnect your USB cable and reconnect. A drive called SWITCHBOOT should pop up!
    • b) Find Simple-UF2.UF2 which you have downloaded and drag this to your SWITCHBOOT drive.

    Flashing is complete.

    Basic usage:
    • Place your desired "payload.bin" on SD and it will boot automatically, every time. If there is no "payload.bin" or no SD inserted, Hekate 4.6 will launch. Done.
    • If you prefer to launch via Hekate, or backup your eMMC or whatever, simply temporarily rename your "payload.bin" to something else, for example "temporary_renamed_payload.bin". Or place your payloads in bootloader/payloads.
    • There is no obligation to use "payload.bin". Just don`t bother if you don`t need it. Hekate will launch in this circumstance every time. Set your options etc etc according to the Hekate thread.

    Advanced Usage:
    Make a note of your PAYLOADPIN at the bottom of this post. You will be needing this. Also your MODEPIN if your chip has one. Again, see below
    To activate PAYLOADPIN, touch the pin to GND once with a piece of wire, or fit a switch if required (for example if building your own dongle)
    To activate MODEPIN, touch the pin to GND as above or fit a switch. For dongles / chips without a MODEPIN, you can edit the offsets... Which I will post.

    • NOTE 1: By default, your numbered payload, if present, takes priority. If you don`t want to use this, see "Basic Usage" above. Nothing else needs to be done.
    • Example... If you have "payload.bin" AND "payload1.bin", "payload1.bin" has priority.
    If you want more payloads, read on...
    For multi-payload mode, your payloads should be named "payload1.bin", "payload2.bin", "payload3.bin"... ... up to "payload8.bin".

    There are 4 modes that your modchip can be in with this release. To change modes, hex-edit the offset that I haven`t posted yet. Someone remind me please!!! I`m an imbicile until further notice.

    Mode 1:

    • Maximum 3 payloads, will stay on selected payload unless mode is changed or payload is changed via PAYLOADPIN.
    • There is no indication of current payload (to aid faster startup) before sending the payload. However, the sent payload will be "blinked out" after sending.
    • 1 flash = payload1.bin, 2 flashes = payload2.bin etc
    Mode 2:
    • Maximum 3 payloads. Will stay on chosen payload unless there is a deliberate "fail" in sending.
    • The reason for this "intended sending failure" would be if you are already booted into Horizon (Switch OS).
    • Once RESET is pressed on your modchip AND a failed send is detected (because you are already booted) the payload counter will increase by one.
    • This mode is intended for AutoRCM users or users with both straps connected (joycon and volume) and cannot / do not wish to have wires and switches everywhere.
    Mode 3:
    • Identical to mode 1, apart from there are 8 payloads to choose from.

    Mode 4:

    • Identical to mode 2, apart from there are 8 payloads to choose from.

    PAYLOADPINS are listed below: Activate this by touching to GND and it will increase payload counter by one. May jump TWO payloads if you are using mode2 or mode 4.
    Trinket / Rebug / All Legacy Methods - 1
    Gemma - N/A due to lack of inputs
    ItsyBitsy / Feather - 10
    RCMX86 Internal - 3 (requires testing)

    MODEPINS are listed below:
    ItsyBitsy / Feather - 12
    Generic Trinket Dongle - 4
    Trinket / rebug ONLY MODEPIN offset -

    Last edited by mattytrog, Feb 12, 2019 at 11:39 PM
  2. mattytrog

    mattytrog Not on my watch.

    Apr 27, 2018
    United Kingdom

    Download links: Simple-UF2 v0.9.8r3 Latest version only here... Older versions on my Git.

    ArgonNX example graphics HERE - bmp files should be in /bootloader/gfx. Just extract folder and drag to /bootloader on SD card. TESTING ONLY!!!

    Uses same file structure as Hekate in Simple-UF2. So you don`t need to duplicate anything.

    Version 0.9.8r3: Online

    Changelog 0.9.8r3:
    • Hekate updated to 4.6svc - added 77620 rtc control. See hekate git for more information
    • Autochainload now has an option to press vol- during boot and it is displayed (1 second)
    • USB strap changed to just sense falling voltage rather than a change (shouldn`t wake the chip up when plugging things in)
    • Modchip USB connection completely disabled at sleep by setting CTRLA bit to 0

    Changelog 0.9.8r2
    • Bugfix release. Running out of version numbers! So this is 0.9.8r2
    • Fixed bugged Hekate which wouldn`t let you boot into Hekate menu unless payload.bin was present. So sorry about that!
    • Increased DotStar brightness on Adafruit boards
    • Mode 3 ArgonNX updated with my fixes. Touchscreen & Screenshot now works correctly
    Changelog 0.9.8:

    • Initial DragonInjector support for forthcoming DragonInjector dongle
    • 5 modes to choose from now...
      MODE 1: 3 payloads
      MODE 2: 8 payloads
      MODE 3: ArgonNX
      MODE 4: 3 payloads autoincreasing on modchip reboot (and no payload sent. If successfully sent, stays the same) - (for autoRCM users who DONT have vol+ strap fitted)
      MODE 5: 8 payloads autoincreasing on modchip reboot (and no payload sent. If successfully sent, stays the same) - (for autoRCM users who DONT have vol+ strap fitted)
    • Quick backup files (BOOT0/1/PRODINFO) now saved to /backups/Emergency_Emmc_Fix
      -Restores from same folder for convenience
    • Added 1 second timeout to stop payload.bin or payload<number>.bin autochainloading-Press power and vol- to go to menu from cold boot.
    • Added initial ArgonNX support. Graphics files to go into bootloader/gfx (use example gfx folder below)

    • Added long long press to reset all values including USB strap. Check new graphic on first post.
    Changelog 0.9.7
    • Long-press vol+ to change payload / mode / modchip settings / reset modchip settings. See flowchart in post above.
    • Added new backup and restore option called "Quick" in Backup / Restore options...
    • Backs up PRODINFO, BOOT0 and BOOT1 to /backup for easy retrieval
    • Restores from same folder
    If you can`t be bothered to wait for full or partial dumps, or are VERY limited on space, use this. You can still backup and restore as usual in Hekate too.

    This is meant as a last-chance saloon incase some twat writes another pikabricker and you backup your fucked NAND by accident.

    Changelog 0.9.6:

    ***The USB strap again...

    There have been odd reports that charging is slower with the strap fitted on 0.9.5. I have tested this on 2 switches. 1 seemed to charge normally, the others charging did indeed seem slower.

    Upon testing, this is due to the usb strap input which I changed to use the built-in pulldown resistor. I only changed it in the first place because it was relying on a capacitive pin. If connected, these are fine. However, if they are left floating (not connected) you can get phantom actions as these sense capacitance on the line. So anything can set it off.

    So... Changed the following...

    • Placed a new run_once routine that will check for the strap on a fresh flash. If present, will enable the strap control code, if not there, will remain disabled. To enable, reflash the UF2 once you have fitted your strap. I named it run_once for a reason. Doesn`t need checking every boot ;)
    • Changed the sense pin back to capacitive. All is good.
    • Mode / Payload selection improvements. More reliable hopefully. Confirmation LED added (rapid pulsing for half a second)
    • Slowed blinking down to make it a bit easier on the eye

    Changelog 0.9.5

    ***Affects users of the new USB strap
    Removed delay from pulling out USB to sending payload - There was an issue where some users reported that upon fitting the strap, the SXOS boot menu booted every time.

    I put the delay in to allow for damaged / faulty USB cables or if the cable was pulled out slowly. But it isn`t an issue. It isn`t needed.

    So, removing the delay.

    Thanks to @popy for testing and bringing it to my attention.

    Changelog: 0.9.4
    • Very nasty bug killed that would completely lock the console during boot if using Hekate CFW options. This is to do with the BLZ graphic I placed in. Therefore, if you are using the onboard graphic (oem style), you may have noticed a problem. This is fixed. Memory was getting overwritten and... yep. would lock it solid. Something I should have checked more thoroughly. But I didn`t. Won`t be making that mistake again...
    • New strap support code to prevent RCM accidents. Battery drain is TRUELY A THING FROM THE PAST (as long as you have the easy to fit strap connected that is... ;) )
    • Removed mode pin from certain internal modchips (Trinkets / Rebug / RCMX86). Lack of pads forced me. Nobody used it anyway. You can still change mode for now by changing the not-yet-posted offsets. Dongles are unaffected. If anyone wants me to scrap the new strap, then I will.
    Changelog: 0.9.3
    • Updated default blz graphic to something more "OEM" - set an autoboot option to see it
    • Killed a gremlin that may cause phantom capacitive "pin" action, changing payload / mode. You can safely handle your dongle without it changing its payload like it is posessed as soon as you touch it. Literally...
    Changelog: 0.9.2
    • Modchip Mode / Payload info added to Hekate screen
    • Payloads can now be selected from SD Root as well as bootloader/payloads. New option in menu.

    Changelog: 0.9.1
    • Initial release
    • Various stability improvements to make the user feel like a lottery winner
    Modchips Supported:
    • Trinket M0 / Rebug SwitchME
    • Trinket M0 - Legacy method 3 (QuantumCross/Atlas44)
    • Trinket M0 - Mattytrog Method 3
    • Gemma M0
    • ItsyBitsy M0 Express
    • Feather M0 Express
    • RCMX86 Internal
    • Nerdonic Exen Mini **Coming soon
    Dongles Supported
    • R4S (Possibly not working. If not working, use generic NS-Atmosphere / TegraRCMsmash version and LET ME KNOW!)
    • RCMX86 (Testing)
    • DragonInjector (currently still in testing phase of manufacture)
    • Generic Trinket with mode & payload buttons / pads (pins 1 & 4)
    • Generic Gemma with mode & payload buttons / pads (pins D0 & D1)
    • Generic NS-Atmosphere / TegraRCMSmash etc etc version. 0.9.8r2

    If already using UF2 files, choose UF2 file.
    If flashing a virgin chip, with JLink / OpenOCD, choose BIN file
    If updating a chip with JLink / OpenOCD, choose UPDATE
    If you want to use arduino, use INO file

    Joycon (For dual-boot)
    Joycon and volume (For perma-CFW boot - SAVE FUSES!)

    See previous post for more info...

    Hekate Sleep Libraries etc... Place in Bootloader/sys if you need them

    Attached Files:

    • gfx.zip
      File size:
      1.8 MB
    Last edited by mattytrog, Feb 12, 2019 at 8:36 PM
  3. Frank1905

    Frank1905 GBAtemp Regular

    Aug 13, 2018
    Really great job Matty!

    Inviato dal mio Nexus 5X utilizzando Tapatalk
  4. mattytrog

    mattytrog Not on my watch.

    Apr 27, 2018
    United Kingdom
    Cheers sir!
    Will be when finished. Got files etc and photos to complete. But coming tomorrow. Hope it doesn`t get locked for being a "placeholder" because it isn`t! It`s under construction.
    Frank1905 likes this.
  5. Frank1905

    Frank1905 GBAtemp Regular

    Aug 13, 2018
    Take you time and...
    be positive! It won't get locked! :-D
    I hope I will be able to follow your guides about modchips when I'll get mine. ^_^

    Inviato dal mio Nexus 5X utilizzando Tapatalk
    mattytrog likes this.
  6. Deynet

    Deynet Newbie

    Nov 22, 2008
    Gambia, The
    Hello mattytrog,

    thanks for your great work!

    I installed my Trinket M0 yesterday following your diagram from another thread including Vol+ and Joycon. Please see attached picture below.

    I have some questions:

    What do I need to flash on the Trinket M0 now?

    First, the "Trinket_Rebug_Both_Straps.uf2" fromyour github SWITCHBOOT_BOOTLOADERS/trinket_rebug folder?

    Second, the "Mattytrog_Method3_v091_Simple-UF2.UF2" from your github Simple-UF2 folder? Or anything else? I'm not sure if this the right file for my wiring setup...

    Next, I want to boot directly into SX OS. Which payload.bin do I need to put on my SD card? Where I can find it?

    Attached Files:

  7. mattytrog

    mattytrog Not on my watch.

    Apr 27, 2018
    United Kingdom
    Payload.bin is from the sxos site. Called "SX loader".

    Yes make sure you flash the bootloader first, then the simple-uf2
  8. crazy_p

    crazy_p GBAtemp Regular

    Sep 3, 2016
    Hi @mattytrog i'm about to install a Trinket M0 into my Switch.. Im not 100% sure, if there is continuity between these spots... Will this cause any issues, or is it "OK" to install? Between the yellow and the green Connection is no continuity, i already checked that! Thanks in advance!

  9. mattytrog

    mattytrog Not on my watch.

    Apr 27, 2018
    United Kingdom
    There shouldn`t be any continuity. If there is, it should be very high impedance. They are USB data lines.
  10. crazy_p

    crazy_p GBAtemp Regular

    Sep 3, 2016
    Im not sure if there is continuity or not.. Where can i check if there is?
    Last edited by crazy_p, Dec 20, 2018
  11. mattytrog

    mattytrog Not on my watch.

    Apr 27, 2018
    United Kingdom
    Well u just check the points you have soldered against each other and against GND. Test with one point on GND and go around all your soldered points. Only GND should beep.

    Are you sure you should be attempting this if you are struggling with continuity checks?
  12. mattytrog

    mattytrog Not on my watch.

    Apr 27, 2018
    United Kingdom
    Trinket / rebug should also cover RCMX86 internal.

    Dongles added. Offsets to come to change mode...
    Romain80200, snam11 and Frank1905 like this.
  13. Romain80200

    Romain80200 Member

    Apr 13, 2013
    dans ma maison
    Hello, have you solved the problem with volume+ strap on rcmx86 internal?
  14. mattytrog

    mattytrog Not on my watch.

    Apr 27, 2018
    United Kingdom
    I think so. I haven`t got a chip to try. I`d like to know!
  15. Romain80200

    Romain80200 Member

    Apr 13, 2013
    dans ma maison
    Ok, let's hope Snam11 will test it.

    D'accord, j'espère que snam11 pourra le tester.

    But I have one question, why do you do 2 version of the bootloader? Can't we use the version with both strap connected and only solder the wire for the joycon?
    It will be the same than the other version?
    Last edited by Romain80200, Dec 20, 2018
    mattytrog likes this.
  16. metaljay

    metaljay GBAtemp Fan

    Jan 10, 2012
    Looking forward to this!
  17. snam11

    snam11 Advanced Member

    Jan 10, 2007
    United States
    i'm gonna try it in a few, and i'll let you know (i really hope mode2 will work fie)

    @mattytrog which bootloader i should try before flashing new uf2? feather_m0_express or trinket_rebug?
    Last edited by snam11, Dec 21, 2018
  18. mattytrog

    mattytrog Not on my watch.

    Apr 27, 2018
    United Kingdom
    Use trinket
  19. snam11

    snam11 Advanced Member

    Jan 10, 2007
    United States
    ok, i did a test:
    flashed first: Trinket_Rebug_Both_Straps.uf2
    than Trinket_Rebug_v091_Simple-UF2.UF2

    vol+ d0
    joy d3

    weird behaviour: at first try i get hekate (i had no sd on the slot). with sd in the slot i get black screen
    EDIT: plaing a bit with this conf i get same issues as before: auto cfw boot but no vol- and no flash

    joy d0
    vol+ d3

    auto boot on cfw but still vol button problems (it rise up at max vol and i cannot use vol-). No flash connection.

    if i remove vol+ and i put joy on d0 i get again flash connection (and of course at power on ofw boot, and with power+vol+ cfw boot)

    i dunno if my chip is faulty or what...
    Last edited by snam11, Dec 21, 2018
  20. Romain80200

    Romain80200 Member

    Apr 13, 2013
    dans ma maison
    Ok, as soon as i receive mine, i will try.
    We will see if the chip is faulty or if it's something else.