Internal modchip - SAMD21 (Trinket M0, Gemma M0, ItsyBitsy M0 Express) Guide, Files & Support

Discussion in 'Switch - Tutorials' started by mattytrog, Jun 20, 2018.

  1. mattytrog
    OP

    mattytrog Up yours...

    Member
    8
    Apr 27, 2018
    United Kingdom
    A nice little update... AutoRCM is no longer required for any chip or method. BIG HOWEVER, though... If you are saving fuses, USE AUTORCM. Just incase ;)
    This new setup is very good for SXOS emunand. Or for any dual-boot scenario.

    Here is a video of initial testing completed by @metaljay . Thanks for testing young man!



    F.A.Q Addendum:

    Q - I have method 3 or legacy method 3. What do I need to do to change to this method?

    A - Look at the FAQ at the bottom for details how to enter UF2 mode. Update your chip following section 1 guide.
    Then you need to remove the back from your switch and change your modchip wiring. There should be a wire going to either pin 2 or pin 4 on the trinket - the one that goes to the capacitor on the M92T36. Chop it or remove it. It isn`t needed.
    Then change your power point. It will be going from a point on the board to the 5v pad on the Trinket. Desolder this and make a new connection from a RED ARROW I have highlighted on the diagrams below. This needs connecting to the 3V pad on the trinket.
    Finished.

    Q - I have old method 2 which sucked. However I seem stuck with it. What can I do?

    A - Simple... Follow section 1 to update your chips software...
    Then the reset wire that goes from the RST pad to a point on the switch board, chop it / remove it.
    Finished.


    Section 1. Modchip Preparation.
    There are 2 steps to this.
    • Flash bootloader and firmware
    • Remove USB port and LEDs (Adafruit M0 boards only)

    Flashing bootloader
    Steps:
    • Connect your modchip to your PC via USB
    • A drive should open. Called TRINKETBOOT, ITSYBOOT, GEMMABOOT, SWITCHBOOT or REBUG_BOOT. For this exercise, I`ll just refer to TRINKETBOOT. But they are all the same, differing in name only). If it doesn`t open, press the reset button TWICE in quick succession. Not too too quick!
    • Download your bootloader of choice. There are 2 versions. Choose one
    • If you plan on using dual-boot, you need Version 1. This only enables the joycon strap we solder. So we can boot normally, or hold down vol+ to boot CFW.
    • If you want to permanently boot into CFW, you need Version 2. OFW boot is still possible if you hold reset on your modchip while powering on. Do not hold any buttons apart from RESET on your modchip. You then power on. Let go after a second or so. Your console should boot into OFW.
    I`ve sorted the downloads for each chip into "packs". Each pack contains 4 UF2 files:
    • Version 1 bootloader - Which enables dual-boot and only activates the joycon strap.
    • Version 2 bootloader - Which by default boots you into CFW. Hold down reset chip (via flexing back cover?) while pressing power to boot OFW
    • Chainloader - 0 folder mode by default. You need the 0 folder from below.
    • Chainloader - Hekate mode by default. You need the bootloader folder. It will be made if it doesn`t exist as usual for Hekate. This Hekate is plain, unaltered 4.2.
    • Both versions of the chainloader are EXACTLY THE SAME. Just in different modes. Check the Basic UF2 files thread which I am updating HERE.
    On with the packs!



    You have your pack? Onwards...
    • Extract all files in your pack to an empty folder of your choice.
    • Without deleting or formatting the TRINKETBOOT drive, drag and drop or copy/paste the UF2 bootloader file (version 1 or 2, whichever). Your devices LED will flash for a few seconds, it will disconnect and reconnect and a drive called SWITCHBOOT (or REBUGBOOT) will open. Bootloader flashing is complete.
    • Next, we need to flash the actual firmware to the chip. This uses the exact same method as we have just used. If your modchip hasn`t popped the SWITCHBOOT or REBUGBOOT drive up, double-press reset again. But leave one second between presses. So before you had to press RESET - RESET in quick succession, with our new bootloader we now press RESET - wait for a second - RESET. Once the SWITCHBOOT or REBUGBOOT drive is open, continue.
    • Next, we will install our chainloader. It is in your pack you downloaded. Choose one.
    • Drag your desired Chainloader UF2 to SWITCHBOOT/REBUGBOOT. Your chip will flash, reboot and go to sleep. Possibly just leaving one light showing on your chip. Firmware flashing is complete.

    Section 2. Removing USB port and unneeded LEDs. (Adafruit chips only)
    • Next, we need to remove the USB port from the modchip. I recommend a heatgun or a rework station. Heat up until the USB port just lifts off the modchip.
    • Do the same for the LED just to the right of the USB port.
    See picture:
    20181031_110415.jpg

    You are now ready to fit your device. Proceed to Fitting section.





    Section 3. Fitting modchip to your Switch.

    New Universal Method
    . All SAMD-based internal chips. If your chip is not supported and you cannot work it out, PM me.

    Trinket M0. Use trinket pack.
    Solder as laid out in the following picture
    trinketnewmethod1.jpg

    Rebug SwitchME M0. Use Trinket pack.
    Solder as laid out in the following picture

    switchmenew.jpg

    RCMX86 - Testing only. May be incorrect pinouts. Use Trinket pack.
    Solder as laid out in the following picture

    https://gbatemp.net/attachments/rcmx86_universal_method-jpg.149269/

    Gemma M0
    Solder as laid out in the following picture
    gemmanew.jpg



    ItsyBitsy M0
    Solder as laid out in the following picture
    itsybitsynew.jpg




    Section 4. Final Steps
    Now you can test your modchip.

    If you used the Hekate mode chainloader, you are now FINISHED. Enjoy.

    Otherwise, carry on...

    Eject any SD card you have and turn your switch on. If using dual-boot bootloader, you need to hold down vol+ and press POWER

    You should see the following graphic.
    20181109_124241.jpg

    If you don`t see the above, hold down POWER for 12 seconds and test again.

    Final step is to place your SD card in your PC.
    Did you see the above graphic? It is telling us what it expects to find on your SD card.
    In this case, it is looking for a "0 folder", a "0.nx" file and a "start.bin" file.

    You need a folder called 0 on your SD card.

    Download THIS


    Extract to the root of your SD card.

    In this folder, you will see some ".nx" files. These are forwarders. There are so many because your modchip has different multipayload "modes". More on this in my other thread HERE.

    If you only want to use a single payload, you can safely delete all files apart from "0.nx" and "start.bin".

    "start.bin" is your actual start payload. You can replace this as you wish. If you want Reinx, you would download their "reinx.bin" and rename to "start.bin". I have included "sxos" as an example.

    Thats all.

    Put SD back in console and start.






    For more information on the UF2 files that are being used, go to the Chainloader thread HERE. There is all information about modes that your chip can do.

    Raspberry Pi OpenOCD image download. Default username / password is "pi" & "raspberry". Includes bootloader files in the bootloader folder. SSH enabled. OpenOCD configs "should" be working. They work for me anyway... Link HERE (google drive)

    OEM-style Boot screen for Hekate: Download here

    bootlogo.jpg



    BUILD YOUR OWN FROM A QFP ATSAMD21E18. Trinket equivalent pins.
    Flash Trinket bootloader using OpenOCD via serial pins SWDIO / SWDCLK. Fit a reset switch somewhere... Or going to power / wake (aka method 2). If building for external use, it is good practice to fit a third capacitor between 3V & GND. This is deliberately vague and ambigious, as this needs research and you need to know what you are doing.

    Link for setting the Pi up with OpenOCD: HERE
    Raspberry Pi OpenOCD image in downloads section or HERE
    SAMD pi connection.png


    Alternative Solder Points
    An old pic. Just thought I`d share.
    alternativepoints.jpg
    View attachment 143380
    s-l1600.jpg
    Credit to @consolex :
    DqR4L3nWkAAdIqK.jpg
    alternative3v.jpg




    Replacement Parts List

    Parts

    FAQ

    Q - How do I boot the switch into APX (RCM) mode?

    A - You need to short out pin 10 on the right joycon rail to GND with a jig or modded joycon or paperclip (not recommended... Buy a jig you cheap-ass gyppo). Once shorted out, hold down vol+ and power. The switch screen should be off... Plug into your PC and it should recognise a APX device. Well done. You are in RCM.

    Q - What glue should I use?
    A - Only glue if necessary! Ideally if your soldering is of sufficient quality and your wire is thin enough, you don`t need glue. I use a bit because I am OCD. Anyway, use Epoxy. It`s what I use. Gives you some working time, is solid. Superglue makes a mess DO NOT USE SUPERGLUE. The only thing super about it is how it melts things. Epoxy won`t stick to the shield long-term, so bear that in mind. Pure Acetone will remove epoxy. Acetone tends to remove / melt anything to be warned. CHECK YOUR GLUE WON`T GO CONDUCTIVE OVER TIME - LOOKING AT YOU SCAMSUNG! The combination of heat cycles and absorbtion of moisture can turn adhesive into a high-impedance connection!

    Q - What size wire should I use?
    A - I use AWG40 magnet wire or AWG30 Kynar. AWG40 goes onto components easier... And if you snap it, chances are the wire will snap and not the trace / component.
    A2 - You can also use AWG30. I recommend Kynar wrapping wire but any will do. Looks nice, good resistance to elements, tidy. Nothing thicker than AWG30. You are just causing yourself more headaches. Trust me.

    Q - Is AWG40 thick enough?
    A - Yes. AWG40 is good for around 90mA.

    Q - which methods do you recommend?
    A - if you are going to downgrade one day, use method 1. If you are already on latest firmware before modification, use any method.

    Q - how do you recommend to set it up?
    A - You can use the chainloader HERE if you wish... No messing around with UF2 files any more.

    Q - My switch is flat and won't turn on.
    A - Have you got the charger connected? Disconnect it or your switch won't boot! Boot to a payload (SX loader/Hekate), reconnect charger and leave on the payload menu and charge. Leave for 15 minutes and switch will start normally. It will continue charging one booted.

    Q - How do I change my UF2 file once I have installed the chip?
    A - Let your switch boot up, so you are on your home screen. Make sure you are NOT plugged into anything. Press RESET TWICE on the chip (trinket / rebug / whatever), then plug in to your PC. A drive should come up. Called, <SOMETHING>BOOT. ie REBUGBOOT, TRINKETBOOT, ITSYBOOT. Drag your chosen UF2 file to this drive (not in a zip or anything). It will flash the chip automagically.


    Disclaimer:
    You have only yourself to blame. This voids warranty. This may or may not get you banned from online services. If it does, you got yourself banned. I`m not responsible if you kill your switch / your first-born with any of this in this post. I`m not infalliable. I`m partly senile. Do your own research. Kids, get bill payers permission before you attempt even using a screwdriver.
    NUTSHELL: Don`t come having a go at me because you fooked your £300 console up. I`ll do my best to help you though if you do, Just don`t blame me.

    Credits to Quantum-Cross, Atlas44, @Ninoh-FOX , @jcrorxp , @tecfreak, @mooglazer, @subcon959, @64Dp128k, @mikeleuskaldunak, @M-O-B, CTCaer, @evilsperm, @consolex and everyone else for valuable input.


    IF YOU REQUIRE SUPPORT, IF YOUR CONSOLE ISN`T WORKING CORRECTLY... PLEASE POST A HIGH RESOLUTION PICTURE OF YOUR INSTALL. You might think it isn`t your soldering, but in all cases with the new methods, it is bad soldering. So, please post a picture.


    A BRIEF WARNING - PLEASE READ
    READ THIS
     

    Attached Files:

    Last edited by mattytrog, Nov 13, 2018 at 12:24 PM
  2. epickid37

    epickid37 ( ͡° ͜ʖ ͡°)

    Member
    7
    Jan 4, 2017
    United States
    mushroom kingdom
    Nice
     
  3. shabbypenguin

    shabbypenguin Advanced Member

    Newcomer
    3
    Apr 29, 2015
    United States
    Can you share the sketch so folks can swap out the payload as needed?
     
  4. jjbredesen

    jjbredesen WarezNX Owner

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

    Our Patreon
    Feb 16, 2018
    Norway
    Hyrule
    Nice, now we can have a $9 SX Pro once the SX OS cracking is complete.
     
  5. mattytrog
    OP

    mattytrog Up yours...

    Member
    8
    Apr 27, 2018
    United Kingdom
    It is already in the binary. You load it into Arduino and it will give you a "main" and a "payload.h"
     
    mooglazer and gamer4lif3 like this.
  6. pro-pumper

    pro-pumper Member

    Newcomer
    1
    Apr 3, 2018
    Mexico
    very nice..
     
  7. salamandrusker

    salamandrusker GBAtemp Regular

    Member
    2
    Mar 12, 2018
    Spain
    nice job
     
  8. jahym

    jahym Newbie

    Newcomer
    1
    Jun 16, 2018
    United States
    what does it do exactly ???
     
  9. Trappie

    Trappie GBAtemp Regular

    Member
    3
    May 20, 2018
    Netherlands
    Deliver the payload and launch sx os
     
  10. wicksand420

    wicksand420 GBAtemp Addict

    Member
    7
    Nov 13, 2016
    United States
    just deliver a payload, unless you own sx os
     
    Last edited by wicksand420, Jun 20, 2018
  11. olku

    olku Advanced Member

    Newcomer
    2
    Oct 31, 2015
    Estonia
    Estonia
    Thank you for this.

    Is it possible to install Trinket m0 inside Switch and run it from Switch battery? I think it should fit, but I don't know if Switch has test points to solder to.
     
  12. mattytrog
    OP

    mattytrog Up yours...

    Member
    8
    Apr 27, 2018
    United Kingdom
    Yes. Very possible.

    The drill goes like this...

    Connect to 4v feed from battery, connect to testpoints behind USB port.

    HOWEVER......... The trinket stays powered. So you need a little addition to the trinket (a couple of components) which only let the trinket run for 3 or 4 seconds as power button pressed. Or it will run your battery down eventually. So you need to fit it to another point on board with the other bits that only let it run for 3 or 4 seconds.

    I said I`d do a write-up how I`d done mine. And I will. Its just one of them "get round to it" jobs. The pain in the arse comes when you want to update the payload on the trinket. You either need to drill a hole in the back of the switch casing and shield, or it is possible to attach it to the metal shielding on the back and you can just press the back cover to activate the switch as its a tight fit.

    It isn`t for the feint of heart but it works. The possibility of killing your switch through bad soldering is huge.
     
    olku and hippy dave like this.
  13. Rusb

    Rusb GBAtemp Regular

    Member
    3
    Apr 17, 2014
    Thank you, tomorrow I'll have the trinket to test it!
     
  14. LucaFraga

    LucaFraga Advanced Member

    Newcomer
    5
    Aug 10, 2009
    Italy
    So, is there any Trinket M0 cheap chinese knockoff we can buy to save on money? Here in Italy it's EUR 15 plus shipping
     
  15. devleon

    devleon Member

    Newcomer
    1
    Aug 17, 2016
    Gambia, The
    Is the trinket going to be powered by the switch alone? I thought the switch doesn't deliver power in RCM mode which is why the SX Pro has these capacitors in them... Or am I wrong here?
     
  16. mattytrog
    OP

    mattytrog Up yours...

    Member
    8
    Apr 27, 2018
    United Kingdom
    The trinket is battery powered. It has a regulator on it. Good for up to about 9v I think. Cut a USB cable up, solder it to the gnd and batt pads on trinket and use a powerbank? Or fit internally. Coin cell? Anything really from 3v up to 8v ish?
     
  17. bluke

    bluke GBAtemp Regular

    Member
    3
    Feb 2, 2010
    Do I need to copy payload.bin into it ?
     
  18. Joxley192

    Joxley192 Advanced Member

    Newcomer
    2
    Feb 22, 2018
    United Kingdom
    thank u for this cause i have been trying to make one of these and program it but it just kept on saying error cant find trinket m0 and this as save me alot of a lot of time now just looking to find a way to get it to work in side the switch o it doesnt drain my battery :)
     
  19. mattytrog
    OP

    mattytrog Up yours...

    Member
    8
    Apr 27, 2018
    United Kingdom
    No it is ready to go. Just drag and drop to TRINKETBOOT drive
     
  20. nachuz

    nachuz GBAtemp Fan

    Member
    4
    May 21, 2017
    Chile
    and then a SX OS update releases and it fucks the crack
     
Loading...