mattytrog / FUSEE_SUITE

Part 1 and part 2
62 stars 12 forks source link

Current Version: 9.2.1 - Scroll down for info / intro...

TL;DR? Changelog and other bits...

Old README and older (basic) versions are HERE

Quick upgrade procedure if coming from earlier version...

Fastest possible bare minimum deployment:

Important differences...

Nintendo Switch internal microcontroller-based payload loader/booter.

This consists of:
A Nintendo Switch v1 UNPATCHED CONSOLE
SAMD21 Device (Adafruit Trinket / Gemma / ItsyBitsy etc)
Part 1 of this software which is the SWITCHBOOT or FUSEE RCM bootloader that, once the chip is installed in your console, will trigger RCM mode.
Part 2 which is the actual payload loading software and chip settings...

Features - Thanks to CTCAer for Hekate base that is partly used in Part 2. Arduino being the other part.

Brief instructions:

FITTING A CHIP

Most SAMD21 devices are or can be supported.

Boards supported are:

Look in the install diagrams to see how to fit one. Or fit a 'Naked' chip, without buttons, LED or even PCB.

USERS WITHOUT RESET BUTTON

To access the UF2 bootloader, either HOLD VOL+ for 20 Seconds or SELECT THE OPTION IN THE CHIP ASSISTANT MENU. If you have no part 2 flashed, or is corrupt, and you have no access to the RESET pin, you can alternatively power-off your chip, touch SWDIO to GND and power on. This will get you into the part 1 bootloader... See below...

It is recommended to flash your chip BEFORE FITTING in most cases. This is your decision though. You can access the UF2 bootloader in all circumstances. A new VIRGIN SOLO chip MUST be flashed before fitting, for your own sanity.

So...

Operation

Flash part 1

For "stock" microcontrollers (ie Adafruit), just drag and drop your Part 1 onto your chips UF2 drive. Thats it.

If flashing a NEW SAMD21 chip, you will need to do this with your favourite flasher, or alternatively use my Raspberry Pi / OpenOCD image that is configured, ready to go. Connect power, GND, SWCLK and SWDIO and flash a BIN file. I recommend using TRINKET version, but any will do. Remember if using the FEATHER version, your chip will require an external oscillator. Whatever you choose, your virgin chip will be using those pins as in a full board. So you would wire your straps as that chip.

If you are reflashing a bricked chip, same instructions apply.

Flash part 2

Drag and drop chosen part 2 to FUSEE UF2 drive. Flashing complete.

I will upload 2 identical versions. One with the long-press settings approach, one with multiple press approach. These are identical files with just one option "preset" to enable long or multiple-press. You can change this option in the menu or with your VOL+ button. This is for convenience only. The files are exactly identical. You can also change your settings with a SETTINGS.UF2 file.

Long-press - at ANY POINT the console is powered on, you can HOLD VOL+ and and LED will flash. Count these flashes for a setting. The settings are:

Multiple-press - This mode is only active for 30 seconds from a cold-boot. So if you want to set multiple options, you might need to reboot to reset the countdown. The countdown is displayed on the screen. Why have a countdown? So it cannot be accidentally activated. Kids and grownups will multiple-press VOL+ to increase volume in normal usage. This could cause settings to get changed. There is a "plus" side to this mode. You can set the options in the Fusee menu. Look at the "Chip Setting Assistant". This makes it possible to use a chip completely "blind" and "naked" - IE without LED or reset switch.

Options 1 - 6 are the same as above.

Enter the Chip Setup Assistant in the menu and quickly press VOL+ to change your desired option.

Why not just have a menu that you can use "normally"? Limitations. It isn't possible to talk to the chip once the inbuilt "payload" is running. Or rather, it IS... But USB code would require A LOT of work, to flip from host to device mode, enumerate from Switch side and communicate via Serial. Adding new wires to implement I2C or something was considered. But this doesn't help old chip users from day 1. Also there is space. The current size makes it a REAL squeeze to fit onto a SAMD21E17 as it is. Thats why E18 is default (with 256kb flash). For the options available, it just isn't worth it. So we are "mirroring" the multiple-presses in software that we are doing in hardware. That is all.

Other menu-based features - bare minimum QUICK backup. Not got patience to wait for full rawnand dump? Backup just your BOOT0/1/PRODINFO partitions. Rebuilding a NAND from scratch is still a faff, but you will have all your certs and calibration data intact. There are some vicious b**tards out there. Do a SAFE backup. Now.

Summary of works done in this version of the package

UF2 Bootloader modifications

Main program modifications

Arduino modifications

ISSUES / FAQ

Disconnect from USB if connected, power off and back on again. If still nothing, you need to manually enter RESET. Either touch RESET pin to GND or touch SWDIO to GND while powering on.

You have a virgin chip? This needs to be flashed initially with OpenOCD / Raspberry Pi / Other flasher. I can do this for price of postage. If you have a board that is or was working, do a quick check... If fitted to console, turn on while pressing VOL+. Is RCM triggered? Then you just need to enter UF2 mode. Refer to first question. If nothing, you have incredibly managed to corrupt Part 1. Treat as a virgin chip. Connect SWCLK and SWDIO and flash using OpenOCD. If you have USB port still fitted to board, try plugging into PC and double-pressing RESET.

TODO: More indepth guide on flashing and usage

TODO: Raspberry Pi OpenOCD image link here and brief guide.

Glossary of terms used in this document

Why keep working on such a simple piece of software to do a simple job?

How?

Doesn't it wear the chip out keeping writing to it?

Disclaimer: You should know exactly what you are doing before attempting this modification. It isn't easy - there are really really small points to solder to. No keys or Nintendo copyrighted works are included in this. This is released as open-source, with no warranty given or implied. YOU ONLY HAVE YOURSELF TO BLAME.