COMPLETED BASIC MODCHIP / DONGLE UF2 SD BOOT FILES. Trinket / Rebug / RCMX86 / Others

Discussion in 'Switch - Backup Loaders & Modchips' started by mattytrog, Sep 20, 2018.

  1. mattytrog
    OP

    mattytrog Up yours...

    Member
    9
    Apr 27, 2018
    United Kingdom
    Take a look at the experimental stuff at bottom if you like punishment :)

    Read the guide thoroughly. Double-check and recheck everything. You have ben warned.

    TL;DR...
    UF2s are on my Github. Along with source.

    Introduction

    What is this?


    In this thread are a selection of different files (mostly UF2s) that hopefully will assist modchip fitters in launching payloads from SD.

    Why the need?

    This is why...

    Version 1 is more "advanced". Certain functions will be supported on the Chinese dongles too. Use only on dongles, autoRCM switches or modchips updated with Version 1 or Version 2 SWITCHBOOT bootloader.

    If you are on one of the legacy methods without the new SWITCHBOOT bootloader (find out by getting your modchips UF2 drive up. Double-press RESET. If it is called SWITCHBOOT, it is the new one. If it is Trinketboot or anything else, update it or use the legacy files below)


    Download here or download a "pack" from my Github. Read in the modchip thread regarding modchip bootloaders which can be found in section 1 of THIS THREAD.

    Modchips:

    Trinket M0 / Rebug SwitchME
    Gemma M0
    ItsyBitsy M0
    Legacy Method 3 - Quantum_Cross/Atlas44 version
    Current Method 3 - Mattytrog


    Dongles:
    RCMX86
    R4S Dongle
    NS-Atmosphere - coming soon


    You can download packs for the above modchips HERE. These packs contain 2 bootloaders and 2 versions of the same chainloader in different modes (this is for people who cannot edit the UF2). I advise you to have a good read through the OP of that thread. :)



    Version 1 - For new "universal" methods of modchip installation and some dongles (coming soon) or old Method 1 with AUTORCM. There is no strap control in version 1 as it is now in the bootloader. If you are autoRCM, you can use this version or Version 2.

    There are 10 different modes. The idea is you select your desired mode and forget it. Here is a mode table (PDF) showing the 10 modes available:

    PDF Mode Table - New Version


    Mode buttons / pads are:

    Trinket M0 - Pin 4 / Pad 4
    Rebug SwitchME - TX Pad
    Gemma M0 - D1
    ItsyBitsy M0 - Pin 11 / Pad 11

    RCMX86 and R4S dongle do not have facility for mode switch. So you HAVE TO HEX EDIT THE UF2 as described below...


    There are 2 ways of changing mode. These are:

    • Short the mode pin to GND briefly. The LED will blink out a series of "flashes" to let you know what mode you are in. If you get to mode 10, it will go back to mode 1.
    • Wait for the mode indication to finish flashing before shorting the pin again to move on. This video demonstrates:


    The second way of changing mode (as it is not possible to put mode switches on every device) is to do a simple hex edit.

    Get your favourite hex editor (I recommend HxD).
    Open your boards chainloader UF2 file in the hex editor.


    There are offsets listed for each chip / dongle.
    These offsets are:

    Trinket M0 / Rebug SwitchME - 00004AF8
    Trinket M0 - Method 3 (legacy/quantum_cross/Atlas method & my method 3) - 00004C30
    Gemma M0 - 00004AF8
    Itsybitsy M0 - 00004AD8
    R4S - 00004AB8
    RCMX86 - 00004B18

    At the offsets I have listed above, you will find the value will be 01. Look at this example...
    modeoffsetexample.jpg
    This means that by default the UF2 is in mode 1.

    So if you wanted mode 8, you would change the offset to 08.
    If you wanted mode 10, you would change the offset to 0A - 0A is 10 in hexadecimal.

    Once edited, save your modified UF2 and drag to your device which will be called "switchboot" or "<something>boot". You might need to double-press reset again. Your chip is in your desired mode.


    Final Steps: SD Card Setup
    The next step is to prepare your SD card.
    If you are using this in Hekate-only mode (Mode 2), you don`t need to do anything further. If you have a "bootloader" folder, this will be used. If you don`t, a new one will be made.


    For payload junkies, you need this folder:

    DOWNLOAD 0 FOLDER

    In this download, you will find some files. Like this...
    folder_layout.jpg

    You will see these files are in a folder called 0. You need to extract 0.zip to the root of your SD, so you have the 0 folder like this:
    0 folder.png


    Once you have done this, depending on the mode you have selected, you can add your payloads.

    If you have selected Mode 1, then all you need is 0.nx and your payload (eg ReiNX.bin / Hekate.bin / SXOS Payload.bin) and RENAME TO "start.bin"

    "start.bin" is in lower-case, without the quotes obviously.

    If you have selected a 3-payload option, you would need 1.nx, 2.nx & 3.nx in your 0 folder.

    If you have selected the 8-payload option, you would need 1.nx, 2.nx, 3.nx ... ... up to 8.nx

    Name your payloads like so...
    1.bin, 2.bin, 3.bin, 4.bin etc etc. If you look in your 0 folder, you will see I have put 2.bin and 3.bin in as an example (these are just SXOS - delete or keep - whatever).

    If for whatever reason you are unsure what files to have on there, all you need to do is eject your SD card and boot your switch. You will see something like this...
    20181109_124241.jpg

    Take a look at this video too...


    Notice the graphic on the Switch screen. It is telling us we are on payload 2, and in the 0 folder, the chip expects to find "2.nx" and "2.bin".


    Check the table PDF for information on the different modes.


    One last thing... Payload Increase Pins.

    On the Rebug SWTICHME and Adafruit boards, there is a "payload increase" pin. Adafruit Gemma is NOT SUPPORTED. Feel free to build your own using my code.

    Payload increase pins:
    Trinket M0 = Pin 1/Pad 1
    Rebug SwitchME = V0 Pad
    ItsyBitsy M0 = Pin 10 / Pad 10


    Experimental Stuff & Versions

    Added cycle mode / payload option.
    Source HERE

    Basically, you short pin 2 to GND (or SCL on the Rebug SwitchME)

    and the chip will begin cycling through modes.

    Start with 1 flash (mode 1)
    2 flashes (mode 2)
    etc etc

    If you ground pin 2 during this process, you will see a triple-flash confirming your selection is stored.

    Then the chip will start cycling through payloads. If you don`t want to select a payload, just hit RESET on the chip.

    1 flash = payload 1 (start.bin if in a single payload mode or 1.bin if in a multi-payload mode)
    2 flashes, payload 2
    etc etc

    ground pin 2 / SCL again... Triple-blink to confirm save, chip will reboot.

    Done.

    If you want to reset completely, set all values to defaults, short pin 2 to GND for about 10 seconds then press reset.

    This is testing only and unfinished. Thought it might help.

    Quick video demo:


    TRINKET / REBUG UF2 HERE

    =========================

    Hekate Modchip Version.
    Here is one for you to try people.

    Try this 0.nx file (or the BIN). Rename to any nx you are using. So for example, if you are using modchip mode 4 built-in Hekate at the minute, you could change to mode 7 and rename this to 1.nx to have this Hekate version as payload num 1

    It is Hekate modified to use the 0 folder. Made so it doesn`t interfere with any other version of Hekate you may use. Fully compatible with normal version. This isn`t made to replace the normal version, though you could do. If people want it like this, I will build it in to chainloader and use it as default.

    Made backup options a bit clearer too. To test, rename your 0 folder to something else temporarily... Boot this... A new 0 folder will be made.

    a start.ini will be generated in 0 folder containing 9 payload entries (your start.bin and 1.bin, 2.bin, 3.bin ... ... etc)

    Credit to CTCaer.
    This version is completely unsupported by CTCaer or anyone else, so if it isn`t what you were expecting, don`t bitch to them. :)

    DOWNLOAD 0.nx
    DOWNLOAD BIN FILE (Rename to start.bin, 1.bin, 2.bin etc etc whichever you are using if you wish). Also works with NX-Atmosphere and TegraRCMsmash


    20181117_225751[1].jpg



    Version 2 - Old version of the ShaXLauncher

    I won`t bother updating this one anymore, but I will leave it on my Git until the end of time for people who used the s2 version, with the s2 files.
    Both versions are similar actually. But here they are...

    Trinket / Rebug SWITCHME All Methods
    Trinket Legacy 3 version (quantum_cross / atlas44)
    Gemma M0
    Itsybitsy M0

    The "0 folder" is in each modchips folder above.

    People can use this if they wish, but I am no longer supporting it.
    The straps are enabled in the firmware for this version, so if you are using the new bootloader modification, use the new files too.



    UF2s / source always wanted to support new dongles / boards. PM or put in thread.

    Good luck!
     

    Attached Files:

    Last edited by mattytrog, Nov 17, 2018 at 11:01 PM
    halk271, lordelan, fadx and 13 others like this.
  2. Canna

    Canna Bad Ass Poisonous Mushroom

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

    Our Patreon
    Jul 14, 2018
    United Kingdom
    First.....

    Great job Fatboy,
    Im still using one of your old gemma sxos :P
    il update when or if they change there payload..
     
    mattytrog likes this.
  3. mattytrog
    OP

    mattytrog Up yours...

    Member
    9
    Apr 27, 2018
    United Kingdom
    As soon as I suss out the key offsets, SX gear will be unpacked and stage2 will be added straight to the UF2, making the 0 folder obsolete
     
    DayVeeBoi and CymraegAce like this.
  4. Maupiti

    Maupiti GBAtemp Regular

    Member
    2
    Sep 16, 2018
    France
    Thanks for the great job @mattytrog , a question, I ´m planning to build my own trinket based dongle (even if I already own an sx pro and everything running fine for multi-payloads) but I miss the D.I.Y ...

    So I ´d like to buildi a version with the ability of 3 different payloads that are selected by pressing a momentary switch... If I understood well what I saw on other threads, for the trinket I need to ground (-) Pad 1

    Power on (Cr2032 based), press reset (1 or 2 times ?), press one the switch for payload, and if I want the second payload, press reset again, then the switch again and so on ? And could you please point the link for this « multi payload « file ? I can’t remember which thread I saw it

    Thank you very much
     
  5. mattytrog
    OP

    mattytrog Up yours...

    Member
    9
    Apr 27, 2018
    United Kingdom
    In my other thread... https://gbatemp.net/threads/interna...ybitsy-m0-express-guide-files-support.508068/

    All source is in my github. Can make you a custom one if you want.
     
    Akira likes this.
  6. hippy dave

    hippy dave BBMB

    Member
    12
    Apr 30, 2012
    United Kingdom
    Finally a plain chainloader, thanks. I thought it was funny that TX were the first to do it, so fair play for yoinking their stuff.

    Another way I had in mind was tearing down the latest hekate source to just do all its init and then call its payload chaining function, leaving out all the menus and other features. Have a crack at that if you fancy another project, but make sure you incorporate ctcaer's latest fix for loading sx os payload that was fixed since the 4.1 release.
     
    DayVeeBoi and mattytrog like this.
  7. mattytrog
    OP

    mattytrog Up yours...

    Member
    9
    Apr 27, 2018
    United Kingdom
    Thats all this is designed to be. Just plain-Jane .bin booting.

    I will have a go with Hekate. But it felt kinda fun to "copy" from TX...
     
    DayVeeBoi likes this.
  8. yakuma

    yakuma Advanced Member

    Newcomer
    4
    Dec 27, 2007
    Indonesia
    can this make for multiply.
    maybe on boot u can chose whitch payload u want use
     
  9. mattytrog
    OP

    mattytrog Up yours...

    Member
    9
    Apr 27, 2018
    United Kingdom
    Already done. Check the internal install thread.
     
  10. Maupiti

    Maupiti GBAtemp Regular

    Member
    2
    Sep 16, 2018
    France
    That would be great :wub: , thank you so much...
    After thinking about it, this should meet my needs :

    A dualboot

    1- Hekate (latest release) Colour Led Blue
    2- Sx Os Colour Led Yellow

    Auto increase on
    Flash before send on

    Again thank you, and as soon as I built my dongle, I will report and send some pictures in the dedicaded thread.
     
    Last edited by Maupiti, Sep 21, 2018
  11. mattytrog
    OP

    mattytrog Up yours...

    Member
    9
    Apr 27, 2018
    United Kingdom
    Ok I'll do it as soon as I took my son to school. An hour or so.
     
    Last edited by mattytrog, Sep 21, 2018
    Maupiti likes this.
  12. Joxley192

    Joxley192 Advanced Member

    Newcomer
    2
    Feb 22, 2018
    United Kingdom
    This sounds alot better then the other ones u have done might update my trinket tonight :)
     
  13. mattytrog
    OP

    mattytrog Up yours...

    Member
    9
    Apr 27, 2018
    United Kingdom
    Cheers :)
     
    Last edited by mattytrog, Sep 21, 2018
  14. Maupiti

    Maupiti GBAtemp Regular

    Member
    2
    Sep 16, 2018
    France
    :grog:...take your time...no hurry for me, as I have to find some time to build the dongle.

    For what I plan to do, I have to beg my daughter to leave me some spare time :evil:...
     
  15. mattytrog
    OP

    mattytrog Up yours...

    Member
    9
    Apr 27, 2018
    United Kingdom
    Here we go.
     

    Attached Files:

    Maupiti likes this.
  16. Maupiti

    Maupiti GBAtemp Regular

    Member
    2
    Sep 16, 2018
    France
    Last edited by Maupiti, Sep 21, 2018
    mattytrog likes this.
  17. jcrorxp

    jcrorxp Advanced Member

    Newcomer
    2
    May 2, 2018
    China
    thank you for you contribution, mattytrog, love you so much....
     
    mattytrog likes this.
  18. Joxley192

    Joxley192 Advanced Member

    Newcomer
    2
    Feb 22, 2018
    United Kingdom
    I didn't mean it like that u I just wanted one where u could do this so it will load any payloaders with out messing around and thanx u
     
  19. Maupiti

    Maupiti GBAtemp Regular

    Member
    2
    Sep 16, 2018
    France
    And that we don’t need to struggle anymore with arduino to flash dongles...
     
  20. mattytrog
    OP

    mattytrog Up yours...

    Member
    9
    Apr 27, 2018
    United Kingdom
    Shit only just realised I put a sad face! I meant :)
     
    Joxley192 likes this.
Loading...